From owner-freebsd-smp@FreeBSD.ORG Sun Mar 28 02:50:39 2004 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC48816A4CE for ; Sun, 28 Mar 2004 02:50:39 -0800 (PST) Received: from web42005.mail.yahoo.com (web42005.mail.yahoo.com [66.218.93.173]) by mx1.FreeBSD.org (Postfix) with SMTP id DB7C943D2D for ; Sun, 28 Mar 2004 02:50:39 -0800 (PST) (envelope-from jpande_techinfo@yahoo.com) Message-ID: <20040328105039.64843.qmail@web42005.mail.yahoo.com> Received: from [202.177.170.209] by web42005.mail.yahoo.com via HTTP; Sun, 28 Mar 2004 02:50:39 PST Date: Sun, 28 Mar 2004 02:50:39 -0800 (PST) From: jitendra pande To: freebsd-smp@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Problem with usb in FreeBSD 4.8....help!!! X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2004 10:50:40 -0000 Hi, I have stuck with a problem with usb devices. In case of FreeBSD 4.8, whenever a new USB device is attached to the system, no device node is dynamically being created within the dev file system. This is in contrast to the behavior there with FreeBSD 5.0 where a new device node is being created on attaching a new USB device, Fox example when first USB device is attached then /dev/ugen0 node is created dynamically in dev file system. when 2nd device is added then /dev/ugen1 and so on .....ugen2, ugen3....... On the other hand with freeBSD 4.8 there exist some static device node /dev/ugen0, /dev/ugen0.x where x =1-16 within the /dev file system. My application uses libusb for iinteracting with the usb devices...libusb on freeBSD 4.8 tries to find /debv/ugen0, /dev/ugen1 and so on....hence couldn't able to detect more then one device. It would really be great if someone can help me in resolving the issue Any idea why this changes in the behavior with FreeBSD 4.8 and FreeBSD 5.0 Any help will be highly appreciated. Thanks Jitendra --------------------------------- Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. From owner-freebsd-smp@FreeBSD.ORG Sun Mar 28 05:37:14 2004 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 321B716A4CE for ; Sun, 28 Mar 2004 05:37:14 -0800 (PST) Received: from ms-smtp-01-eri0.southeast.rr.com (ms-smtp-01-lbl.southeast.rr.com [24.25.9.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6C9043D31 for ; Sun, 28 Mar 2004 05:37:13 -0800 (PST) (envelope-from mmercer@nc.rr.com) Received: from [192.168.1.8] (rdu57-94-039.nc.rr.com [66.57.94.39]) i2SDbASm023721; Sun, 28 Mar 2004 08:37:10 -0500 (EST) From: "Michael E. Mercer" To: jitendra pande In-Reply-To: <20040328105039.64843.qmail@web42005.mail.yahoo.com> References: <20040328105039.64843.qmail@web42005.mail.yahoo.com> Content-Type: text/plain Message-Id: <1080481032.802.15.camel@fast.mmercer.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sun, 28 Mar 2004 08:37:12 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine cc: freebsd-smp@freebsd.org Subject: Re: Problem with usb in FreeBSD 4.8....help!!! X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-smp@freebsd.org List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2004 13:37:14 -0000 Dynamically created device nodes are new in 5.x stream. You must use MAKEDEV located in /dev to create whatever nodes you need in 4.x and earlier. HTH Michael On Sun, 2004-03-28 at 05:50, jitendra pande wrote: > Hi, > > I have stuck with a problem with usb devices. > > In case of FreeBSD 4.8, whenever a new USB device is attached to the system, no device node is dynamically being created within the dev file system. > > This is in contrast to the behavior there with FreeBSD 5.0 where a new device node is being created on attaching a new USB device, Fox example when first USB device is attached then /dev/ugen0 node is created dynamically in dev file system. when 2nd device is added then /dev/ugen1 and so on .....ugen2, ugen3....... > > On the other hand with freeBSD 4.8 there exist some static device node /dev/ugen0, /dev/ugen0.x where x =1-16 within the /dev file system. > > My application uses libusb for iinteracting with the usb devices...libusb on freeBSD 4.8 tries to find /debv/ugen0, /dev/ugen1 and so on....hence couldn't able to detect more then one device. > > It would really be great if someone can help me in resolving the issue Any idea why this changes in the behavior with FreeBSD 4.8 and FreeBSD 5.0 > > Any help will be highly appreciated. > > > Thanks > Jitendra > > > > > > > > > > > > > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Finance Tax Center - File online. File on time. > _______________________________________________ > freebsd-smp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-smp > To unsubscribe, send any mail to "freebsd-smp-unsubscribe@freebsd.org" From owner-freebsd-smp@FreeBSD.ORG Wed Mar 31 12:55:51 2004 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1584E16A4CE for ; Wed, 31 Mar 2004 12:55:51 -0800 (PST) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id E453643D39 for ; Wed, 31 Mar 2004 12:55:50 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 17168 invoked from network); 31 Mar 2004 20:55:50 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 31 Mar 2004 20:55:50 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i2VKsMDI048661; Wed, 31 Mar 2004 15:55:32 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: smp@FreeBSD.org Date: Tue, 30 Mar 2004 19:12:02 -0500 User-Agent: KMail/1.6 References: <6.0.1.1.1.20040327201519.044ba550@imap.sfu.ca> In-Reply-To: <6.0.1.1.1.20040327201519.044ba550@imap.sfu.ca> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403301912.02191.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Colin Percival Subject: Re: locking primatives X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2004 20:55:51 -0000 On Saturday 27 March 2004 03:33 pm, Colin Percival wrote: > I'm trying to implement a callout_stop_safe() function > (same as callout_stop(), except that it would wait for the > callout to finish if it is currently in progress) in order > to get around a rather nasty panic in the kqueue code. All > I need to do is block until the softclock thread reaches a > specified point -- this is pretty much the simplest locking > problem possible. > Is there any introduction to the various locking methods > which would give me some indication of which one I should > use? Heh, it's actually not a trivial problem. For one way of dealing with this race, see the TDF_TIMOFAIL / TDF_TIMEOUT handling stuff in subr_sleepqueue.c. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-smp@FreeBSD.ORG Wed Mar 31 22:36:52 2004 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 644D716A4DE; Wed, 31 Mar 2004 22:36:52 -0800 (PST) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id A87BD43D3F; Wed, 31 Mar 2004 22:36:51 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])i316ao4u025594; Thu, 1 Apr 2004 16:36:50 +1000 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i316alsg017285; Thu, 1 Apr 2004 16:36:48 +1000 Date: Thu, 1 Apr 2004 16:36:47 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: John Baldwin In-Reply-To: <200403301912.02191.jhb@FreeBSD.org> Message-ID: <20040401162351.C5418@gamplex.bde.org> References: <6.0.1.1.1.20040327201519.044ba550@imap.sfu.ca> <200403301912.02191.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: smp@freebsd.org cc: Colin Percival Subject: Re: locking primatives X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2004 06:36:52 -0000 On Tue, 30 Mar 2004, John Baldwin wrote: > On Saturday 27 March 2004 03:33 pm, Colin Percival wrote: > > I'm trying to implement a callout_stop_safe() function > > (same as callout_stop(), except that it would wait for the > > callout to finish if it is currently in progress) in order > > to get around a rather nasty panic in the kqueue code. All > > I need to do is block until the softclock thread reaches a > > specified point -- this is pretty much the simplest locking > > problem possible. > > Is there any introduction to the various locking methods > > which would give me some indication of which one I should > > use? > > Heh, it's actually not a trivial problem. For one way of dealing with this > race, see the TDF_TIMOFAIL / TDF_TIMEOUT handling stuff in subr_sleepqueue.c. For another way, see the stopping of the "real interval timer" in kern_exit.c and synchronization of this with the callout handler (realitexpire()). All the complications there seemed to be needed, just for one callout. I forget the details. IIRC, the synchronization is very context-dependent (it depends on what realitexpire() does). I think hiding this complexity from individual callouts would require pessimizing callout_*() to keep track of more state. Most callouts don't require any complications, but this may be because too many of them are protected by Giant. Bruce From owner-freebsd-smp@FreeBSD.ORG Thu Apr 1 11:20:17 2004 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E538616A4CE for ; Thu, 1 Apr 2004 11:20:17 -0800 (PST) Received: from smtp1.mc.surewest.net (smtp1.mc.surewest.net [66.60.130.50]) by mx1.FreeBSD.org (Postfix) with SMTP id 8C89743D1D for ; Thu, 1 Apr 2004 11:20:15 -0800 (PST) (envelope-from dislists@updegrove.net) Received: (qmail 10043 invoked from network); 1 Apr 2004 19:19:13 -0000 Received: from unknown (HELO updegrove.net) (64.30.97.117) by smtp1.mc.surewest.net with SMTP; 1 Apr 2004 19:19:13 -0000 Received: (qmail 47964 invoked by uid 98); 1 Apr 2004 19:20:16 -0000 Received: from dislists@updegrove.net by smeagol.purgatory by uid 1008 with qmail-scanner-1.20 Clear:RC:1(64.166.46.10):. Processed in 0.148462 secs); 01 Apr 2004 19:20:16 -0000 X-Qmail-Scanner-Mail-From: dislists@updegrove.net via smeagol.purgatory X-Qmail-Scanner: 1.20 (Clear:RC:1(64.166.46.10):. Processed in 0.148462 secs) Received: from adsl-64-166-46-10.dsl.scrm01.pacbell.net (HELO updegrove.net) (64.166.46.10) by updegrove.net with SMTP; 1 Apr 2004 19:20:15 -0000 Message-ID: <406C6CD5.8050000@updegrove.net> Date: Thu, 01 Apr 2004 11:26:13 -0800 From: Rick Updegrove User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org, freebsd-smp@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-TST: smtp1 SNWK3 0.31-41 ip=64.30.97.117 Subject: upgrade from 4.8 SMP to 4.9 SMP causes unexplained rebooting! X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2004 19:20:18 -0000 (yes sorry for the cross-posting but I haven't been making much progress with this problem and my poor disks are taking a beating from all this rebooting) A 4.8-STABLE machine I have been running with no problems for over 130 days straight uptime is now having unexplained reboots AFTER upgrading to 4.9 STABLE. The reboots are not every single day, or predictable, but they are happening almost every other day. It is a low traffic qmail-scanner machine (7k messages a day) and the only reason I even upgraded was due to to http://www.freebsd.org/releases/4.9R/errata.html Now I am sort of wishing I did not : ) I lost all the uptime and now the unexplained rebooting... I hesitate reporting this because most people point their fingers at the hardware. I am tempted to abandon this machine for another but if anyone is interested in taking a look please advise. I have the following: #/etc/rc.conf #rebooting dumpdev=YES savecore=YES dumpdir="/var/crash" I know ths is not quite enough - I need to configure a dump devide but I have no tape drive. Is there another way? I rebuilt this kernel with: makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols Is there anything else I should do? Right now I do not have the ability to attach a serial console to the crashing system and set the system to serial console. And even if I did have physical access I am not sure how to do that exactly... Is there another way to accomplish the debugging of this? I have been running FreeBSD so long with no problems I am sort of rusty at tracking them down, especially the elusive ones. So please point me in the right direction. Thanks! Rick P.S. dmesg follows Copyright (c) 1992-2003 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.9-STABLE #1: Wed Mar 24 08:06:56 PST 2004 root@govmail.ca.gov:/usr/obj/usr/src/sys/SMP Timecounter "i8254" frequency 1193182 Hz CPU: Pentium III/Pentium III Xeon/Celeron (499.15-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x673 Stepping = 3 Features=0x387fbff real memory = 536870912 (524288K bytes) avail memory = 519516160 (507340K bytes) Programming 24 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 FreeBSD/SMP: Multiprocessor motherboard: 2 CPUs cpu0 (BSP): apic id: 1, version: 0x00040011, at 0xfee00000 cpu1 (AP): apic id: 0, version: 0x00040011, at 0xfee00000 io0 (APIC): apic id: 2, version: 0x00170011, at 0xfec00000 Preloaded elf kernel "kernel" at 0xc0327000. Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 14 entries at 0xc00fdee0 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard IOAPIC #0 intpin 19 -> irq 2 IOAPIC #0 intpin 17 -> irq 16 pci0: on pcib0 isab0: at device 4.0 on pci0 isa0: on isab0 atapci0: port 0xfcd0-0xfcdf at device 4.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 pci0: at 4.2 irq 2 Timecounter "PIIX" frequency 3579545 Hz chip1: port 0x2180-0x218f at device 4.3 on pci0 pcib1: at device 7.0 on pci0 IOAPIC #0 intpin 16 -> irq 17 pci1: on pcib1 ahc0: port 0xe800-0xe8ff mem 0xfebfe000-0xfebfefff irq 17 at device 4.0 on pci1 aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs pci1: (vendor=0x1000, dev=0x000c) at 7.0 irq 18 amr0: mem 0xf0000000-0xf7ffffff irq 16 at device 7.1 on pci0 amr0: Firmware D.02.05, BIOS B.01.04, 16MB RAM pcib2: at device 8.0 on pci0 pci2: on pcib2 fxp0: port 0xdce0-0xdcff mem 0xfe900000-0xfe9fffff,0xefffe000-0xefffefff irq 16 at device 2.0 on pci2 fxp0: Ethernet address 00:90:27:b7:09:76 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pci0: (vendor=0x103c, dev=0x10c1) at 11.0 pci0: at 13.0 orm0: