Subject: Re: overfilling mfs partitions larger than 600M causes kernel panics
To: None <port-macppc@netbsd.org>
From: =?ISO-8859-1?Q?Timo_Sch=F6ler?= <eclipser23@web.de>
List: port-macppc
Date: 11/20/2004 21:29:51
>> I want to bring this up again. I only got one confirmation from a 
>> macppc
>> user, and one deny from a i386 user.
>>
>> The procedure is to make a mfs partition 600M or larger by mounting 
>> it,
>> and then copying something to it that is definately going to overfill
>> it. I reproduced this again this morning.
>>
>> Net7300# mkdir /mfs
>> Net7300# mount_mfs -s 600m ffs /mfs
>> Net7300# cp -R /usr/* /mfs
>> panic: kernel diagnostic assertion "pcb->pcb_kmapsr == 0" failed: file
>> "../../..
>> /../arch/powerpc/powerpc/trap.c", line 546
>> Stopped in pid 371.1 (mount_mfs) at     netbsd:cpu_Debugger+0x10:
>> lwz r0, r1, 0x14
>> db{1}> bt
>> 0xd521fc40: at panic+0x19c
>> 0xd521fcd0: at __assert+0x28
>> 0xd521fce0: at copyout+0x14c
>> 0xd521fd70: at mfs_doio+0x84
>> 0xd521fd90: at mfs_start+0xa8
>> 0xd521fdd0: at sys_mount+0x414
>> 0xd521fed0: at syscall_plain+0xc8
>> 0xd521ff40: user SC trap #21 by 0x418839b8: srr1=0xf032
>>             r1=0xffffd990 cr=0x22000044 xer=0 ctr=0x418839b0
>>
>> I can get this with -current GENERIC and GENERIC.MP. Are there a lot 
>> of
>> servers running /tmp as a large mfs?

hi,

i just made a few test with the same procedure as mentioned above on my 
Power Mac G4 (please see full dmesg [1] below) with 1GByte RAM.

first, i tried with 300MByte on mfs -> result was the same as above:

>> panic: kernel diagnostic assertion "pcb->pcb_kmapsr == 0" failed: file
>> "../../..
>> /../arch/powerpc/powerpc/trap.c", line 546
>> Stopped in pid 371.1 (mount_mfs) at     netbsd:cpu_Debugger+0x10:
>> lwz r0, r1, 0x14
>> db{1}> bt

unfortunately, when the machine entered db, i'm not able to use the 
keyboard (e.g. to bt this stuff) -- surely is not part of this problem, 
tho kind of inconvenient too. i do not have a serial console on this 
machine :(

second, i tried with 512MByte, which results in the same failure as the 
above one.

NB that as well the 300MByte as the 512MByte 'test' seem to 'fill up' 
the space on the mfs mount, then the machine crashes.

third, i tried with 768MByte (as written above, the machine has 1GByte 
RAM)... and that it happened:

same error as above, *but* it didn't take that long -- it went 
(repeatedly for three times, everytime the same result) up to 125MByte 
-- then it crashed.

i was able to watch this as i did the procedure via ssh while running 
top on the console. 'File' grew up till the machine crashed.

for 300MByte and 512MByte, it filled up completely, for the 768MByte 
test it failed after copying approx. 125MByte.

regards,

timo

-----8<

[1] -- dmesg

NetBSD 2.99.10 (FULCRUM) #0: Fri Nov 12 20:58:11 CET 2004
         tis@mcbain.kryptoev.de:/var/obj/sys/arch/macppc/compile/FULCRUM
total memory = 1024 MB
avail memory = 983 MB
mainbus0 (root)
cpu0 at mainbus0: 7400 (Revision 2.9), ID 0 (primary)
cpu0: HID0 8094c0a4<EMCP,DOZE,DPM,EIEC,ICE,DCE,SGE,BTIC,BHT>
cpu0: 400.00 MHz, no-parity 1MB WB L2 cache (PB SRAM) at 2:1 ratio
uninorth0 at mainbus0
pci0 at uninorth0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer UniNorth AGP Interface (rev. 0x00)
ofb0 at pci0 dev 16 function 0: ATI Technologies product 0x4966
ofb0: 1600 x 1200, 8bpp
wsdisplay0 at ofb0 kbdmux 1: console (std, vt100 emulation)
wsmux1: connecting to wsdisplay0
uninorth1 at mainbus0
pci1 at uninorth1 bus 0
pci1: i/o space, memory space enabled
pchb1 at pci1 dev 11 function 0
pchb1: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
ppb0 at pci1 dev 13 function 0: Digital Equipment DC21154 PCI-PCI 
Bridge (rev. 0x05)
pci2 at ppb0 bus 1
pci2: i/o space, memory space enabled
obio0 at pci2 dev 7 function 0: addr 0x80000000
zsc0 at obio0 offset 0x13000: irq 22,50
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
davbus at obio0 offset 0x14000 not configured
adb0 at obio0 offset 0x16000 irq 47: pm_adb_op: timeout. command = 0x0
0 targets
aed0 at adb0 addr 0: ADB Event device
apm0 at adb0: battery flags 0x9, 0% charged
wdc0 at obio0 offset 0x1f000 irq 19: DMA transfer
atabus0 at wdc0 channel 0
wdc1 at obio0 offset 0x20000 irq 20: DMA transfer
atabus1 at wdc1 channel 0
wdc2 at obio0 offset 0x21000 irq 21: DMA transfer
atabus2 at wdc2 channel 0
ohci0 at pci2 dev 8 function 0: Apple Computer KeyLargo USB Controller 
(rev. 0x00)
ohci0: interrupting at irq 27
ohci0: OHCI version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Apple Computer OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ohci1 at pci2 dev 9 function 0: Apple Computer KeyLargo USB Controller 
(rev. 0x00)
ohci1: interrupting at irq 28
ohci1: OHCI version 1.0
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: Apple Computer OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
fwohci0 at pci2 dev 10 function 0: Texas Instruments TSB12LV23 IEEE 
1394 Host Controller (rev. 0x00)
fwohci0: interrupting at irq 63
fwohci0: OHCI 1.0, 00:30:65:ff:fe:68:9f:4a, 400Mb/s, 2048 max_rec, 4 
ir_ctx, 8 it_ctx
uninorth2 at mainbus0
pci3 at uninorth2 bus 0
pci3: i/o space, memory space enabled
pchb2 at pci3 dev 11 function 0
pchb2: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
gem0 at pci3 dev 15 function 0: Apple Computer GMAC Ethernet (rev. 0x01)
gem0: interrupting at irq 41
gem0: Ethernet address 00:30:65:68:9f:4a, 10KB RX fifo, 4KB TX fifo
bmtphy0 at gem0 phy 0: BCM5201 10/100 media interface, rev. 2
bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fw0 at fwohci0: 00:30:65:ff:fe:68:9f:4a:0a:02:ff:ff:f0:01:00:00
uhub2 at uhub1 port 1uhub3 at uhub0 port 1
uhub2: Alps Electric Hub in Apple USB Keyboard, class 9/0, rev 
1.10/2.10, addr 2

uhub3: ALCOR Generic USB Hub, class 9/0, rev 1.10/3.12, addr 2
uhub2: 3 ports with 2 removable, bus powered
uhub3: 4 ports with 4 removable, self powered
uhidev0 at uhub2 port 1 configuration 1 interface 0
uhidev0: Alps Electric Apple USB Keyboard, rev 1.10/1.03, addr 3, 
iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub3 port 1 configuration 1 interface 0
uhidev1: Microsoft Microsoft Wireless Optical MouseM-. 1.0A, rev 
2.00/0.56, addr 3, iclass 3/1
uhidev1: 3 report ids
ums0 at uhidev1 reportid 1: 5 buttons and Z dir.
wsmouse1 at ums0 mux 0
uhid0 at uhidev1 reportid 2: input=1, output=0, feature=0
uhid1 at uhidev1 reportid 3: input=1, output=0, feature=1
wd0 at atabus0 drive 0: <ST3120026A>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 111 GB, 232581 cyl, 16 head, 63 sec, 512 bytes/sect x 234441648 
sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4 
(Ultra/66) (using DMA data transfers)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <MATSHITADVD-RAM LF-D211A, , A115> cdrom 
removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(wdc1:0: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
/dev/wd0a: file system not clean (fs_clean=0); please fsck(8)
/dev/wd0a: lost blocks 0 files 0