Subject: kern/26707: panic in genfs_putpages()
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <vuori@puuhamaa.magenta.net>
List: netbsd-bugs
Date: 08/18/2004 21:09:33
>Number:         26707
>Category:       kern
>Synopsis:       panic in genfs_putpages()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 18 18:31:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Valtteri Vuorikoski
>Release:        NetBSD 2.0_BETA, Aug 18 2004 CVS from netbsd-2-0 branch
>Organization:
Puuhamaa
>Environment:
System: NetBSD puuhamaa 2.0_BETA NetBSD 2.0_BETA (PUUHAMAA2) #2: Wed Aug 18 15:19:06 EEST 2004 root@puuhamaa:/sys/arch/i386/compile/PUUHAMAA2 i386
Architecture: i386
Machine: i386, Intel motherboard
Abbreviated dmesg:
total memory = 1021 MB
avail memory = 994 MB
BIOS32 rev. 0 found at 0xf0010
PCI BIOS rev. 2.1 found at 0xf0031
PCI IRQ Routing Table rev. 1.0 found at 0xf3310, size 224 bytes (12 entries)
PCI Interrupt Router at 000:31:0 (Intel product 0x8086 compatible)
[...]
mainbus0: Intel MP Specification (Version 1.4) (         Springdale-G)
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel Pentium 4 (686-class), 2793.26 MHz, id 0xf29
[...]
cpu0: calibrating local timer
cpu0: apic clock running at 199 MHz
cpu0: 16 page colors
mpbios: bus 0 is type PCI   
mpbios: bus 1 is type PCI   
mpbios: bus 2 is type ISA   
ioapic0 at mainbus0 apid 2 (I/O APIC)
ioapic0: pa 0xfec00000, version 20, 24 pins
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 82865 Host (rev. 0x02)
[...]
ppb0 at pci0 dev 30 function 0: Intel 82801BA Hub-to-PCI Bridge (rev. 0xc2)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
fxp0 at pci1 dev 8 function 0: Intel PRO/100 VM Network Controller with 82562ET/EZ PHY, rev 1
fxp0: interrupting at ioapic0 pin 20 (irq 7)
fxp0: Ethernet address 00:0c:f1:81:2c:f6
inphy0 at fxp0 phy 1: i82562ET 10/100 media interface, rev. 0
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[...]
raid1: RAID Level 1
raid1: Components: /dev/wd0a /dev/wd2a
raid1: Total Sectors: 310484480 (151603 MB)
boot device: raid1
root on raid1a dumps on wd1b
>Description:
System was in normal multiuser use by 3 users (irc, imap, emacs, mailman, some web servers
and NFS client activity) when it panic'd with no warning.

Earlier today it hung or panic'd (no dump was recovered and console wasn't checked) with an
older (ca. June 2004) kernel. This happened after a few minutes some heavy httperf benchmarking
(this host was running the client, server was remote). Similar httperf runs were also made also made
after that boot, some hours before this panic. The benchmark was on the order of 10000-50000
requests at 100-800 requests per second, with network traffic probably >50Mbps at peak.

Co-worker also reports that he caused a panic a month or so ago with similar heavy wget'ing
(filling a Fast Ethernet pipe).

savecore reports the panic as:

Aug 18 20:31:08 puuhamaa savecore: reboot after panic: panic: kernel diagnostic assertion "!pagedaemon" failed: file "../../../../miscfs/genfs/genfs_vnops.c", line 1171

gdb says:

(gdb) target kcore netbsd.0.core                                                                            
panic: uvm_mapent_alloc: out of static map entries, check MAX_KMAPENT (currently %d)                        
#0  0x3fd30000 in ?? ()                                                                                     
(gdb) bt                                                                                                    
#0  0x3fd30000 in ?? ()                                                                                     
#1  0xc03aeb1f in cpu_reboot ()                                                                             
#2  0xc0324654 in panic ()                                                                                  
#3  0xc048f950 in __assert ()                                                                               
#4  0xc0351a26 in genfs_putpages ()                                                                         
#5  0xc034f33c in VOP_PUTPAGES ()                                                                           
#6  0xc02cecc0 in ffs_full_fsync ()                                                                         
#7  0xc02ce7f0 in ffs_fsync ()                                                                              
#8  0xc034eca8 in VOP_FSYNC ()                                                                              
#9  0xc02ccd4e in ffs_sync ()                                                                               
#10 0xc0348dd6 in sys_sync ()                                                                               
#11 0xc0347507 in vfs_shutdown ()                                                                           
#12 0xc03aeb33 in cpu_reboot ()                                                                             
#13 0xc0324654 in panic ()                                                                                  
#14 0xc039ce34 in uvm_mapent_alloc ()                                                                       
#15 0xc0398578 in uvm_map_clip_end ()                                                                       
#16 0xc0399fb9 in uvm_unmap_remove ()                                                                       
#17 0xc03976d8 in uvm_unmap ()                                                                              
#18 0xc0396661 in uvm_km_free_poolpage1 ()                                                                  
#19 0xc0324272 in pool_allocator_free ()                                                                    
#20 0xc0323615 in pool_reclaim ()                                                                           
#21 0xc0323741 in pool_drain ()                                                                             
#22 0xc03a11f6 in uvm_pageout ()                                                                            
(gdb)

Kernel config is fairly GENERIC, with NMBCLUSTERS=4096 and MAXFILES=8192.
I don't know why the panics differ.

>How-To-Repeat:

Possibly by generating very heavy network traffic. Effect may be delayed by several
hours.

>Fix:

Unknown.
>Release-Note:
>Audit-Trail:
>Unformatted: