On an older piece of hardware (PII-300) running 4.0-release running local storage at my parents', I experience FFS-related panics when writing files to the secondary HDD [wd1] (connected to a separate SATA controller [pciide1]).
Since I lacked a console cable, I copied the trace and ps information by hand. I see the following panic: start = 0, len = 7547, fs = /storage panic: ffs_alloccg: map corrupted Stopped at Debugger+0x4: leave RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC! DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION! ddb> trace Debugger(d0716864,1,daf72ae0,1d7b,0) at Debugger+0x4 panic(d06737d6,0,1d7b,d0bc48d4,40) at panic+0x63 ffs_freefile(d0bc4800,d74ea000,ebd0,8,0) at ffs_freefile+0x5b6 ffs1_blkpref(d3cdf4a8,d3de2f2c,0,4000,d3cdf4fc) at ffs1_blkpref+0x843 ffs1_blkpref(d3cdf4a8,17b,0,4000) at ffs1_blkpref+0x7e4 ffs1_blkpref(d3cdf4a8,13a,18c06c8,4000,d03fcba0,20,d3dbd500,0) at ffs1_blkpref+0x1ec ffs_alloc(d3cdf4a8,0,18c06c8,4000,d3dbd500,daf72ca4,d0b203c0,d3c79198) at ffs_alloc+0x116 ffs1_balloc(d3cdf4a8,0,0,4000,d3dbd500,0,daf72ddc,4000) at ffs1_balloc+0x4a4 ffs_write(daf72e08,d3ce0924,30042,d3c73448,d07173c0) at ffs_write+0x240 VOP_WRITE(d3ce0924,daf72e98,1,d3dbd500,d3ce0924,20002,d3c73448,2) at VOP_WRITE+0x34 vn_write(d3da09a0,d3da09bc,daf72e98,d3dbd500) at vn_write+0x89 dofilewrite(d3c73448,4,d3da09a0,86e3d000,40000) at dofilewrite+0x71 sys_write(d3c73448,daf72f68,daf72f58,40000,b0) at sys_write+0x47 syscall() at syscall+0x2ea --- syscall (number 4) --- 0x1c1ba69: ddb> ps PID PPID PGRP UID S FLAGS WAIT COMMAND *26380 17275 17275 0 7 0x6 rsync 17275 7353 17275 0 3 0x408e select rsync 7353 2486 7353 0 3 0x4086 pause ksh 2486 20426 2486 1001 3 0x4086 pause ksh 20246 10313 10313 1001 3 0x185 select sshd 10313 14793 10313 0 3 0x4084 netio sshd 2831 1 2831 0 3 0x40184 select sendmail 10501 1 1 0 3 0x4084 ttyopn getty 25497 1 25497 0 3 0x4086 ttyin getty 16601 1 16601 0 3 0x4086 ttyin getty 13493 1 13493 0 3 0x4086 ttyin getty 1360 1 1360 0 3 0x4086 ttyin getty 32381 1 32381 0 3 0x4086 ttyin getty 30314 1 30314 0 3 0x84 select cron 8100 1 8100 0 3 0x85 select nmbd 30863 22543 22543 0 3 0x185 pause smbd 22543 1 22543 0 3 0x185 select smbd 14793 1 14793 0 3 0x84 select sshd 7408 1 7408 0 3 0x184 select inetd 20959 1 20959 71 3 0x184 kqread ftp-proxy 7102 1 7102 77 3 0x184 poll dhcpd 28523 1 28523 0 3 0x84 poll ntpd 16441 1 16441 83 3 0x184 poll ntpd 9726 3679 3679 68 3 0x184 select isakmpd 3679 1 3679 0 3 0x84 netio isakmpd 1486 1317 1317 70 3 0x184 select named 1317 1 1317 0 3 0x184 netio named 17875 30083 30083 74 3 0x184 bpf pflogd 30083 1 30083 0 3 0x84 netio pflogd 8979 28885 28885 73 2 0x184 syslogd 28885 1 28885 0 3 0x8c netio syslogd 18547 1 18547 77 3 0x184 poll dhclient 3186 1 11906 0 3 0x86 poll dhclient 13 0 0 0 3 0x100204 crypto_wa crypto 12 0 0 0 3 0x100204 aiodoned aiodoned 11 0 0 0 3 0x100204 syncer update 10 0 0 0 3 0x100204 cleaner cleaner 9 0 0 0 3 0x100204 reaper reaper 8 0 0 0 3 0x100204 pgdaemon pagedaemon 7 0 0 0 3 0x100204 pftm pfpurge 6 0 0 0 3 0x100204 wait wskbd_hotkey 5 0 0 0 3 0x100204 usbtsk usbtask 4 0 0 0 3 0x100204 usbevt usb0 3 0 0 0 3 0x100204 apmev apm0 2 0 0 0 3 0x100204 kmalloc kmthread 1 0 1 0 3 0x4084 wait init 0 -1 0 0 3 0x80204 scheduler swapper ddb> So far, I have run memtest etc., but could not find any issues with the hardware. One thing I did find was the following issue with fsck_ffs that seems to be an explanation for the panic. After restarting, the machine has no trouble coming up again. I do, however, think that fsck_ffs has a problem completing its runs properly in its 5th stage. Consecutive fsck_ffs runs on the filesystem show the following: # fsck_ffs /dev/rwd1i ** /dev/rwd1i ** Last mounted on /storage ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups BLK(S) MISSING IN BIT MAPS SALVAGE? [Fyn?] y 5684 files, 19225251 used, 22055437 free (789 frags, 2756831 blocks, 0.0% fragmentation) MARK FILE SYSTEM CLEAN? [Fyn?] y ***** FILE SYSTEM WAS MODIFIED ***** # fsck_ffs /dev/rwd1i ** /dev/rwd1i ** File system is already clean ** Last mounted on /storage ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups BLK(S) MISSING IN BIT MAPS SALVAGE? [Fyn?] y 5684 files, 19225251 used, 22055437 free (789 frags, 2756831 blocks, 0.0% fragmentation) MARK FILE SYSTEM CLEAN? [Fyn?] y ***** FILE SYSTEM WAS MODIFIED ***** Is there any way I can provide more information on what is going wrong here? I tried the ssm docs on fsck and manual pages, but have trouble finding anything. I included my dmesg below. I tried both the controller and the hard drive in different systems without issues before, but will happily test those again if you think it worthwile. Insight or a good clue-by-four is greatly appreciated, Rogier OpenBSD 4.0 (GENERIC) #1107: Sat Sep 16 19:15:58 MDT 2006 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel Pentium II ("GenuineIntel" 686-class, 512KB L2 cache) 301 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR real mem = 133787648 (130652K) avail mem = 114647040 (111960K) using 1658 buffers containing 6791168 bytes (6632K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+(c4) BIOS, date 03/22/98, BIOS32 rev. 0 @ 0xfb4f0 apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 70102 dobusy 1 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xf0000/0xb968 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf10/128 (6 entries) pcibios0: PCI Exclusive IRQs: 10 11 12 pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371SB ISA" rev 0x00) pcibios0: PCI bus #1 is the last bus bios0: ROM list: 0xc0000/0x8000 0xc8000/0x2000! cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x02 ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x02 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 "ATI Rage Pro" rev 0x5c wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02 pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0: <WDC AC36400L> wd0: 16-sector PIO, LBA, 6149MB, 12594960 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 atapiscsi0 at pciide0 channel 1 drive 0 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: <E-IDE, CD-ROM 36X/AKU, U10I> SCSI0 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01: irq 10 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x02: polling iic0 at piixpm0 "unknown" at iic0 addr 0x28 not configured rl0 at pci0 dev 9 function 0 "Realtek 8139" rev 0x10: irq 11, address 00:e0:4c:3c:5b:0d rlphy0 at rl0 phy 0: RTL internal PHY rl1 at pci0 dev 11 function 0 "Realtek 8139" rev 0x10: irq 12, address 00:e0:4c:69:ec:31 rlphy1 at rl1 phy 0: RTL internal PHY pciide1 at pci0 dev 12 function 0 "CMD Technology SiI3112 SATA" rev 0x02: DMA pciide1: using irq 10 for native-PCI interrupt pciide1: port 0: device present, speed: 1.5Gb/s wd1 at pciide1 channel 0 drive 0: <ST3250820AS> wd1: 16-sector PIO, LBA48, 238475MB, 488397168 sectors wd1(pciide1:0:0): using BIOS timings, Ultra-DMA mode 6 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: <PC speaker> spkr0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 npx0 at isa0 port 0xf0/16: using exception 16 pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec biomask e765 netmask ff65 ttymask ffe7 pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support dkcsum: wd0 matches BIOS drive 0x80 dkcsum: wd1 matches BIOS drive 0x81 root on wd0a rootdev=0x0 rrootdev=0x300 rawdev=0x302 -- If you don't know where you're going, any road will get you there.