Subject: port-i386/30116: kernel: page fault trap (establishing many network connections)
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <hernani@vecirex.net>
List: netbsd-bugs
Date: 05/02/2005 20:07:00
>Number:         30116
>Category:       port-i386
>Synopsis:       kernel: page fault trap (establishing many network connections)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 02 20:07:00 +0000 2005
>Originator:     Hernani Marques Madeira
>Release:        2.0.2_STABLE
>Organization:
>Environment:
NetBSD clementine.vecirex.net 2.0.2_STABLE NetBSD 2.0.2_STABLE (CLEMENTINE) #2: Mon May  2 12:51:11 CEST 2005  hernani@clementine.vecirex.net:/data/src/netbsd-2-0/src/sys/arch/i386/compile/CLEMENTINE i386

>Description:
Starting amule (establishing many connections) and excessively using a NFS share (i.e. compiling, source updating), at the same time, leads to the following kernel panic:

[snip]
May 2 17:15:13 clementine /netbsd: WARNING: mclpool limit reached NMBCLUSTERS
uvm_fault(0xcb5a8ea0, 0x7ceaf000, 0, 2) -> 0xe
kernel: page fault trap, code=0
Stopped in pid 2516.3 (amule) at	netbsd:m_copym0+0x1e0:	movl	%ebx,0x4c(%eax)
db> trace
m_copym0(c10ab600,0,55,1,0) at  netbsd:m_copym0+0x1e0
m_copym(c1314100,0,5ac,1,c1013220) at netbsd:m_copym+0x19
tcp_build_datapkt(c1283638,c124e8a4,0,5ac,28) at netbsd:tcp_build_datapkt+0x1e7
tcp_output(c1283638,1f4,c10144a4,c1303700,c) at netbsd:tcp_output+0xb9b
tcp_timer_rexmt(c1283638,cc44df78,0,cc25e7f8,cc44dfa4) at netbsd:tcp_timer_rexmt+0x1af
softclock(0,cc44df98,c0337941,cc44dfa4,c011fb7d) at netbsd:softclock+0x259
softintr_dispatch(0,1f,1f,1f,1f) at netbsd:softintr_dispatch+0x73
Xsoftclock() at netbsd:Xsoftclock+0x25
--- interrupt ---
0x48c74e73:
db> reboot
syncing disks... acpiec0: evaluation of GPE query method _Q82 failed: AE_NOT_FOUND
acpiec0: evaluation of GPE query method _Q82 failed: AE_NOT_FOUND
acpiec0: evaluation of GPE query method _Q82 failed: AE_NOT_FOUND
acpiec0: evaluation of GPE query method _Q82 failed: AE_NOT_FOUND
acpiec0: evaluation of GPE query method _Q82 failed: AE_NOT_FOUND
acpiec0: evaluation of GPE query method _Q82 failed: AE_NOT_FOUND
acpiec0: evaluation of GPE query method _Q82 failed: AE_NOT_FOUND
acpiec0: evaluation of GPE query method _Q82 failed: AE_NOT_FOUND
kernel: page fault trap, code=0
Stopped at	netbsd:in_cksum+0x7b	addl	0(%ebx),%eax
db> reboot
rebooting...
[/snip]

As you can se there's also a problem with the ACPI enabled GENERIC_LAPTOP-based kernel I use; but AFAICT this has nothing to do with the above, more serious, problem.

I'll, however, file another PR if I can somehow reproduce this other problem that seems to prevent (sometimes) the system from rebooting properly.

My dmesg as follows, as it may help:

[snip]
NetBSD 2.0.2_STABLE (CLEMENTINE) #2: Mon May  2 12:51:11 CEST 2005
	hernani@clementine.vecirex.net:/data/src/netbsd-2-0/src/sys/arch/i386/compile/CLEMENTINE
total memory = 478 MB
avail memory = 464 MB
BIOS32 rev. 0 found at 0xfd760
PCI BIOS rev. 2.1 found at 0xfd9c2
pcibios: config mechanism [1][x], special cycles [x][x], last bus 2
PCI IRQ Routing Table rev. 1.0 found at 0xfdf40, size 160 bytes (8 entries)
PCI Interrupt Router at 000:31:0 (Intel 82371FB PCI-to-ISA Bridge (PIIX) compatible)
------------------------------------------
  device vendor product pin PIRQ IRQ stage
------------------------------------------
000:02:0 0x8086 0x3582   A  0x00  10  0    already assigned
000:29:0 0x8086 0x24c2   A  0x00  10  0    already assigned
000:29:1 0x8086 0x24c4   B  0x03   3  0    already assigned
000:29:2 0x8086 0x24c7   C  0x02   4  0    already assigned
000:29:7 0x8086 0x24cd   D  0x07   3  0    already assigned
000:31:1 0x8086 0x24ca   A  0x02   4  0    fixed up
000:31:3 0x8086 0x24c3   B  0x01   5  0    already assigned
000:31:5 0x8086 0x24c5   B  0x01   5  0    already assigned
000:31:6 0x8086 0x24c6   B  0x01   5  0    already assigned
002:00:0 0x10ec 0x8139   A  0x00  10  0    already assigned
002:06:0 0x8086 0x4220   A  0x02   4  0    already assigned
002:09:0 0x104c 0x8031   A  0x04  11  0    fixed up
002:09:2 0x104c 0x8032   C  0x06   4  0    already assigned
002:09:3 0x104c 0x8033   A  0x04  11  0    already assigned
002:09:4 0x104c 0x8034   A  0x04  11  0    already assigned
------------------------------------------
PCI fixup examining 8086:3580
PCI fixup examining 8086:3584
PCI fixup examining 8086:3585
PCI fixup examining 8086:3582
PCI fixup examining 8086:3582
PCI fixup examining 8086:24c2
PCI fixup examining 8086:24c4
PCI fixup examining 8086:24c7
PCI fixup examining 8086:24cd
PCI fixup examining 8086:2448
PCI fixup examining 10ec:8139
PCI fixup examining 8086:4220
PCI fixup examining 104c:8031
PCI bridge 1: primary 1, secondary 2, subordinate 2
PCI fixup examining 104c:8032
PCI fixup examining 104c:8033
PCI fixup examining 104c:8034
PCI bridge 0: primary 0, secondary 1, subordinate 2
PCI fixup examining 8086:24cc
PCI fixup examining 8086:24ca
PCI fixup examining 8086:24c3
PCI fixup examining 8086:24c5
PCI fixup examining 8086:24c6
PCI bus #2 is the last bus
[System BIOS Setting]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x8086 0x3580 
		[OK]
000:00:1 0x8086 0x3584 
		[OK]
000:00:3 0x8086 0x3585 
		[OK]
000:02:0 0x8086 0x3582 
	10h mem  0xe8000000 0x08000000
	14h mem  0xe0000000 0x00080000
	18h port 0x00001800 0x00000008
		[OK]
000:02:1 0x8086 0x3582 
	10h mem  0xf0000000 0x08000000
	14h mem  0xe0080000 0x00080000
		[OK]
000:29:0 0x8086 0x24c2 
	20h port 0x00001820 0x00000020
		[OK]
000:29:1 0x8086 0x24c4 
	20h port 0x00001840 0x00000020
		[OK]
000:29:2 0x8086 0x24c7 
	20h port 0x00001860 0x00000020
		[OK]
000:29:7 0x8086 0x24cd 
	10h mem  0xe0100000 0x00000400
		[OK]
000:30:0 0x8086 0x2448 
		[OK]
000:31:0 0x8086 0x24cc 
		[OK]
000:31:1 0x8086 0x24ca 
	10h port 0x00000000 0x00000008
	14h port 0x00000000 0x00000004
	18h port 0x00000000 0x00000008
	1ch port 0x00000000 0x00000004
	20h port 0x00001810 0x00000010
	24h mem  0x00000000 0x00000400
		[NG]
000:31:3 0x8086 0x24c3 
	20h port 0x00001880 0x00000020
		[OK]
000:31:5 0x8086 0x24c5 
	10h port 0x00001c00 0x00000100
	14h port 0x000018c0 0x00000040
	18h mem  0xe0100c00 0x00000200
	1ch mem  0xe0100800 0x00000100
		[OK]
000:31:6 0x8086 0x24c6 
	10h port 0x00002400 0x00000100
	14h port 0x00002000 0x00000080
		[OK]
001:00:0 0x10ec 0x8139 
	10h port 0x00003000 0x00000100
	14h mem  0xe0207800 0x00000100
		[OK]
001:06:0 0x8086 0x4220 
	10h mem  0xe0206000 0x00001000
		[OK]
001:09:0 0x104c 0x8031 
	10h mem  0x00000000 0x00001000
		[NG]
001:09:2 0x104c 0x8032 
	10h mem  0xe0207000 0x00000800
	14h mem  0xe0200000 0x00004000
		[OK]
001:09:3 0x104c 0x8033 
	10h mem  0xe0204000 0x00002000
		[OK]
001:09:4 0x104c 0x8034 
	10h mem  0xe0208400 0x00000100
	14h mem  0xe0208000 0x00000100
	18h mem  0xe0207c00 0x00000100
		[OK]
--------------------------[  2 devices bogus]
 Physical memory end: 0x1dedc000
 PCI memory mapped I/O space start: 0x1df00000
[PCIBIOS fixup stage]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x8086 0x3580 
		[OK]
000:00:1 0x8086 0x3584 
		[OK]
000:00:3 0x8086 0x3585 
		[OK]
000:02:0 0x8086 0x3582 
	10h mem  0xe8000000 0x08000000
	14h mem  0xe0000000 0x00080000
	18h port 0x00001800 0x00000008
		[OK]
000:02:1 0x8086 0x3582 
	10h mem  0xf0000000 0x08000000
	14h mem  0xe0080000 0x00080000
		[OK]
000:29:0 0x8086 0x24c2 
	20h port 0x00001820 0x00000020
		[OK]
000:29:1 0x8086 0x24c4 
	20h port 0x00001840 0x00000020
		[OK]
000:29:2 0x8086 0x24c7 
	20h port 0x00001860 0x00000020
		[OK]
000:29:7 0x8086 0x24cd 
	10h mem  0xe0100000 0x00000400
		[OK]
000:30:0 0x8086 0x2448 
		[OK]
000:31:0 0x8086 0x24cc 
		[OK]
000:31:1 0x8086 0x24ca 
	10h port 0x00005800 0x00000008
	14h port 0x00005808 0x00000004
	18h port 0x00005810 0x00000008
	1ch port 0x0000580c 0x00000004
	20h port 0x00001810 0x00000010
	24h mem  0x1df00000 0x00000400
		[OK]
000:31:3 0x8086 0x24c3 
	20h port 0x00001880 0x00000020
		[OK]
000:31:5 0x8086 0x24c5 
	10h port 0x00001c00 0x00000100
	14h port 0x000018c0 0x00000040
	18h mem  0xe0100c00 0x00000200
	1ch mem  0xe0100800 0x00000100
		[OK]
000:31:6 0x8086 0x24c6 
	10h port 0x00002400 0x00000100
	14h port 0x00002000 0x00000080
		[OK]
001:00:0 0x10ec 0x8139 
	10h port 0x00003000 0x00000100
	14h mem  0xe0207800 0x00000100
		[OK]
001:06:0 0x8086 0x4220 
	10h mem  0xe0206000 0x00001000
		[OK]
001:09:0 0x104c 0x8031 
	10h mem  0x1df01000 0x00001000
		[OK]
001:09:2 0x104c 0x8032 
	10h mem  0xe0207000 0x00000800
	14h mem  0xe0200000 0x00004000
		[OK]
001:09:3 0x104c 0x8033 
	10h mem  0xe0204000 0x00002000
		[OK]
001:09:4 0x104c 0x8034 
	10h mem  0xe0208400 0x00000100
	14h mem  0xe0208000 0x00000100
	18h mem  0xe0207c00 0x00000100
		[OK]
