From owner-freebsd-current@FreeBSD.ORG Wed Mar 10 15:54:12 2004 Return-Path: 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 A314F16A4CE for ; Wed, 10 Mar 2004 15:54:12 -0800 (PST) Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id E43F943D2D for ; Wed, 10 Mar 2004 15:54:11 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from robbins.dropbear.id.au (203.134.132.144) by smtp02.syd.iprimus.net.au (7.0.024) id 402CF870007FD112 for current@freebsd.org; Thu, 11 Mar 2004 10:54:08 +1100 Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id DCD0F41B9; Thu, 11 Mar 2004 10:54:08 +1100 (EST) Date: Thu, 11 Mar 2004 10:54:08 +1100 From: Tim Robbins To: current@freebsd.org Message-ID: <20040310235408.GA658@cat.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: if_sk locking problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 10 Mar 2004 23:54:12 -0000 See attached dmesg. At boot time, there is one malloc() with a mutex held and a reversal between the skc0 and kernel environment locks. When I started & stopped tcpdump, there was a reversal between the skc0 and global bpf locks. Copyright (c) 1992-2004 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 5.2-tjr #0: Wed Mar 10 12:23:23 EST 2004 tim@dev.robbins.dropbear.id.au:/usr/obj/home/tim/p4/src/sys/GENERIC Preloaded elf kernel "/boot/kernel/kernel" at 0xc09d7000. Preloaded elf module "/boot/kernel/acpi.ko" at 0xc09d721c. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Athlon(tm) 64 Processor 3000+ (2002.57-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0xf48 Stepping = 8 Features=0x78bfbff AMD Features=0xe0500000 real memory = 536018944 (511 MB) avail memory = 514793472 (490 MB) ACPI APIC Table: ioapic0: Changing APIC ID to 1 ioapic0 irqs 0-23 on motherboard Pentium Pro MTRR support enabled npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard pcibios: BIOS version 2.10 Found $PIR table, 12 entries at 0xc00f5ae0 acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 acpi_cpu0: on acpi0 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 pcib1: could not get PCI interrupt routing table for \\_SB_.PCI0.P0P1 - AE_NOT_FOUND pci1: on pcib1 pci1: at device 0.0 (no driver attached) fwohci0: port 0xbc00-0xbc7f mem 0xf7b00000-0xf7b007ff irq 16 at device 7.0 on pci0 fwohci0: OHCI version 1.0 (ROM=1) fwohci0: No. of Isochronous channel is 4. fwohci0: EUI64 00:e0:18:00:00:62:33:52 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:62:33:52 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) atapci0: port 0xcc00-0xcc7f,0xdc00-0xdc0f,0xec00-0xec3f mem 0xf7c00000-0xf7c1ffff,0xf7d00000-0xf7d00fff irq 18 at device 8.0 on pci0 atapci0: [MPSAFE] ata2: at 0xf7d00000 on atapci0 ata2: [MPSAFE] ata3: at 0xf7d00000 on atapci0 ata3: [MPSAFE] ata4: at 0xf7d00000 on atapci0 ata4: [MPSAFE] skc0: <3Com 3C940 Gigabit Ethernet> port 0xb000-0xb0ff mem 0xf7e00000-0xf7e03fff irq 17 at device 10.0 on pci0 skc0: 3Com Gigabit LOM (3C940) sk0: on skc0 sk0: Ethernet address: 00:0e:a6:74:74:52 malloc() of "512" with the following non-sleepable locks held: exclusive sleep mutex skc0 (network driver) r = 0 (0xc4538ac0) locked @ /home/tim/p4/src/sys/pci/if_sk.c:1357 miibus0: on sk0 e1000phy0: on miibus0 lock order reversal 1st 0xc4538ac0 skc0 (network driver) @ /home/tim/p4/src/sys/pci/if_sk.c:661 2nd 0xc0871b80 kernel environment (kernel environment) @ /home/tim/p4/src/sys/kern/kern_environment.c:288 Stack backtrace: backtrace(0,ffffffff,c087e340,c087ec50,c080f7ac) at backtrace+0x12 witness_checkorder(c0871b80,1,c07b1171,120) at witness_checkorder+0x593 _sx_slock(c0871b80,c07b1171,120,c0c21a20,a) at _sx_slock+0x54 getenv(c079b720,c4541300,c4538880,c4538880,0) at getenv+0x2f getenv_quad(c079b720,c0c21a60,c07de3b0,c07de3b0,c0c21a88) at getenv_quad+0x11 getenv_int(c079b720,c0869514,c07de3b0,c4538880,c4538880) at getenv_int+0x12 e1000phy_attach(c4538880) at e1000phy_attach+0x18 device_probe_and_attach(c4538880) at device_probe_and_attach+0x99 bus_generic_attach(c4538900,c4400400,f0000000,c06c92a0,c06c92d0) at bus_generic_attach+0x16 miibus_attach(c4538900) at miibus_attach+0x3d device_probe_and_attach(c4538900) at device_probe_and_attach+0x99 bus_generic_attach(c4538980,c453d000,0,c453d000,c0c21b60) at bus_generic_attach+0x16 mii_phy_probe(c4538980,c453d1f4,c06c92a0,c06c92d0) at mii_phy_probe+0xd4 sk_attach(c4538980) at sk_attach+0x34e device_probe_and_attach(c4538980) at device_probe_and_attach+0x99 bus_generic_attach(c4455180,c05f65ca,c081e5f8,c07de3b0,c07de3b0) at bus_generic_attach+0x16 skc_attach(c4455180) at skc_attach+0x61e device_probe_and_attach(c4455180) at device_probe_and_attach+0x99 bus_generic_attach(c4454200,0,c4454200,c4454200,0) at bus_generic_attach+0x16 acpi_pci_attach(c4454200) at acpi_pci_attach+0x9c device_probe_and_attach(c4454200) at device_probe_and_attach+0x99 bus_generic_attach(c443d400,c443d400,c43820b0,0,c43820a0) at bus_generic_attach+0x16 acpi_pcib_attach(c443d400,c43820b0,0,c0c21c94,c05f6620) at acpi_pcib_attach+0xaa acpi_pcib_acpi_attach(c443d400) at acpi_pcib_acpi_attach+0x188 device_probe_and_attach(c443d400) at device_probe_and_attach+0x99 bus_generic_attach(c443d900,c1973280,0,c443d880,c0c21cfc) at bus_generic_attach+0x16 acpi_probe_children(c443d900,c443d900,c443d900,0,c0c21d1c) at acpi_probe_children+0x65 acpi_attach(c443d900) at acpi_attach+0x493 device_probe_and_attach(c443d900) at device_probe_and_attach+0x99 bus_generic_attach(c443da80,c443da80,c443da80,c0c21d60,c05f2ee5) at bus_generic_attach+0x16 nexus_attach(c443da80) at nexus_attach+0x13 device_probe_and_attach(c443da80) at device_probe_and_attach+0x99 root_bus_configure(c197ac80,c07d0f91,0) at root_bus_configure+0x16 configure(0,c1ec00,c1e000,0,c043c5c5) at configure+0x1b mi_startup() at mi_startup+0x96 begin() at begin+0x2c e1000phy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX-FDX, auto atapci1: port 0xd000-0xd0ff,0xd400-0xd40f,0xd800-0xd803,0xe000-0xe007,0xe400-0xe403,0xe800-0xe807 irq 20 at device 15.0 on pci0 atapci1: [MPSAFE] ata5: at 0xe800 on atapci1 ata5: [MPSAFE] ata6: at 0xe000 on atapci1 ata6: [MPSAFE] atapci2: port 0xfc00-0xfc0f at device 15.1 on pci0 ata0: at 0x1f0 irq 14 on atapci2 ata0: [MPSAFE] ata1: at 0x170 irq 15 on atapci2 ata1: [MPSAFE] uhci0: port 0xb400-0xb41f irq 21 at device 16.0 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhub0: port error, restarting port 1 uhub0: port error, giving up port 1 uhub0: port error, restarting port 2 uhub0: port error, giving up port 2 ums0: Microsoft Microsoft 5-Button Mouse with IntelliEye(TM), rev 1.10/3.00, addr 2, iclass 3/1 ums0: 5 buttons and Z dir. uhci1: port 0xb800-0xb81f irq 21 at device 16.1 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhub1: port error, restarting port 1 uhub1: port error, giving up port 1 uhub1: port error, restarting port 2 uhub1: port error, giving up port 2 uhci2: port 0xc000-0xc01f irq 21 at device 16.2 on pci0 usb2: on uhci2 usb2: USB revision 1.0 uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhub2: port error, restarting port 1 uhub2: port error, giving up port 1 uhub2: port error, restarting port 2 uhub2: port error, giving up port 2 uhci3: port 0xc400-0xc41f irq 21 at device 16.3 on pci0 usb3: on uhci3 usb3: USB revision 1.0 uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered uhub3: port error, restarting port 1 uhub3: port error, giving up port 1 uhub3: port error, restarting port 2 uhub3: port error, giving up port 2 pci0: at device 16.4 (no driver attached) isab0: at device 17.0 on pci0 isa0: on isab0 pci0: at device 17.5 (no driver attached) acpi_button0: on acpi0 acpi_button1: on acpi0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 ppc0 port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 sio0: configured irq 3 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 port 0x2f8-0x2ff irq 3 on acpi0 sio0: type 16550A sio1: configured irq 4 not in bitmap of probed irqs 0 sio1: port may not be enabled sio1 port 0x3f8-0x3ff irq 4 on acpi0 sio1: type 16550A orm0: