Subject: kern/29903: rebooting 3.99.3 with wm(4) NICs while receiving network traffic panics
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <arto@selonen.org>
List: netbsd-bugs
Date: 04/06/2005 10:20:00
>Number:         29903
>Category:       kern
>Synopsis:       rebooting 3.99.3 with wm(4) NICs while receiving network traffic panics
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 06 10:20:00 +0000 2005
>Originator:     Arto Selonen
>Release:        NetBSD-current 3.99.3 ~20050406
>Organization:
>Environment:
NetBSD blah 3.99.3 NetBSD 3.99.3 (BLAH) #1: Wed Apr  6 09:08:18 EEST 2005  blah@blah:/obj/sys/arch/i386/compile/BLAH i386

>Description:
After upgrading with sources from us2 anoncvs mirror (from ~20040204 current), the system does not reboot if there is network traffic to
it when it is shutting down. The following is observed on console:

syncing disks... done
unmounting file systems... done
kernel: page fault trap, code=0
Stopped at      netbsd:wm_rxintr+0x232: movl %esi,0x10(%ebx)
db> tr
wm_rxintr(c0e74000,c0cc3000,c0ebd800,c0ebd918,c041be70) at netbsd:wm_rxintr+0x232
wm_intr(c0e74000,0,10,30,c0eb0010) at netbsd:wm_intr+0x4f
Xintr_legacy11() at netbsd:Xintr_legacy11+0xad
--- interrupt ---
Xspllower(0,c03b9800,0,0,c02331d1) at netbsd:Xspllower+0xe
cpu_switch(c03b99c0,0,c041bf48,282,1) at netbsd:cpu_switch+0x7e
ltspleep(c03b9800,4,c034f0f1,0,0) at netbsd:ltsleep+0x327
uvm_scheduler(c03b97e0,0,c03bdc3c,c034c34a) at netbsd:uvm_scheduler+0x74
main(0,0,0,0,0) at netbsd:main+0x682

I have a forced crash dump available, if needed.

here are some bits and pieces of the system/background. Let me know
if I forgot something essential/useful.

partial dmesg data:
total memory = 511 MB
avail memory = 496 MB
BIOS32 rev. 0 found at 0xfd6e0
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Xeon (686-class), 2392.11 MHz, id 0xf25
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: features2 4400<CID,xTPR>
cpu0: "Intel(R) Xeon(TM) CPU 2.40GHz"
cpu0: I-cache 12K uOp cache 8-way, D-cache 8 KB 64B/line 4-way
cpu0: L2 cache 512 KB 64B/line 8-way
cpu0: ITLB 4K/4M: 64 entries
cpu0: DTLB 4K/4M: 64 entries
cpu0: running without thermal monitor!
cpu0: 16 page colors
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
...
ppb3 at pci0 dev 30 function 0: Intel 82801BA Hub-PCI Bridge (rev. 0x42)
pci4 at ppb3 bus 4
pci4: i/o space, memory space enabled
...
wm0 at pci4 dev 5 function 0: Intel i82540EM 1000BASE-T Ethernet, rev. 2
wm0: interrupting at irq 11
wm0: 32-bit 33MHz PCI bus
wm0: 64 word (6 address bits) MicroWire EEPROM
wm0: Ethernet address 00:02:b3:d8:e2:7b
makphy0 at wm0 phy 1: Marvell 88E1011 Gigabit PHY, rev. 3
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto

% ifconfig wm0
wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        capabilities=87<IP4CSUM,TCP4CSUM,UDP4CSUM,TSO4>
        enabled=0
        address: ed:it:ed:ed:it:ed
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active

This PR is marked serious/medium as remotely managed systems may not
reboot quite as expected.
>How-To-Repeat:
Shutdown/reboot a NetBSD-current with wm(4) NIC in use, and ping the system while it is shutting down. Note panic.
>Fix:
Unplug the network cable before shutting down or rebooting?