--------------------------[  0 devices bogus]
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium Pro, II or III (686-class), 1695.85 MHz, id 0x6d6
cpu0: features afe9fbbf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR>
cpu0: features afe9fbbf<PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX>
cpu0: features afe9fbbf<FXSR,SSE,SSE2,SS,TM,SBF>
acpi0 at mainbus0
acpi0: using Intel ACPI CA subsystem version 20040211
acpi0: X/RSDT: OemId <HP    ,09B8    ,06040000>, AslId < LTP,00000000>
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
acpiacad0 at acpi0 (ACPI0003): ACPI AC Adapter
acpibat0 at acpi0 (PNP0C0A): ACPI Battery (Control Method)
acpilid0 at acpi0 (PNP0C0D): ACPI Lid Switch
acpibut0 at acpi0 (PNP0C0E): ACPI Sleep Button
PNP0A03 at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0C0F at acpi0 not configured
PNP0100 at acpi0 not configured
PNP0000 at acpi0 not configured
PNP0B00 at acpi0 not configured
npx1 at acpi0 (PNP0C04)
npx1: io 0xf0 irq 13
npx1: using exception 16
PNP0200 at acpi0 not configured
PNP0C02 at acpi0 not configured
acpiec0 at acpi0 (PNP0C09-1): ACPI Embedded Controller
acpiec0: io 0x62,0x66
WARNING: Callback scheduled before sysmon task queue thread present.
pckbc1 at acpi0 (PNP0303): kbd port
pckbc1: io 0x60,0x64 irq 1
pckbc2 at acpi0 (SYN0110): aux port
pckbc2: irq 12
pnp0c14 at acpi0 not configured
acpitz0 at acpi0: ACPI Thermal Zone
acpitz0: unable to get polling interval; using default of 30.0s
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82855GM Host-to-Hub Controller (rev. 0x02)
agp0 at pchb0: detected 32636k stolen memory
agp0: aperture at 0xe8000000, size 0x8000000
Intel 82855GM GMCH Memory Controller (miscellaneous system, revision 0x02) at pci0 dev 0 function 1 not configured
Intel 82855GM GMCH Configuration Process (miscellaneous system, revision 0x02) at pci0 dev 0 function 3 not configured
vga0 at pci0 dev 2 function 0: Intel 82855GM GMCH Integrated Graphics Device (rev. 0x02)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 1-7 added (80x25, vt100 emulation)
Intel 82855GM GMCH Integrated Graphics Device (miscellaneous display, revision 0x02) at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 29 function 0: Intel 82801DB/DBM USB UHCI Controller #1 (rev. 0x03)
uhci0: interrupting at irq 10
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1: Intel 82801DB/DBM USB UHCI Controller #2 (rev. 0x03)
uhci1: interrupting at irq 3
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2: Intel 82801DB/DBM USB UHCI Controller #3 (rev. 0x03)
uhci2: interrupting at irq 4
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7: Intel 82801DB/DBM USB EHCI Controller (rev. 0x03)
ehci0: interrupting at irq 3
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
ppb0 at pci0 dev 30 function 0: Intel 82801BAM Hub-to-PCI Bridge (rev. 0x83)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
rtk0 at pci1 dev 0 function 0: Realtek 8139 10/100BaseTX
rtk0: interrupting at irq 10
rtk0: Ethernet address 00:c0:9f:56:c9:eb
ukphy0 at rtk0 phy 7: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000000, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
Intel product 0x4220 (miscellaneous network, revision 0x05) at pci1 dev 6 function 0 not configured
cbb0 at pci1 dev 9 function 0: Texas Instruments product 0x8031 (rev. 0x00)
Texas Instruments product 0x8032 (Firewire serial bus, interface 0x10) at pci1 dev 9 function 2 not configured
Texas Instruments product 0x8033 (miscellaneous mass storage) at pci1 dev 9 function 3 not configured
Texas Instruments product 0x8034 (system subclass 0x05) at pci1 dev 9 function 4 not configured
cbb0: interrupting at irq 11
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0
pcmcia0 at cardslot0
pcib0 at pci0 dev 31 function 0
pcib0: Intel 82801DB ISA Bridge (rev. 0x03)
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801DBM IDE Controller (ICH4-M) (rev. 0x03)
piixide0: bus-master DMA support present
piixide0: primary channel wired to compatibility mode
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel wired to compatibility mode
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
Intel 82801DB/DBM SMBus Controller (SMBus serial bus, revision 0x03) at pci0 dev 31 function 3 not configured
auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
auich0: interrupting at irq 5
auich0: ac97: CXT48 codec; reserved, headphone, 18 bit DAC, 18 bit ADC, no 3D stereo
auich0: ac97: ext id a04<AC97_23,AMAP,SPDIF>
Intel 82801DB/DBM AC97 Modem Controller (modem communications, revision 0x03) at pci0 dev 31 function 6 not configured
isa0 at pcib0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
isapnp0: no ISA Plug 'n Play devices found
WARNING: Callback scheduled before sysmon task queue thread present.
audio0 at auich0: full duplex, independent
IPsec: Initialized Security Association Processing.
acpiec0: evaluation of GPE query method _Q09 failed: AE_NOT_FOUND
acpilid0: lid opened.
ath0 at cardbus0 dev 0 function 0ath0: waking up from power state D-973062144
ath0: mac 5.9 phy 4.3 5ghz radio 4.6
ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: 802.11 address: 00:09:5b:eb:2d:44
wd0 at atabus0 drive 0: <FUJITSU MHT2080AT PL>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 76319 MB, 155061 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA data transfers)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <HL-DT-ST DVD-RW GWA-4080N, K044A8C1101, 0C09> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
cd0(piixide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
ath0: waking up from power state D-973062144
ath0: interrupting at 11
[/snip]
>How-To-Repeat:
It happens when many network connections are established; amule + many NFS accesses seem i.e. to act as a trigger, running concurrently.
>Fix: