From owner-freebsd-current@FreeBSD.ORG Thu Nov 10 19:02:38 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4A7016A420; Thu, 10 Nov 2005 19:02:38 +0000 (GMT) (envelope-from mcsi@mcsi.pp.ru) Received: from portpc-design.spb.ru (portpc-design.spb.ru [81.176.64.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71F8E43D6D; Thu, 10 Nov 2005 19:02:25 +0000 (GMT) (envelope-from mcsi@mcsi.pp.ru) Received: from [85.140.139.77] (ppp85-140-139-77.pppoe.mtu-net.ru [85.140.139.77]) (authenticated bits=0) by portpc-design.spb.ru (8.13.5/8.13.5) with ESMTP id jAAJ2HJK074915; Thu, 10 Nov 2005 22:02:17 +0300 (MSK) (envelope-from mcsi@mcsi.pp.ru) Message-ID: <43739932.6060707@mcsi.pp.ru> Date: Thu, 10 Nov 2005 22:02:10 +0300 From: Maxim Maximov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051109 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: Bill Paul References: <20051110184635.691E616A420@hub.freebsd.org> In-Reply-To: <20051110184635.691E616A420@hub.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on 81.176.64.226 X-Virus-Status: Clean Cc: freebsd-current@FreeBSD.ORG Subject: Re: CURRENT panics sometimes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2005 19:02:39 -0000 Bill Paul wrote: >>Hi. >> >> 1 boot of 3 I got similar panics in softclock(). >> >>kernel trap 12 with interrupts disabled >> >> >>Fatal trap 12: page fault while in kernel mode >>cpuid = 0; apic id = 00 >>fault virtual address = 0x218 >>fault code = supervisor read, page not present >>instruction pointer = 0x20:0xc06aa6ae >>stack pointer = 0x28:0xd4710cac >>frame pointer = 0x28:0xd4710cd4 >>code segment = base 0x0, limit 0xfffff, type 0x1b >> = DPL 0, pres 1, def32 1, gran 1 >>processor eflags = resume, IOPL = 0 >>current process = 13 (swi4: clock sio) >> >> The trace is: >> >>softclock(0) ... +0x86 >>ithread_execute_handlers >>ithread_loop >>fork_exit >>form_trampoline >> >> softclock+0x86 is here (marked with an arrow) >> >> /* >> * softticks may be modified by hard clock, so cache >> * it while we work on a given bucket. >> */ >> curticks = softticks; >> bucket = &callwheel[curticks & callwheelmask]; >> c = TAILQ_FIRST(bucket); >> while (c) { >> depth++; >>---> if (c->c_time != curticks) { >> c = TAILQ_NEXT(c, c_links.tqe); >> ++steps; >> >> Debugging shows that 'c' has the value of 0x210. Which is incorrect for >>sure. 'c_time' has an offset of 0x8, giving us fault virtual address. >> I'm using NDIS. It seems, that panic happens on first packet NDIS tries >>to send. This is when 'ntpdate' is being run at boot stage. >> As I said, I can reproduce it by rebooting a few times. Can anyone give >>a clue where to look in DDB further to help to resolve this problem? > > > If you want us to give you clues, you have to give _US_ clues. > > For example, here are some of the things you didn't bother to say: > > - _WHICH_ windows driver are you using with NDIS? bcmwl5.sys > - _WHAT_ wireless card do you have? It presents itself as ASUS 802.11g Network Adapter. Based on Broadcom chip. > - Complete dmesg output from your system (note: verbose boot is not > necessary, but _full_ output is necessary, i.e. don't remove things > you think are unimportant) Here it is. Copyright (c) 1992-2005 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 7.0-CURRENT #0: Tue Nov 8 20:52:36 MSK 2005 mcsi@ultra.domain:/usr/obj/usr/src/sys/ULTRA WARNING: WITNESS option enabled, expect reduced performance. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2992.52-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff Features2=0x4400> Logical CPUs per core: 2 real memory = 536674304 (511 MB) avail memory = 510435328 (486 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0 irqs 0-23 on motherboard npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) acpi_ec0: port 0x62,0x66 on acpi0 pci_link0: irq 9 on acpi0 pci_link1: irq 5 on acpi0 pci_link2: irq 5 on acpi0 pci_link3: irq 0 on acpi0 pci_link4: irq 0 on acpi0 pci_link5: irq 0 on acpi0 pci_link6: irq 0 on acpi0 pci_link7: irq 5 on acpi0 Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 cpu0: on acpi0 p4tcc0: on cpu0 cpu1: on acpi0 p4tcc1: on cpu1 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: mem 0xf8000000-0xfbffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 drm0: port 0x9800-0x98ff mem 0xe8000000-0xefffffff,0xfe9f0000-0xfe9fffff irq 16 at device 0.0 on pci1 info: [drm] AGP at 0xf8000000 64MB info: [drm] Initialized radeon 1.16.0 20050311 on minor 0 uhci0: port 0xe000-0xe01f irq 16 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0xe400-0xe41f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0xe800-0xe81f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhci3: port 0xec00-0xec1f irq 16 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] usb3: on uhci3 usb3: USB revision 1.0 uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xfebffc00-0xfebfffff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] usb4: waiting for BIOS to give up control usb4: timed out waiting for BIOS usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub4: 8 ports with 8 removable, self powered pcib2: at device 30.0 on pci0 pci2: on pcib2 skc0: <3Com 3C940 Gigabit Ethernet> port 0xa800-0xa8ff mem 0xfeafc000-0xfeafffff irq 18 at device 0.0 on pci2 skc0: 3Com Gigabit LOM (3C940) rev. (0x1) sk0: on skc0 sk0: Ethernet address: 00:0e:a6:b9:f9:f8 miibus0: on sk0 e1000phy0: on miibus0 e1000phy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX-FDX, auto cbb0: irq 16 at device 1.0 on pci2 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 cbb1: irq 17 at device 1.1 on pci2 cardbus1: on cbb1 pccard1: <16-bit PCCard bus> on cbb1 fwohci0: mem 0xfeafb000-0xfeafb7ff irq 18 at device 1.2 on pci2 fwohci0: OHCI version 1.0 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:e0:18:00:03:18:f3:bc fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:e0:18:18:f3:bc fwe0: Ethernet address: 02:e0:18:18:f3:bc fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) pci2: at device 1.3 (no driver attached) pci2: at device 1.4 (no driver attached) ndis0: mem 0xfeaf8000-0xfeaf9fff irq 17 at device 2.0 on pci2 ndis0: NDIS API version: 5.0 ndis0: Ethernet address: 00:0e:a6:c2:00:e4 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfc00-0xfc0f at device 31.1 on pci0 ata0: on atapci0 ata1: on atapci0 pcm0: port 0xd400-0xd4ff,0xd000-0xd03f mem 0xfebff800-0xfebff9ff,0xfebff400-0xfebff4ff irq 17 at device 31.5 on pci0 pcm0: [GIANT-LOCKED] pcm0: pci0: at device 31.6 (no driver attached) acpi_button0: on acpi0 acpi_lid0: on acpi0 acpi_button1: on acpi0 acpi_tz0: on acpi0 acpi_acad0: on acpi0 battery0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Synaptics Touchpad, device ID 0 speaker0: port 0x61 on acpi0 sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled sio1: port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 ppc0: port 0x378-0x37f,0x778-0x77f irq 7 on acpi0 ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xcffff pnpid ORM0000 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ukbd0: vendor 0x0566 product 0x3002, rev 1.10/1.00, addr 2, iclass 3/1 kbd1 at ukbd0 uhid0: vendor 0x0566 product 0x3002, rev 1.10/1.00, addr 2, iclass 3/1 ums0: Logitech Optical USB Mouse, rev 2.00/3.40, addr 3, iclass 3/1 ums0: 3 buttons and Z dir. Timecounters tick every 1.000 msec acd0: DVDR at ata0-master UDMA33 ad2: 57231MB at ata1-master UDMA100 SMP: AP CPU #1 Launched! Trying to mount root from ufs:/dev/ad2s3a WARNING: attempt to net_add_domain(netgraph) after domainfinalize() sk0: link state changed to DOWN ndis0: link state changed to UP kernel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x218 fault code = supervisor read, page not present instruction pointer = 0x20:0xc06aa6ae stack pointer = 0x28:0xd4710cac frame pointer = 0x28:0xd4710cd4 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = resume, IOPL = 0 current process = 13 (swi4: clock sio) > - Did you add your NDIS driver to /boot/loader.conf, or are you loading > the driver after the system is running multiuser? I'm loading it from /boot/loader.conf > - If you are loading the driver via /boot/loader.conf, did you try > _not_ doing that, and loading it afterwards? No, I didn't. Even if I will do that, why the problem isn't solid? Right now and most of the time I'm happy with this driver loaded at boot time. > - What kind of system is this? Laptop? Desktop? Stone knives and bearskins? It's laptop ASUS L5 Series. > - Is it SMP or UP? SMP. > > When you provide this information, maybe you will get help. > > NOTE: Windows NDIS drivers assume that by the time you intialize them, > the entire OS is up and running, including scheduling and, if present, > multiple CPUs. But in FreeBSD, the kernel is running in 'cold start' > state when it probes/attaches devices, and not all of the scheduling > mechanisms are available yet (for example, you can not msleep() while > cold == 1). This means loading your driver via /boot/loader.conf is > something of a hit-or-miss proposition: sometimes they don't work right, > sometimes they do. To be really safe, you should load them _after_ the > system has come up all the way. > > Unfortunately, it's necessary to initialize the driver briefly in > ndis_attach() in order to find out the device's station address. (You > can only do it via MiniportQueryInformation(), and that only works after > MiniportInitialize() has been called.) When 'ntpdate' is called during boot process, everything is (or should be) initialized I believe. -- Maxim Maximov