Re: How to make fsck run faster?
On Mon, 17 Jul 2006, Antti Harri wrote: > On Sun, 16 Jul 2006, Nick Holland wrote: > > > nope, you can still likely use multiple partitions. Break your backup job > > into smaller chunks, put each chunk on its own partition. Or put each > > machine on its own partition. Or ... > > Interesting ideas. I didn't think that having the same amount of files > in many partitions will reduce the total time to fsck, does it really work > that way although it goes through the same amount of files? > > > BTW: Yes, the dmesg could very well have helped. If your disks were not > > being handled properly or you had insufficient RAM, you can have HORRIBLE > > problems with fsck performance, adding to your fsck time by a non-trivial > > multiple. Your times sound excessive to me, but then, I don't think I have > > that many files on a single partition. > > Unfortunately the computer isn't at hand right now. I'll check the amount of > RAM and add some more if there isn't much. Would changing BUFCACHEPCT > help too? Because the computer is dedicated backup server so it can > take up all the memory as far as I'm concerned. > > > One idea which has been suggested is to use softupdates, and simply "force" > > mounting of the volume at boot, and periodically, fsck the thing on your > > schedule, to reclaim lost disk space. Yes, when you do run the fsck, you > > will spend a lot of time waiting for it, but you will be able to schedule > > it. > > Hmm, actually I am using softupdates. Doesn't it *ever* get corrupted with > softupdates even though there is a crash? > > > Keep in mind, partitions need not all be mounted in /etc/fstab, they can be > > manually mounted "later" in rc.local. Why does your backup machine have to > > boot "fast"? (I got one with way too little RAM, it needs to use swap to > > fsck, but that's ok...I'm not in a hurry for this machine to come up). Doing > > something else with it? Ok, just put the backup partition as noauto in > > /etc/fstab, and fsck and mount (or just force-mount) the partition in > > /etc/rc.local. Now, whatever it was that was bothering you about booting so > > slowly is up quickly, and the backup partition will get mounted in due time. > > Well, I have it set up so that it comes up once a day and after it finishes > doing backups it shuts down itself. So if it crashes and starting > up takes too much time the backup job won't fit the window it's supposed > to. I'm still working on the server and trying to find the best > solution for my needs. Luckily there hasn't been much use for the > backups since there hasn't been any real accidents or failures either ;-) > > PS. Thanks to Nick and others for the advices and ideas. Another thing is to move to larger block and fragment sizes. Depending on the size distribution of your files, this will waste some space, though. I tested 1TB filesystems with varying block and fragment sizes, and it is really nice to see the speedup of newfs anf fsck. -Otto
Re: sh and process management
On Sun, 16 Jul 2006, Gustavo Rios wrote: > Ok, here you have it: I'm sorry, but I'm not gonna go though this bit flag mess. Until you come up with a simple (let's say less than 10 lines) piece of code to demonstrate the porblem you're seeing, my conclusion is the bug is hiding in your code. -Otto > > Code for apx_setuid : > #include > > long > apx_setsid(void) > { >return setsid(); > } > > Code for apx_setpgid : > > #include > > int > apx_setpgid(const long p, const long g) > { >return setpgid((pid_t)p, (pid_t)g); > } > > > Code for sux (main.c) : (the relevant part is option -s and function do_sid) > > #include > #include > #include > > #include "abf.h" > #include "amp.h" > #include "apx.h" > #include "msc.h" > #include "rsc.h" > #include "sdb.h" > > extern int r2e __P((int)); > extern void wrn __P((int)), >die __P((int)); > > static int > do_env(const xlong f, const char *e) > { >struct amp a; >xlong n, x; >int r = 0; > >if (f) *apx_environ = NULL; >if (e) { >amp_opn(&a); >r = env_h2b(&a, e, apx_strlen(e)); >if (!r) for (e = a.b, n = a.s.x; n; e += x, n -= x) { >if (!(x = chr(e, n, '+'))) break; >if (r = apx_putenv(e + x)) break; >} >amp_cls(&a); >} >return r; > } > > static int > do_dir(const char * const d) > { >return d ? apx_chdir(d) : 0; > } > > static long > do_fork(const xlong f) > { >return f ? apx_fork() : 0l; > } > > static int > do_sid(const xlong f) > { >int r; > >if (r = 0, f & 1) >if (f & 2) { if (apx_setsid() == -1) r = -1; } >else r = apx_setpgid(0l, apx_getpid()); > >return r; > } > > static int > do_prio(const char * const s) > { >xlong x; >int r; > >if (r = 0, s) { >if (!scn_u(&x, s)) r = 5; >if (!r) r = apx_setprio(prio_process, 0l, (int)x); >} >return r; > } > > static int > do_ioe(const char * const s) > { >xlong x; >int r; > >if (r = 0, s) { >if (!scn_x(&x, s)) r = 5; >if (!r) r = apx_setioe((int)x, NULL, NULL); >} >return r; > } > > static int > do_rsc(const char * const s) > { >struct sdb sd; >struct rsc rs; >xlong i; >int r; > >rsc_opn(&rs); >sdb_opn(&sd); >r = s ? getrsc(&rs, &sd, s) : 0; >if (!r) for (i = 0; i < rs.sze.x; i++) >(void)apx_setrlmt(rs.rds[i].idx, &rs.rds[i].val); >sdb_cls(&sd); >rsc_cls(&rs); >return r; > } > > static int > do_crd(const char * const u, const char * const g, const char * const G) > { >struct passwd *pwd = NULL; >struct group*grp = NULL; >struct amp a; >xlong v; >xadk32_ts[ngroups_max]; >int r = 0; >char*p; > >if (u) if (!(pwd = getpwnam(u))) r = 4; >if (!r) if (g) if (!(grp = getgrnam(g))) r = 4; >if (!r) { >v = grp ? grp->gr_gid : pwd ? pwd->pw_gid : -1ul; >if (v + 1) r = apx_setgid(v); >} > >if (!r) if (G) { >amp_opn(&a); >r = amp_mem(&a, G, apx_strlen(G)); >if (!r) r = amp_chr(&a, '\0'); >if (!r) { >for (p = a.b; *p; p++) if (*p == ',') *p = '\0'; >for (v = 0, p = a.b; p - a.b < a.s.x; v++, p++) { >if (v == ngroups_max) break; >if (!(grp = getgrnam(p))) break; >s[v] = grp->gr_gid; >while (*p) p++; >} >if (p - a.b < a.s.x) if (v < ngroups_max) r = 4; >} >amp_cls(&a); >if (!r) if (!v) r = 5; >if (!r) r = apx_setgrp(s, v); >} > >if (!r) if (pwd) r = apx_setuid(0ul+pwd->pw_uid); > >return r; > } > > static int > do_exec(char **a) > { >(void)apx_execve(*a, a + 1, apx_environ); >return 2; > } > > static long > __chk(char *s[8]) > { >xlong n; > >for (n = 8; n; n--) if (s[n - 1]) break; >return n; > } > > int > main(int argc, char **argv) > { >xlong i, f; >int r; >char*s[8], >o[] = "fspeu:g:G:d:n:E:x:r:"; > >apx_memset(s, 0, sizeof s); >apx_opterr = 0; >i = f = 0; > >while ((r = apx_getopt(argc, argv, o)) + 1) >switch (r) { >case 'f' : f |= 1; break; >
Re: Boot panic with bsd.mp on a Compaq ProLiant 2500
I happened to read this as I was on my way out of the office for the week (yay for vacation, and a paid one at that) I don't recall the exact error, but on 3 different SMP slot 1 machines, bsd.mp under 3.9 complains about apic, and dies. PS shows swapper as the only thing active. Will look more into it on Friday when I get back, and post what I find. Although, the thought of going back a version or two seems like it might work, as I know I've had 3.7 or 3.8 working on at least one of my dual slot 1 machines... Hope that helps at least a little bit, Nick Frangois Chambaud wrote: Steve Shockley <[EMAIL PROTECTED]> writes: Nick Shank wrote: And, while I know it's a very different animal, it's still a Compaq server... I get the same error on a Proliant ML370 when using bsd.mp. I've got 3.9 running on a DL380 without trouble (GENERIC.MP), and that should be the same mainboard as an ML370. Make sure you've got all current firmware on the box, and try various "OS" settings until one works properly (including "Other"). Incorrect settings will probably result in a crash on boot, or only one CPU. Today, I've try different "OS" settings in the BIOS like UnixWare, Solaris, Windows (2000) and they all do a kernel panic with bsd.mp. I have the "trace", "ps" and "show registers" for them if somebody want to see the details. "Unix with large disk geometry" and "Other" OS types only detect one processor with the "Inspect" Compaq tool. "Other" OS type does not panic the kernel with bsd.mp, but only one processor is detected: OpenBSD 3.9 (GENERIC.MP) #598: Thu Mar 2 02:37:06 MST 2006 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC.MP cpu0: Intel Pentium Pro ("GenuineIntel" 686-class, 256KB L2 cache) 199 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV real mem = 268017664 (261736K) avail mem = 237518848 (231952K) using 3297 buffers containing 13504512 bytes (13188K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+(00) BIOS, date 12/01/99, BIOS32 rev. 0 @ 0xf pcibios0 at bios0: rev 2.1 @ 0xf/0x2000 pcibios0: PCI BIOS has 8 Interrupt Routing table entries pcibios0: no compatible PCI ICU found pcibios0: Warning, unable to fix up PCI interrupt routing pcibios0: PCI bus #2 is the last bus bios0: ROM list: 0xc/0x8000 0xc8000/0x4000 0xe8000/0x6000 0xee000/0x2000! cpu0 at mainbus0: (uniprocessor) cpu0: Intel Pentium Pro ("GenuineIntel" 686-class, 256KB L2 cache) 199 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02 ppb0 at pci0 dev 13 function 0 "IBM 82351 PCI-PCI" rev 0x01 [...] I've "googling" for some time now, but I can't find a definitive answer to that "panic: can't deal with not-all-lapics interrupt yet!" problem. Thank you Steve and Nick for your feedback. Thanks again for your time and this great OS ! Francois
Re: Dhcpd Bizarre!!!!!!!!!!!!!!!!
Hi Nick, Thank for your replies. But in that case I have to search the dhcpd enteries and then parse the /var/log/ daemon. But I Just want to create another file with the format i like. Plz anybody help!!! Thanks in advance Rahul On 7/14/06, Nick Guenther <[EMAIL PROTECTED]> wrote: > > On 7/13/06, Rahul Sharma <[EMAIL PROTECTED]> wrote: > > /*$OpenBSD: db.c,v 1.10 2004/09/16 18:35:42 deraadt Exp $*/ > > > > /* > > * Persistent database management routines for DHCPD. > > */ > > > > /* > > * Copyright (c) 1995, 1996 The Internet Software Consortium. > > * All rights reserved. > > * > > * Redistribution and use in source and binary forms, with or without > > * modification, are permitted provided that the following conditions > > * are met: > > * > > * 1. Redistributions of source code must retain the above copyright > > *notice, this list of conditions and the following disclaimer. > > * 2. Redistributions in binary form must reproduce the above copyright > > *notice, this list of conditions and the following disclaimer in > the > > *documentation and/or other materials provided with the > distribution. > > * 3. Neither the name of The Internet Software Consortium nor the names > > *of its contributors may be used to endorse or promote products > derived > > *from this software without specific prior written permission. > > * > > * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND > > * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, > > * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF > > * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE > > * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR > > * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > > * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > > * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF > > * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND > > * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, > > * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT > > * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > > * SUCH DAMAGE. > > * > > * This software has been written for the Internet Software Consortium > > * by Ted Lemon <[EMAIL PROTECTED]> in cooperation with Vixie > > * Enterprises. To learn more about the Internet Software Consortium, > > * see ``http://www.vix.com/isc''. To learn more about Vixie > > * Enterprises, see ``http://www.vix.com''. > > */ > > > > #include "dhcpd.h" > > > > FILE *db_file; > > FILE *abc; > > static int counting = 0; > > static int count = 0; > > time_t write_time; > > > > /* > > * Write the specified lease to the current lease database file. > > */ > > int > > write_lease(struct lease *lease) > > { > > struct tm *t; > > char tbuf[64]; > > int errors = 0; > > int i; > > > > if (counting) > > ++count; > > errno = 0; > > fprintf(db_file, "lease %s {\n", piaddr(lease->ip_addr)); > > fprintf(abc,"%s\t",piaddr(lease->ip_addr)); > > if (errno) > > ++errors; > > > > t = gmtime(&lease->starts); > > snprintf(tbuf, sizeof(tbuf), "%d %d/%02d/%02d %02d:%02d:%02d;", > > t->tm_wday, t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, > > t->tm_hour, t->tm_min, t->tm_sec); > > > > errno = 0; > > fprintf(db_file, "\tstarts %s\n", tbuf); > > fprintf(abc, "%s\t", tbuf); > > if (errno) > > ++errors; > > > > t = gmtime(&lease->ends); > > snprintf(tbuf, sizeof(tbuf), "%d %d/%02d/%02d %02d:%02d:%02d;", > > t->tm_wday, t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, > > t->tm_hour, t->tm_min, t->tm_sec); > > > > errno = 0; > > fprintf(db_file, "\tends %s", tbuf); > > fprintf(abc, "%s\t", tbuf); > > if (errno) > > ++errors; > > > > if (lease->hardware_addr.hlen) { > > errno = 0; > > fprintf(db_file, "\n\thardware %s %s;", > > hardware_types[lease->hardware_addr.htype], > > print_hw_addr(lease->hardware_addr.htype, > > lease->hardware_addr.hlen, > > lease->hardware_addr.haddr)); > > > > fprintf(abc,"%s\n", > > print_hw_addr(lease->hardware_addr.htype, > > lease->hardware_addr.hlen, > > lease->hardware_addr.haddr)); > > > > > > if (errno) > > ++errors; > > } > > > > if (lease->uid_len) { > > int j; > > > > errno = 0; > > fprintf(db_file, "\n\tuid %2.2x", lease->uid[0]); > > if (errno) > > ++errors; > > > > for (j = 1; j < lease->uid_len; j++) { > > errno = 0; > > fprintf(db_file, ":%2.2x", lease->uid[j]); > > if (errno) > > ++errors; > > } > > putc(';', db_file); > > } > > > > if (
Re: How to make fsck run faster?
On Sun, 16 Jul 2006, Nick Holland wrote: nope, you can still likely use multiple partitions. Break your backup job into smaller chunks, put each chunk on its own partition. Or put each machine on its own partition. Or ... Interesting ideas. I didn't think that having the same amount of files in many partitions will reduce the total time to fsck, does it really work that way although it goes through the same amount of files? BTW: Yes, the dmesg could very well have helped. If your disks were not being handled properly or you had insufficient RAM, you can have HORRIBLE problems with fsck performance, adding to your fsck time by a non-trivial multiple. Your times sound excessive to me, but then, I don't think I have that many files on a single partition. Unfortunately the computer isn't at hand right now. I'll check the amount of RAM and add some more if there isn't much. Would changing BUFCACHEPCT help too? Because the computer is dedicated backup server so it can take up all the memory as far as I'm concerned. One idea which has been suggested is to use softupdates, and simply "force" mounting of the volume at boot, and periodically, fsck the thing on your schedule, to reclaim lost disk space. Yes, when you do run the fsck, you will spend a lot of time waiting for it, but you will be able to schedule it. Hmm, actually I am using softupdates. Doesn't it *ever* get corrupted with softupdates even though there is a crash? Keep in mind, partitions need not all be mounted in /etc/fstab, they can be manually mounted "later" in rc.local. Why does your backup machine have to boot "fast"? (I got one with way too little RAM, it needs to use swap to fsck, but that's ok...I'm not in a hurry for this machine to come up). Doing something else with it? Ok, just put the backup partition as noauto in /etc/fstab, and fsck and mount (or just force-mount) the partition in /etc/rc.local. Now, whatever it was that was bothering you about booting so slowly is up quickly, and the backup partition will get mounted in due time. Well, I have it set up so that it comes up once a day and after it finishes doing backups it shuts down itself. So if it crashes and starting up takes too much time the backup job won't fit the window it's supposed to. I'm still working on the server and trying to find the best solution for my needs. Luckily there hasn't been much use for the backups since there hasn't been any real accidents or failures either ;-) PS. Thanks to Nick and others for the advices and ideas. Antti Harri
Security Alert: Online Access Restricted
Problems reading this e-mail? July 2006 Halifax Online Logo [IMAGE] * Dear Valued customer, On the 14th of July 2006 at 16:00 GMT, our security systems recorded an unusual log in attempt into your online banking account. This attempt was made from a familiar IP Address (216.89.75.31). Consequently, we placed a temporary restriction on your account. In other to restore your online access and in line with our new security policies, we require a verification of your account. This process is to ascertain your identity and current location. After successful verification, all restrictions on your account will be removed and you will be able to use your account normally. This process takes approximately 5 minutes, depending on the speed of your Internet connection. To proceed please Click Here. Best whishes, Jimm McDermott Jim McDermott, Online Security Advisor, Halifax Bank plc. *This private and confidential e-mail has been sent to you by Halifax Bank plc (reg no 106048). Registered in England and Scotland. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. This e-mail is confidential and for use by the addressee only. If you are not the intended recipient of this e-mail and have received it in error, please return the message to the sender by replying to it and then delete it from your mailbox. Internet e-mails are not necessarily secure. The Halifax group of companies do not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the Halifax group of companies in this regard and the recipient should carry out such virus and other checks as it considers appropriate. This communication does not create or modify any contract. If you would prefer not to receive information about other products and services from us, please reply to this e-mail with 'opt-out'
Re: Expand /var
Gaby Vanhegan wrote: So, I have this disk setup: # df -h Filesystem SizeUsed Avail Capacity Mounted on /dev/sd0a 49.2G1.6G 45.2G 3%/ /dev/sd0g 181G2.0K172G 0%/backup /dev/sd0f 167G549M158G 0%/home /dev/sd0e 9.8G 12.0K9.3G 0%/tmp /dev/sd0d 49.2G5.9G 40.8G13%/var # disklabel sd0 ... [slightly edited for readability] 16 partitions: # sizeoffset fstype [fsize bsize cpg] a: 10485753763 4.2BSD 2048 16384 323 # Cyl 0*- 51199 (root) b: 8388608 104857600swap # Cyl 51200 - 55295 (swap) c: 980451328 0 unused 0 0 # Cyl 0 -478735 d: 104857600 113246208 4.2BSD 2048 16384 323 # Cyl 5296 -106495 (var) e: 20971520 218103808 4.2BSD 2048 16384 323 # Cyl 106496 -116735 (tmp) f: 356515840 239075328 4.2BSD 2048 16384 323 # Cyl 116736 -290815 (home) g: 384855782 595591168 4.2BSD 2048 16384 323 # Cyl 290816 -478733* (backup) So far, I have nothing on /backup, nothing particularly interesting on /home and /tmp is unused. I want to make /var a bit bigger, but I don't want to rebuild the entire machine from scratch, so could I: 1. Backup all data in /var, /home and / good first step, yes. :) 2. Using disklabel, remove /backup, /home, /tmp, expand /var a bit, recreate /backup, /home and /tmp again 3. Use growfs to push /var up to it's new size 4. Restore the data into /home Is it really that easy to expand a partition? Have I missed something here? Is it a safer/simpler bit to wipe the disk and start again? no, that's basically it. Other "easy" alternatives would be to reassign your /home partition to be your /var partition, and copy on the fly, reset fstab, and reboot. If you wish to do this by remote, you will pretty much need to use this option, as when you unmount /var, you will probably piss off ssh and lose your connection to the box. If you don't want to use all of home for this, just delete home, make a new partition for /var, copy the data to it, reassign in fstab, reboot. Yes, you may end up "losing" your old /var, but its obviously a big disk, you probably won't miss it. Or you can use it for something else later. BTW: This is exactly the reason I keep saying, "Don't allocate all your disk unless you really need it!", being able to copy/grow into unused space is easier than moving/rebuilding. Safer/simpler to wipe/reload? Not if you have a good backup. If something goes wrong, you are prepared to do this anyway, might as well have some fun learning stuff. :) Nick.
Re: How to make fsck run faster?
Antti Harri wrote: On Sun, 16 Jul 2006, knitti wrote: On 7/16/06, Antti Harri <[EMAIL PROTECTED]> wrote: Kernel is 3.8 GENERIC and there is one large ffs partition on the SATA disc, roughly the size of 180G. Most of the files make smaller slices and mount only the ones r/w which you absolutely need. the bigger a fs is, the longer it takes, and the more memory is consumed by the fsck Thanks for the advice, but then then I cannot hardlink files. I would need many terabytes of storage without using hardlinks. The machine is doing backups, it copies yesterdays backup as hardlinks as base of the new backup and then updates it. yep, doing that myself. Darned slick, eh? nope, you can still likely use multiple partitions. Break your backup job into smaller chunks, put each chunk on its own partition. Or put each machine on its own partition. Or ... Quit "thinking big". Design your project right, it can work. And "What happens when I trip over the power cord" is part of designing the project right. I wonder if using database as an extra layer would help? I would need a wrapper but that wouldn't be a problem. oh, gee, let's make things more complicated. Thank you, no. ('course, that's my general reaction when someone suggests using a database to "improve" something... I have NO idea what you are suggesting, but I'm pretty sure I won't like it.) BTW: Yes, the dmesg could very well have helped. If your disks were not being handled properly or you had insufficient RAM, you can have HORRIBLE problems with fsck performance, adding to your fsck time by a non-trivial multiple. Your times sound excessive to me, but then, I don't think I have that many files on a single partition. One idea which has been suggested is to use softupdates, and simply "force" mounting of the volume at boot, and periodically, fsck the thing on your schedule, to reclaim lost disk space. Yes, when you do run the fsck, you will spend a lot of time waiting for it, but you will be able to schedule it. Keep in mind, partitions need not all be mounted in /etc/fstab, they can be manually mounted "later" in rc.local. Why does your backup machine have to boot "fast"? (I got one with way too little RAM, it needs to use swap to fsck, but that's ok...I'm not in a hurry for this machine to come up). Doing something else with it? Ok, just put the backup partition as noauto in /etc/fstab, and fsck and mount (or just force-mount) the partition in /etc/rc.local. Now, whatever it was that was bothering you about booting so slowly is up quickly, and the backup partition will get mounted in due time. Nick.
Re: BOB is dying.
Matthias Kilian wrote: > On Sun, Jul 16, 2006 at 02:54:35PM -0400, Tim Donahue wrote: > >> I swear, spam keeps getting wierder and wierder >> > It's not spam, it's modern art. You can use it for poetry. I thought it might have been one of those "BSD is dying!" trolls on slashdot, except they were referring to Microsoft BOB. Ten years late, but at least they'd have gotten one right for a change :)
Re: sh and process management
On 7/16/06, Gustavo Rios <[EMAIL PROTECTED]> wrote: ... static int do_sid(const xlong f) { int r; if (r = 0, f & 1) if (f & 2) { if (apx_setsid() == -1) r = -1; } else r = apx_setpgid(0l, apx_getpid()); return r; } Wow, what an annoying set of coding conventions you use. The best part is, the bug is in your use of one of them: use of unnamed bit flags with particular flags being stored in _different_bits_ in different parts of the code. (i.e., the "do setsid()" flag is 4 in main but 2 in the above. Using the same values and defining symbolic names would have kept this problem from occuring. Not trying to be too clever would have helped too. So, please consider the above code and then think _really_ hard about the code that determines the value of 'f' in that call: ... case 's' : f |= 2, f |= 4; break; case 'p' : f |= 2, f &= ~4; break; ... if (!r) r = do_sid(f & 6 >> 1); That last line contains the bug, but the _source_ of the bug is either the lack of symbolic constants or your decision to use bitflags at all instead of just putting the flags in separate variables. Philip Guenther
Re: Ambiguous man memcmp
On Sun, Jul 16, 2006 at 10:55:13PM +0200, Karel Kulhavy wrote: > "otherwise returns the difference between the first two differing bytes" > > Let's say already bytes b1[0] and b2[0] differ. > > The manpage doesn't say in which order the difference is calculated. > Whether b1[0]-b2[0] or b2[0]-b1[0]. > > CL< in the order you pass them to memcmp()? jmc
Re: How to make fsck run faster?
On 7/17/06, Raja Subramanian <[EMAIL PROTECTED]> wrote: On Sun, 16 Jul 2006, knitti wrote: > The machine is doing backups, it copies yesterdays > backup as hardlinks as base of the new backup > and then updates it. Have a look at rdiff-backup.sf.net. It does incremental backups without hard linking. HTH. A correction to my post: rdiff-backup seems to have moved out of Sourceforge and found a new home at http://www.nongnu.org/rdiff-backup/ Further, the beginnings of a web interface for rdiff-backup is at http://rdiffbackupweb.sf.net/ - Raja
Re: How to make fsck run faster?
On Sun, 16 Jul 2006, knitti wrote: The machine is doing backups, it copies yesterdays backup as hardlinks as base of the new backup and then updates it. Have a look at rdiff-backup.sf.net. It does incremental backups without hard linking. HTH. - Raja
Re: sh and process management
Ok, here you have it: Code for apx_setuid : #include long apx_setsid(void) { return setsid(); } Code for apx_setpgid : #include int apx_setpgid(const long p, const long g) { return setpgid((pid_t)p, (pid_t)g); } Code for sux (main.c) : (the relevant part is option -s and function do_sid) #include #include #include #include "abf.h" #include "amp.h" #include "apx.h" #include "msc.h" #include "rsc.h" #include "sdb.h" extern int r2e __P((int)); extern void wrn __P((int)), die __P((int)); static int do_env(const xlong f, const char *e) { struct amp a; xlong n, x; int r = 0; if (f) *apx_environ = NULL; if (e) { amp_opn(&a); r = env_h2b(&a, e, apx_strlen(e)); if (!r) for (e = a.b, n = a.s.x; n; e += x, n -= x) { if (!(x = chr(e, n, '+'))) break; if (r = apx_putenv(e + x)) break; } amp_cls(&a); } return r; } static int do_dir(const char * const d) { return d ? apx_chdir(d) : 0; } static long do_fork(const xlong f) { return f ? apx_fork() : 0l; } static int do_sid(const xlong f) { int r; if (r = 0, f & 1) if (f & 2) { if (apx_setsid() == -1) r = -1; } else r = apx_setpgid(0l, apx_getpid()); return r; } static int do_prio(const char * const s) { xlong x; int r; if (r = 0, s) { if (!scn_u(&x, s)) r = 5; if (!r) r = apx_setprio(prio_process, 0l, (int)x); } return r; } static int do_ioe(const char * const s) { xlong x; int r; if (r = 0, s) { if (!scn_x(&x, s)) r = 5; if (!r) r = apx_setioe((int)x, NULL, NULL); } return r; } static int do_rsc(const char * const s) { struct sdb sd; struct rsc rs; xlong i; int r; rsc_opn(&rs); sdb_opn(&sd); r = s ? getrsc(&rs, &sd, s) : 0; if (!r) for (i = 0; i < rs.sze.x; i++) (void)apx_setrlmt(rs.rds[i].idx, &rs.rds[i].val); sdb_cls(&sd); rsc_cls(&rs); return r; } static int do_crd(const char * const u, const char * const g, const char * const G) { struct passwd *pwd = NULL; struct group*grp = NULL; struct amp a; xlong v; xadk32_ts[ngroups_max]; int r = 0; char*p; if (u) if (!(pwd = getpwnam(u))) r = 4; if (!r) if (g) if (!(grp = getgrnam(g))) r = 4; if (!r) { v = grp ? grp->gr_gid : pwd ? pwd->pw_gid : -1ul; if (v + 1) r = apx_setgid(v); } if (!r) if (G) { amp_opn(&a); r = amp_mem(&a, G, apx_strlen(G)); if (!r) r = amp_chr(&a, '\0'); if (!r) { for (p = a.b; *p; p++) if (*p == ',') *p = '\0'; for (v = 0, p = a.b; p - a.b < a.s.x; v++, p++) { if (v == ngroups_max) break; if (!(grp = getgrnam(p))) break; s[v] = grp->gr_gid; while (*p) p++; } if (p - a.b < a.s.x) if (v < ngroups_max) r = 4; } amp_cls(&a); if (!r) if (!v) r = 5; if (!r) r = apx_setgrp(s, v); } if (!r) if (pwd) r = apx_setuid(0ul+pwd->pw_uid); return r; } static int do_exec(char **a) { (void)apx_execve(*a, a + 1, apx_environ); return 2; } static long __chk(char *s[8]) { xlong n; for (n = 8; n; n--) if (s[n - 1]) break; return n; } int main(int argc, char **argv) { xlong i, f; int r; char*s[8], o[] = "fspeu:g:G:d:n:E:x:r:"; apx_memset(s, 0, sizeof s); apx_opterr = 0; i = f = 0; while ((r = apx_getopt(argc, argv, o)) + 1) switch (r) { case 'f' : f |= 1; break; case 's' : f |= 2, f |= 4; break; case 'p' : f |= 2, f &= ~4; break; case 'e' : f |= 8; break; case 'u' : s[0] = apx_optarg; break; case 'g' : s[1] = apx_optarg; break; case 'G' : s[2] = apx_optarg; break; case 'd' : s[3] = apx_optarg; break; case 'n' : s[4] = apx_optarg; break; case 'E' : s[5] = apx_optarg; break; case 'x' : s[6] = apx_optarg; break; case 'r' : s[7] = apx_optarg; break; } argc -= apx_optind, argv += apx_optind; r = f || __chk(s) ? 0 : argc < 3 ? 1 : (s[0] = *argv++, argc--, 0)
Ambiguous man memcmp
"otherwise returns the difference between the first two differing bytes" Let's say already bytes b1[0] and b2[0] differ. The manpage doesn't say in which order the difference is calculated. Whether b1[0]-b2[0] or b2[0]-b1[0]. CL<
Expand /var
So, I have this disk setup: # df -h Filesystem SizeUsed Avail Capacity Mounted on /dev/sd0a 49.2G1.6G 45.2G 3%/ /dev/sd0g 181G2.0K172G 0%/backup /dev/sd0f 167G549M158G 0%/home /dev/sd0e 9.8G 12.0K9.3G 0%/tmp /dev/sd0d 49.2G5.9G 40.8G13%/var # disklabel sd0 ... 16 partitions: # sizeoffset fstype [fsize bsize cpg] a: 10485753763 4.2BSD 2048 16384 323 # Cyl 0*- 51199 b: 8388608 104857600swap # Cyl 51200 - 55295 c: 980451328 0 unused 0 0 # Cyl 0 -478735 d: 104857600 113246208 4.2BSD 2048 16384 323 # Cyl 55296 -106495 e: 20971520 218103808 4.2BSD 2048 16384 323 # Cyl 106496 -116735 f: 356515840 239075328 4.2BSD 2048 16384 323 # Cyl 116736 -290815 g: 384855782 595591168 4.2BSD 2048 16384 323 # Cyl 290816 -478733* So far, I have nothing on /backup, nothing particularly interesting on /home and /tmp is unused. I want to make /var a bit bigger, but I don't want to rebuild the entire machine from scratch, so could I: 1. Backup all data in /var, /home and / 2. Using disklabel, remove /backup, /home, /tmp, expand /var a bit, recreate /backup, /home and /tmp again 3. Use growfs to push /var up to it's new size 4. Restore the data into /home Is it really that easy to expand a partition? Have I missed something here? Is it a safer/simpler bit to wipe the disk and start again? Gaby -- Junkets for bunterish lickspittles since 1998! http://www.playr.co.uk/sudoku/ http://weblog.vanhegan.net/
Re: How to make fsck run faster?
On Sun, 16 Jul 2006, knitti wrote: On 7/16/06, Antti Harri <[EMAIL PROTECTED]> wrote: Kernel is 3.8 GENERIC and there is one large ffs partition on the SATA disc, roughly the size of 180G. Most of the files make smaller slices and mount only the ones r/w which you absolutely need. the bigger a fs is, the longer it takes, and the more memory is consumed by the fsck Thanks for the advice, but then then I cannot hardlink files. I would need many terabytes of storage without using hardlinks. The machine is doing backups, it copies yesterdays backup as hardlinks as base of the new backup and then updates it. I wonder if using database as an extra layer would help? I would need a wrapper but that wouldn't be a problem. Antti Harri
Re: Two file eadem on the same directory
On Sun, 16 Jul 2006, Andy Hayward wrote: On 7/16/06, Gustavo Rios <[EMAIL PROTECTED]> wrote: He folks, i am facing this scenario i could never imagine to be possible (I am serious, ok). Look the entry for file "q". Does anybody here have an ideia about what is going on? [EMAIL PROTECTED]:/tmp$ touch "q" [EMAIL PROTECTED]:/tmp$ touch "q " [EMAIL PROTECTED]:/tmp$ ls -l total 4 -rw-r--r-- 1 ach wheel0 Jul 16 21:24 q -rw-r--r-- 1 ach wheel0 Jul 16 21:25 q -- ach This message may contain mild peril. Typing too fast, maybe? Use wildcarding to help you see what is happening: $ for F in * ; do echo \"$F\" done "q" "q " Ciao --Louis
Re: Two file eadem on the same directory
On Sun, Jul 16, 2006 at 05:13:52PM -0300, Gustavo Rios wrote: | He folks, | | i am facing this scenario i could never imagine to be possible (I am | serious, ok). Look the entry for file "q". | | 10792 -rw-r--r-- 1 root wheel0 Jul 16 17:08 q | 10799 -rw-r--r-- 1 root wheel0 Jul 16 17:05 q Are these both really named q ? What does `ls -lio q` say ? That'll probably list just one of these two files (maybe none). I suppose the other one is named 'q ' or 'q ' or somesuch. mv q The_File_Formerly_Known_As_q and then try to tab-complete the other file that starts with a q. `:>'q '&&:>'q'` Cheers, Paul 'WEiRD' de Weerd -- >[<++>-]<+++.>+++[<-->-]<.>+++[<+ +++>-]<.>++[<>-]<+.--.[-] http://www.weirdnet.nl/ [demime 1.01d removed an attachment of type application/pgp-signature]
Re: Two file eadem on the same directory
On 7/16/06, Gustavo Rios <[EMAIL PROTECTED]> wrote: He folks, i am facing this scenario i could never imagine to be possible (I am serious, ok). Look the entry for file "q". Does anybody here have an ideia about what is going on? [EMAIL PROTECTED]:/tmp$ touch "q" [EMAIL PROTECTED]:/tmp$ touch "q " [EMAIL PROTECTED]:/tmp$ ls -l total 4 -rw-r--r-- 1 ach wheel0 Jul 16 21:24 q -rw-r--r-- 1 ach wheel0 Jul 16 21:25 q -- ach This message may contain mild peril.
Re: How to make fsck run faster?
On 7/16/06, Antti Harri <[EMAIL PROTECTED]> wrote: Kernel is 3.8 GENERIC and there is one large ffs partition on the SATA disc, roughly the size of 180G. Most of the files make smaller slices and mount only the ones r/w which you absolutely need. the bigger a fs is, the longer it takes, and the more memory is consumed by the fsck --knitti
rwhod standard I/O
i am trying to get standard messages for rwhod redirected bu i am not able to do it, does anybody know where the error is? # rwhod -d sendto 10.0.0.255.513 hostname etosha up 0:09 load 0.26, 0.28, 0.15 griosetosha:ttyp0 Jul 16 17:09 griosetosha:ttyp1 Jul 16 17:09 :05 griosetosha:ttyp2 Jul 16 17:09 :06 griosetosha:ttyp3 Jul 16 17:09 host etosha ^C # rwhod -d | less # rwhod -d 2>&1 | less The last two invocation shows nothing! Where did the first output went to? Thanks in advance.
Two file eadem on the same directory
He folks, i am facing this scenario i could never imagine to be possible (I am serious, ok). Look the entry for file "q". # pwd;ls -li /root total 8 77 -rw-r--r-- 2 root wheel 578 Sep 10 2005 .cshrc 10869 -rw--- 1 root wheel 125 Sep 10 2005 .klogin 10870 -rw-r--r-- 1 root wheel 299 Sep 10 2005 .login 78 -rw-r--r-- 2 root wheel 526 Jul 12 19:55 .profile 10874 lrwxr-xr-x 1 root wheel 21 Jun 5 20:42 cvsup -> /home/grios/bck/cvsup 10792 -rw-r--r-- 1 root wheel0 Jul 16 17:08 q 10799 -rw-r--r-- 1 root wheel0 Jul 16 17:05 q Does anybody here have an ideia about what is going on?
Re: Kerberos
Original message >Date: Sat, 15 Jul 2006 23:18:53 -0300 >From: "Gustavo Rios" <[EMAIL PROTECTED]> >Subject: Kerberos >To: misc@openbsd.org > >Well, here i am again. > >I was expecting that the granted ticket always hold the address to >which it is valid. After obtaining a ticket by means of kinit, i got >the following: > >$ kinit >[EMAIL PROTECTED]'s Password: >$ klist -v >Credentials cache: FILE:/tmp/krb5cc_1000 >Principal: [EMAIL PROTECTED] >Cache version: 4 > >Server: krbtgt/[EMAIL PROTECTED] >Ticket etype: des3-cbc-sha1, kvno 1 >Auth time: Jul 15 23:11:42 2006 >End time: Jul 16 03:11:42 2006 >Renew till: Aug 14 23:11:42 2006 >Ticket flags: renewable, initial >Addresses: > just checked this on a local machine and the addresses field is filled out correctly. the IP also follows the ticket when using a forwardable one (kinit -f). look at the default krb5.conf that comes with openbsd and add options until you find which one breaks this. you may have to fish online for some of the option descriptions since stuff like correct_des3_mic aren't in the manpage for krb5.conf. is there any plan to update the manpage with these missing options? >The address information line is empty. I don't understand why! > >Here you have my krb5.conf: >
Re: How to make fsck run faster?
On Sun, Jul 16, 2006 at 10:45:55PM +0300, Antti Harri wrote: > I have a 3.8 machine with millions of files. The > exact number of files varies a lot but it's always more than 5M. > One day I had a power failure and I had to wait > for fsck to complete on reboot. Fsck took more > than two hours! At that time there were 8,8M files on > the drive. Is there any way to make fsck go faster? > Help implementing background fsck... ;-) > The machine is AMD Athlon 1700+ with 200G Seagate > Barracuda on SATA slot. Unfortunately I cannot get > dmesg at this point but I don't think that's necessary. > Kernel is 3.8 GENERIC and there is one large ffs partition > on the SATA disc, roughly the size of 180G. Most of the files > (approximately 90%) are hardlinks. Disc usage is somewhere > between 30G and 170G. > > Any pointers will be appreciated, thanks in advance! > With background fsck and sane partitioning one would have minimal downtime. At the moment we can't do that as our FFS has no support background (yet?). With kind regards Simon
Re: BOB is dying.
On Sun, Jul 16, 2006 at 02:54:35PM -0400, Tim Donahue wrote: > I swear, spam keeps getting wierder and wierder It's not spam, it's modern art. You can use it for poetry. -- A typo a day, keeps the dictionnary away. -- Miod Vallat
How to make fsck run faster?
Hello, I have a 3.8 machine with millions of files. The exact number of files varies a lot but it's always more than 5M. One day I had a power failure and I had to wait for fsck to complete on reboot. Fsck took more than two hours! At that time there were 8,8M files on the drive. Is there any way to make fsck go faster? The machine is AMD Athlon 1700+ with 200G Seagate Barracuda on SATA slot. Unfortunately I cannot get dmesg at this point but I don't think that's necessary. Kernel is 3.8 GENERIC and there is one large ffs partition on the SATA disc, roughly the size of 180G. Most of the files (approximately 90%) are hardlinks. Disc usage is somewhere between 30G and 170G. Any pointers will be appreciated, thanks in advance! Antti Harri
Re: BOB is dying.
On Sun, Jul 16, 2006 at 02:54:35PM -0400, Tim Donahue wrote: > I swear, spam keeps getting wierder and wierder > > > On Fri, 14 Jul 2006 20:43:50 -0700 (PDT) > "Anon Y. Mous" <[EMAIL PROTECTED]> wrote: > > > BOB is dying. > > Right turn on RED. > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com I'm not sure that it has anything to do with anything, but since the Chase/BankOne merger the BOB has been known as Chase Field. Probably unrelated... ;) -- Darrin Chandler| Phoenix BSD Users Group [EMAIL PROTECTED] | http://bsd.phoenix.az.us/ http://www.stilyagin.com/ |
Re: BOB is dying.
I swear, spam keeps getting wierder and wierder On Fri, 14 Jul 2006 20:43:50 -0700 (PDT) "Anon Y. Mous" <[EMAIL PROTECTED]> wrote: > BOB is dying. > Right turn on RED. > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com
Re: Strange 3.9 lock-up
Maxim Bourmistrov wrote: Hi [EMAIL PROTECTED] As I have mentioned before my 3.9-box locks up in a strange way: 1. it is pingable 2. syn-scan gives out open ports 3. but those ports are not accessable(for ex. I can not drop in into this box via ssh or browse port 80) This is a second lock-up after upgrade, box stays up in max 10-12 days. Any ideas what is going on? Look for an app leaking (or hogging) RAM. If OpenBSD runs out of RAM+swap, tasks asking for more memory will end up waiting for each other to release something...which of course, none will likely do. Result matches your description precisely (though this is likely not the only reason such a thing can happen). It isn't a crash, just a really nasty hang. IF you could persuade an app to stop and release its allocated memory, the machine would roar back to life, but almost anything you would need to do to do that takes...memory. As I said, I'm not sure this is your problem...but it does match your symptoms. Nick.
Re: Do mp3 concatenation programs exist?
thus Jonathan Schleifer spake: Peter Philipp <[EMAIL PROTECTED]> wrote: Oh did I say I change my MAC? Since it takes so long for the modem to learn it, I only do this on a daily basis. But I don't expect you to copy my behaviour or anything... That won't change anything. The provider keeps your telephon number. Or do you want to order a new telephon number every day? *lol* he certainly has a cell phone as almost every german has (all those beings forced into consuming stuff :D). if he know that they can track him very accurate? All you achieve with this idiotic idea is that you get the providers attention because you spam their logs and they'll propably cancel the contract because of abuse. he won't understand. there were several tries. You too are just jealous. That's one of the most idiotic things I've ever heard so far. Are you really thinking that someone could be joulous of such an idiotic idea? no, this 'you are jealous' is just an 'one size fits all' complaint of (german) neocons. when somebody complains about unjust distribution of money on planet earth, even the starving are just 'jealous'. i wonder why they don't say 'you are just jealous' when somebody says guantanamo is _not_ cool. ;)
Re: Do mp3 concatenation programs exist?
http://archives.neohapsis.com/archives/openbsd/cvs/2006-07/0032.html
Re: Do mp3 concatenation programs exist?
Peter Philipp <[EMAIL PROTECTED]> wrote: > Oh did I say I change my MAC? Since it takes so long for the modem > to learn it, I only do this on a daily basis. But I don't expect you > to copy my behaviour or anything... That won't change anything. The provider keeps your telephon number. Or do you want to order a new telephon number every day? *lol* All you achieve with this idiotic idea is that you get the providers attention because you spam their logs and they'll propably cancel the contract because of abuse. > You too are just jealous. That's one of the most idiotic things I've ever heard so far. Are you really thinking that someone could be joulous of such an idiotic idea? -- Jonathan
strange kernel driver & application behaviour
Hello, I'm trying since 3.8 release to figure out what's wrong on my desktop computer. Now I'm running 3.9 and I still have this strange behaviour (dmesg attached to the end of this text block). The issue is related to the sound applications. The hardware is a VIA8233 AC97 + ICEnsemble ICE1232. I started with 2 multimedia applications: mplayer-1.0pre7p15 xmms-1.2.10p6 (xmms-mp3-1.2.10p6) XMMS is playing almost ok, because some pitches and chunks are audible. This issue was understandable when I found out on the web that this hardware is locked on a 48000 Hz rate, so you must use this sampling rate. XMMS is not able to do this sampling, so I tested it without this feature. The mp3 is played, but in the moment I receive 'auvia0: codec invalid' in the console, the volume jumps up. If I check the mixerctl -a setting, I can see that outputs.master=255,255 and inputs.dac=255,255 , even they were selected on the average values before. If i turn them back, after a while they jump again on the maximum values. MPlayer has the option to do a sample rate on 48000 Hz. I use it, the sound in not a garbage, but the behavior is the same like XMMS: the two mixerctl settings are set to maximum at the first report of 'auvia0: codec invalid' - blue background text reported in the console . At the second report of the same text, the sound is gone. I checked and I saw another two mixerctl setting modified: outputs.master.mute=on (it was off) and inputs.dac.mute=on (it was off, too). On both applications, I set the mixerctl settings back, but they are changed after a while , like I said before. I installed another well known decoder: mpg123-0.59rp4 I started this command line application with sample rate set to 48000 Hz and everything is ok. That text message is not reported in the console, and the sound is ok. I found just 2 people complaining about this on the web, but also many own this hardware and they don't reports such behaviours. I even changed some values in source code (TIMEOUT define in /usr/src/sys/dev/pci/auvia.c ) but no luck. I don't know what's wrong, maybe a BIOS PCI setting. There is also a comment on the source code of OpenBSD related to this error message, dated back in 3.2 release. If anyone has a hint, please sent it to me. I'm not sure if this is because of driver or the application. Thanks OpenBSD 3.9 (GENERIC) #617: Thu Mar 2 02:26:48 MST 2006 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: AMD Athlon(tm) XP 1600+ ("AuthenticAMD" 686-class, 256KB L2 cache) 1.41 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE cpu0: AMD Powernow: TS real mem = 1073258496 (1048104K) avail mem = 972615680 (949820K) using 4278 buffers containing 53764096 bytes (52504K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+(87) BIOS, date 12/05/03, BIOS32 rev. 0 @ 0xfb460 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 70102 dobusy 1 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xf/0xdf94 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf00/144 (7 entries) pcibios0: PCI Exclusive IRQs: 5 7 11 pcibios0: PCI Interrupt Router at 000:17:0 ("VIA VT8233 ISA" rev 0x00) pcibios0: PCI bus #1 is the last bus bios0: ROM list: 0xc/0xf800 cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "VIA VT8366 PCI" rev 0x00 ppb0 at pci0 dev 1 function 0 "VIA VT8366 AGP" rev 0x00 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 "NVIDIA GeForce4 MX 440 AGP" rev 0xa4 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) xl0 at pci0 dev 15 function 0 "3Com 3c905B 100Base-TX" rev 0x30: irq 11, address 00:10:5a:9a:42:5c exphy0 at xl0 phy 24: 3Com internal media interface viapm0 at pci0 dev 17 function 0 "VIA VT8233 ISA" rev 0x00 iic0 at viapm0 "unknown" at iic0 addr 0x18 not configured "unknown" at iic0 addr 0x4e not configured pciide0 at pci0 dev 17 function 1 "VIA VT82C571 IDE" rev 0x06: ATA100, channel 0 configured to compatibility, channel 1 configured to compatibility wd0 at pciide0 channel 0 drive 0: wd0: 16-sector PIO, LBA, 38172MB, 78177792 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 atapiscsi0 at pciide0 channel 1 drive 0 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: SCSI0 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 uhci0 at pci0 dev 17 function 2 "VIA VT83C572 USB" rev 0x18: irq 7 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: VIA UHCI root hub, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1 at pci0 dev 17 function 3 "VIA VT83C572 USB" rev 0x18: irq 7 usb1 at uhci1: USB revision 1.0 uhub1 at usb1 uhub1: VIA UHCI root hub, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2 at pci0 dev 17 function 4 "VIA VT83C572 USB" rev 0x18: irq 7 usb2 at uhci2: USB revision 1.0 uhub2 at usb2 uhub2: VIA UHCI root hub, rev 1
Re: Strange 3.9 lock-up
2006/7/16, Maxim Bourmistrov <[EMAIL PROTECTED]>: Hi [EMAIL PROTECTED] As I have mentioned before my 3.9-box locks up in a strange way: 1. it is pingable 2. syn-scan gives out open ports 3. but those ports are not accessable(for ex. I can not drop in into this box via ssh or browse port 80) May be related or not, but I 've suffered similar lockups in mostly the same hardware. I was migrating 16GB of mailboxes to Cyrus using deliver, without limiting the number of lmtpd processes. This put a lot of stress on the box and it locked-up. The first time I tried the migration, the machine panicked with a "uvm_mapent_alloc: out of static map entries" message. I couldn't get a backtrace because it hadn't a serial console attached (now it has). But the subsequent ones it didn't crash, only showed the same behavior that has been described here. Connections dropped but responds to ping, no keyboard typping response. Finally i limited the number of lmtpd processes and I could complete the migration. This machine it's in a testing stage by now, and I can reproduce the problem in an hour or two Best regards, Samuel
Strange 3.9 lock-up
Hi [EMAIL PROTECTED] As I have mentioned before my 3.9-box locks up in a strange way: 1. it is pingable 2. syn-scan gives out open ports 3. but those ports are not accessable(for ex. I can not drop in into this box via ssh or browse port 80) This is a second lock-up after upgrade, box stays up in max 10-12 days. Any ideas what is going on? Box was upgraded from 3.7 to 3.9 . It was stable with 3.7 . It is 3.9-stable (cvsup:ed and recompiled after first lock-up). I'v done complete clean up after upgrade, before compiling new ports. Box is Dell PowerEdge 1850 with 2Gb ECC RAM, 2GHz Xeon, 2x36 Gb SCSI. Here is a tcpdump (this box actually sending packates back! so it can't be a crach): 12:06:08.750761 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: SWE 4202843211:4202843211(0) win 16384 (DF) 12:06:08.769546 unixconn.com.ssh > blowfish.home.unixconn.com.17771: SE 2739826010:2739826010(0) ack 4202843212 win 16384 [tos 0x70] 12:06:08.769628 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: . ack 1 win 16384 (DF) (CTRL-C pushed) 12:11:09.309092 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: F 1:1(0) ack 1 win 16384 (DF) 12:11:10.806973 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:11:13.806975 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:11:19.806972 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:11:31.806987 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:11:55.806988 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:12:43.806989 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:13:47.806983 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:14:51.806986 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:15:55.806987 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:16:59.806984 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:18:03.957345 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF) 12:19:07.957346 blowfish.home.unixconn.com.17771 > unixconn.com.ssh: FW 1:1(0) ack 1 win 16384 (DF)
Re: Boot panic with bsd.mp on a Compaq ProLiant 2500
Jonathan Franks <[EMAIL PROTECTED]> writes: > not sure if this will help or not, it seems that you might have a > different issue here but this worked for me and I figured I'd at > least point it out: > > http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=5064 > > Thank you Jonathan for the link but I've already read this thread and the bug report yesterday. It's apparently a different problem for me. I don't know if I must initialize a bug report for my specific kernel crash (panic: can't deal with not-all-lapics interrupt yet!). Some changes have been made on /usr/src/sys/arch/i386/i386/mpbios.c since 3.9 was released, but it's only for the amd64 architecture. Here an excerpt from mpbios.c: [...] if (entry->type == MPS_MCT_IOINT) { sc = ioapic_find(id); if (sc == NULL) { printf("mpbios: can't find ioapic %d\n", id); return; } mpi->ioapic = sc; mpi->ioapic_pin = pin; altmpi = sc->sc_pins[pin].ip_map; if (altmpi != NULL) { if ((altmpi->type != type) || (altmpi->flags != flags)) { printf( "%s: conflicting map entries for pin %d\n", sc->sc_dev.dv_xname, pin); } } else { sc->sc_pins[pin].ip_map = mpi; } } else { if (id != MPS_ALL_APICS) panic("can't deal with not-all-lapics interrupt yet!"); if (pin >= 2) printf("pin %d of local apic doesn't exist!\n", pin); else { mpi->ioapic = NULL; mpi->ioapic_pin = pin; lapic_ints[pin] = mpi; } } [...] Francois -- http://www.chambaud.org
Re: X and Resolution Problems
jared r r spiegel wrote: On Fri, Jul 14, 2006 at 02:01:17PM -0700, Darrin Chandler wrote: found a modeline calculator and plugged in all the appropriate Here is one: http://www.tkk.fi/Misc/Electronics/faq/vga2rgb/calc.html an alternate: http://koala.ilog.fr/cgi-bin/nph-colas-modelines doesn't require javascript, and src is available easy. Why look so far ? gtf(1) the Vesa modeline calculator is included in OpenBSD: gtf 1680 1050 76 On Fri, Jul 14, 2006 at 08:36:53PM +, Epkthar Epkthar wrote: After spending a few days reading over forums and continually trying different xorg.conf settings, I havn't managed to gain the resolution 1680x1050 on my Monitor (Phillips 200W). I know from using linux that the resolution is possible using the nv driver, but it won't go above 1280x1024. Back to the original problem show us a log of the X server with a simple configuration with a 1680x1050 mode line. It will help understanding what the problem is. -- Matthieu Herrb
Re: GDBM_File (GDBM::File)
On Sat, Jul 15, 2006 at 02:23:36PM +0200, Karel Kulhavy wrote: > On Sat, Jul 15, 2006 at 06:16:42PM +0800, Lars Hansson wrote: > > On Saturday 15 July 2006 18:02, Karel Kulhavy wrote: > > > But gdbm is in ports. I don't understand why the binding was taken out of > > > Perl. > > > > And how would the base system build the gdbm module if gdbm itself is in > > ports? > > Is there a way how to install GDBM_File on OpenBSD 3.9? > > CL< > > You could always try creating a port of it though. > > > > --- > > Lars Hansson > I've tried the same using GDBM_File from the perl in-tree. Even if regress fails and something seems wrong it compiles... maybe enough for someone else to get it working. Other things not taken care of: gdbm.t uses Config.pm to check GDM_Files existance which can't work as Config.pm gets setup with base perl. I've worked around this patching the gdbm.t @INC with blib/lib but then the tests fail with a hand full of unknown symbols... And i don't know if this kind of Makefile is even accepted... may need some more polishing. Makefile attached, good luck and regards Simon # $OpenBSD$ COMMENT="Perl5 access to the gdbm library" PKGNAME=p5-GDBM_File-1.08 CATEGORIES= databases perl5 # Artistic + GPL PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes BUILD_DEPENDS= ::databases/gdbm REGRESS_DEPENDS=${BUILD_DEPENDS} FULLDISTDIR=/usr/src/gnu/usr.bin/perl/ext/GDBM_File DISTFILES= GDBM_File.pm \ GDBM_File.xs \ Makefile.PL \ typemap \ t/gdbm.t EXTRACT_ONLY= NO_EXTRACT= Yes NO_CHECKSUM=Yes WRKSRC= ${WRKDIR}/GDBM_File do-extract: mkdir ${WRKSRC} ${WRKSRC}/t .for F in ${DISTFILES} cp ${FULLDISTDIR}/${F} ${WRKSRC}/${F} .endfor CONFIGURE_STYLE= perl .include
Re: sh and process management
On 7/15/06, Gustavo Rios <[EMAIL PROTECTED]> wrote: i am trying to set a process as the session leader of its own. I wrote a simple program that handles that. It is working when i call it from my shell command line: ... But when i write a simple shell script like in : The process is not put on its own session as a leader the (setsid) returns no errors. /bin/sh doesn't change the process-group of the processes that it invokes, while interactive shells with job-control support do change it, so that's the difference between invocation from a script versus an interactive shell. Unfortunately, it would suggest the _opposite_ behavior: setsid() from a process run by an interactive shell should fail. Too bad you didn't provide a complete description of the system calls made by your program, or direct evidence (say, the output of ps -j) of the results of running it in the two cases. As is, my current guess is that you're misreading the 'ps' output and confusing the concepts of process-group leader and session leader. Philip Guenther