with the diff below my ``panic: smashed stack in msdosfs_rename'' problem does not appear any more.
Index: msdosfs_vnops.c =================================================================== RCS file: /cvs/src/sys/msdosfs/msdosfs_vnops.c,v retrieving revision 1.82 diff -u -r1.82 msdosfs_vnops.c --- msdosfs_vnops.c 11 Jul 2012 12:39:20 -0000 1.82 +++ msdosfs_vnops.c 4 Sep 2012 09:28:32 -0000 @@ -860,7 +860,7 @@ struct componentname *fcnp = ap->a_fcnp; struct proc *p = curproc; /* XXX */ struct denode *ip, *xp, *dp, *zp; - u_char toname[11], oldname[11]; + u_char toname[12], oldname[11]; uint32_t from_diroffset, to_diroffset; u_char to_count; int doingdirectory = 0, newparent = 0; below is my lengthy report to bugs@ with some explanation. Bye, Marcus mcmer-open...@tor.at (MERIGHI Marcus), 2012.09.04 (Tue) 11:52 (CEST): > context and history: > alix machine, connecting external usb hd. hotplugd(8) scripts to rsync > larger files (100MB - 1000MB) to external hd. The hd quite often gives: > > umass0: BBB reset failed, IOERROR > umass0: BBB bulk-in clear stall failed, IOERROR > umass0: BBB bulk-out clear stall failed, IOERROR > > after some unplugging/plugging it works (ms win and a sony tv seem to > have no problem with the hd). no suspicious sounds from hd. ms win > chkdsk thinks the disk/slice is fine. > > when mounted the hd looks like this: > /dev/sd0i on /mnt/media type msdos (local, uid=1002, gid=10, long) > /dev/sd0i 1048320000 922767424 125552576 88% /mnt/media > > The plug in, rsync, plug out cycle has been running for weeks now, > without problems apart from the ``BBB'' thing. The hd is filling up > constantly. > Yesterday I installed yesterdays snapshot. Saw the panic for the first > time later that day. > > http://readlist.com/lists/freebsd.org/freebsd-current/10/53762.html > and > http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/fs/msdosfs/msdosfs_vnops.c?only_with_tag=MAIN > (rev 1.72) > suggest: > > Index: msdosfs_vnops.c > =================================================================== > RCS file: /cvs/src/sys/msdosfs/msdosfs_vnops.c,v > retrieving revision 1.82 > diff -u -r1.82 msdosfs_vnops.c > --- msdosfs_vnops.c 11 Jul 2012 12:39:20 -0000 1.82 > +++ msdosfs_vnops.c 4 Sep 2012 09:28:32 -0000 > @@ -860,7 +860,7 @@ > struct componentname *fcnp = ap->a_fcnp; > struct proc *p = curproc; /* XXX */ > struct denode *ip, *xp, *dp, *zp; > - u_char toname[11], oldname[11]; > + u_char toname[12], oldname[11]; > uint32_t from_diroffset, to_diroffset; > u_char to_count; > int doingdirectory = 0, newparent = 0; > > I haven't tried with the above patch yet, going to compile a kernel for > the first time in ages. > > Bye, Marcus > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Disk: sd0 geometry: 91201/255/63 [1465149168 Sectors] > Offset: 0 Signature: 0xAA55 > Starting Ending LBA Info: > #: id C H S - C H S [ start: size ] > ------------------------------------------------------------------------------- > *0: 0C 0 32 33 - 65270 245 63 [ 2048: 1048576000 ] Win95 > FAT32L > 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > > 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > > 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > # /dev/rsd0c: > type: SCSI > disk: SCSI disk > label: holmer-medien-01 > duid: 94f3e0ef639263f9 > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 91201 > total sectors: 1465149168 > boundstart: 0 > boundend: 1465149168 > drivedata: 0 > > 16 partitions: > # size offset fstype [fsize bsize cpg] > c: 1465149168 0 unused > i: 1048576000 2048 MSDOS # /mnt/media > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > with ddb.panic=0 and watchdogd_flags="": > > panic: smashed stack in msdosfs_rename > Starting stack trace... > panic(d08eecfc,f3886d48,d08cbc44,f3886d48,50) at panic+0x6a > panic(d08cbc44,d08d0bb5,f3886dfc,d04305b1,d08d0bb5) at panic+0x6a > __stack_smash_handler(d08d0bb5,0,d52dc5d0,d124e820,0) at > __stack_smash_handler+0x19 > msdosfs_rename(f3886e14,0,0,d5314f0c,d54b7cdc) at msdosfs_rename+0x451 > VOP_RENAME(d54b7cdc,d531d1e8,f3886ed0,d54b7cdc,0) at VOP_RENAME+0x41 > dorenameat(d52dc5d0,ffffff9c,cfbe8c68,ffffff9c,cfbe9468) at > dorenameat+0x220 > sys_rename(d52dc5d0,f3886f64,f3886f84,106,d52de904) at sys_rename+0x38 > syscall() at syscall+0x227 > --- syscall (number -809595800) --- > 0x2: > End of stack trace. > syncing disks... 4 3 done > > dumping to dev 1, offset 503871 > dump 255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 > 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 > 220 219 218 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 > 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 > 184 183 182 181 180 179 178 177 176 175 174 173 172 171 170 169 168 167 > 166 165 164 163 > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > console output with ddb.panic=1 and watchdogd_flags="NO": > > PC Engines ALIX.2 v0.99 > 640 KB Base Memory > 261120 KB Extended Memory > Waiting for HDD ... > > 01F0 Master 427A WDC WD1600BEVE-00WZT0 > Phys C/H/S 16383/16/63 Log C/H/S 16709/255/63 LBA > Using drive 0, partition 3; > Loading;... > probing: pc0 com0 pci mem[640K 255M a20=on] > disk: hd0 > >> OpenBSD/i386 BOOT 3.02 > switching console to com0 > >> OpenBSD/i386 BOOT 3.02 > boot> > booting hd0a:/bsd: 8337852+1101960 [52+375648+362387]=0x9b4ee0 > entry point at 0x200120 > > [ using 738460 bytes of bsd ELF symbol table ] > Copyright (c) 1982, 1986, 1989, 1991, 1993 > The Regents of the University of California. All rights reserved. > Copyright (c) 1995-2012 OpenBSD. All rights reserved. http://www.OpenBSD.org > > OpenBSD 5.2-current (GENERIC) #6: Sat Sep 1 20:07:26 MDT 2012 > dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC > cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) > 499 MHz > cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW > real mem = 267976704 (255MB) > avail mem = 252682240 (240MB) > mainbus0 at root > bios0 at mainbus0: AT/286+ BIOS, date 12/10/07, BIOS32 rev. 0 @ 0xfceb2 > pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000 > pcibios0: pcibios_get_intr_routing - function not supported > pcibios0: PCI IRQ Routing information unavailable. > pcibios0: PCI bus #0 is the last bus > bios0: ROM list: 0xe0000/0xa800 > cpu0 at mainbus0: (uniprocessor) > pci0 at mainbus0 bus 0: configuration mode 1 (bios) > pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x33 > glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES > vr0 at pci0 dev 9 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 10, address > 00:0d:b9:17:1d:08 > ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI > 0x004063, model 0x0034 > vr1 at pci0 dev 11 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 12, > address 00:0d:b9:17:1d:09 > ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI > 0x004063, model 0x0034 > glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit > 3579545Hz timer, watchdog, gpio, i2c > gpio0 at glxpcib0: 32 pins > iic0 at glxpcib0 > maxtmp0 at iic0 addr 0x4c: lm86 > pciide0 at pci0 dev 15 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0 > wired to compatibility, channel 1 wired to compatibility > wd0 at pciide0 channel 0 drive 0: <WDC WD1600BEVE-00WZT0> > wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4 > pciide0: channel 1 ignored (disabled) > ohci0 at pci0 dev 15 function 4 "AMD CS5536 USB" rev 0x02: irq 15, version > 1.0, legacy support > ehci0 at pci0 dev 15 function 5 "AMD CS5536 USB" rev 0x02: irq 15 > usb0 at ehci0: USB revision 2.0 > uhub0 at usb0 "AMD EHCI root hub" rev 2.00/1.00 addr 1 > isa0 at glxpcib0 > isadma0 at isa0 > com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo > com0: console > pcppi0 at isa0 port 0x61 > spkr0 at pcppi0 > npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 > usb1 at ohci0: USB revision 1.0 > uhub1 at usb1 "AMD OHCI root hub" rev 1.00/1.00 addr 1 > mtrr: K6-family MTRR support (2 registers) > nvram: invalid checksum > vscsi0 at root > scsibus0 at vscsi0: 256 targets > softraid0 at root > scsibus1 at softraid0: 256 targets > root on wd0a (7b2e007bf13f250b.a) swap on wd0b dump on wd0b > clock: unknown CMOS layout > Automatic boot in progress: starting file system checks. > /dev/wd0a (7b2e007bf13f250b.a): file system is clean; not checking > /dev/wd0d (7b2e007bf13f250b.d): file system is clean; not checking > /dev/wd0e (7b2e007bf13f250b.e): file system is clean; not checking > /dev/wd0f (7b2e007bf13f250b.f): file system is clean; not checking > /dev/wd0g (7b2e007bf13f250b.g): file system is clean; not checking > /dev/wd0h (7b2e007bf13f250b.h): file system is clean; not checking > /dev/wd0i (7b2e007bf13f250b.i): file system is clean; not checking > setting tty flags > pf enabled > ddb.panic: 1 -> 1 > vm.swapencrypt.enable: 1 -> 0 > machdep.kbdreset: 0 -> 1 > starting network > DHCPREQUEST on vr1 to 255.255.255.255 port 67 > DHCPACK from 192.168.0.1 (18:59:33:af:5a:0d) > bound to 192.168.0.100 -- renewal in 1800 seconds. > starting early daemons: syslogd pflogd named ntpd. > starting RPC daemons:. > savecore: reboot after panic: smashed stack in msdosfs_rename > savecore: system went down at Mon Sep 3 20:54:56 2012 > savecore: no dump, not enough free space on device > checking quotas: done. > clearing /tmp > starting pre-securelevel daemons:LEDpins . > setting kernel security level: kern.securelevel: 0 -> 1 > creating runtime link editor directory cache. > preserving editor files. > starting network daemons: sshd sendmail inetd sndiod. > starting package daemons: smartd gpiod offd pfsyslogd. > starting local daemons: sensorsd hotplugd cron. > Tue Sep 4 10:09:50 CEST 2012 > > OpenBSD/i386 (bla.foo.com) (tty00) > > login: > > umass0 at uhub0 port 2 configuration 1 interface 0 "ASMedia AS2105" rev > 2.10/0.01 addr 2 > umass0: using SCSI over Bulk-Only > scsibus2 at umass0: 2 targets, initiator 0 > sd0 at scsibus2 targ 1 lun 0: <TOSHIBA, MK7559GSXP, GN00> SCSI0 0/direct > fixed serial.174c5106~~~~~~~~~~~~ > sd0: 715404MB, 512 bytes/sector, 1465149168 sectors > umass0: BBB reset failed, IOERROR > umass0: BBB bulk-in clear stall failed, IOERROR > umass0: BBB bulk-out clear stall failed, IOERROR > > sd0 detached > scsibus2 detached > umass0 detached > > umass0 at uhub0 port 2 configuration 1 interface 0 "ASMedia AS2105" rev > 2.10/0.01 addr 2 > umass0: using SCSI over Bulk-Only > scsibus2 at umass0: 2 targets, initiator 0 > sd0 at scsibus2 targ 1 lun 0: <TOSHIBA, MK7559GSXP, GN00> SCSI0 0/direct > fixed serial.174c5106~~~~~~~~~~~~ > sd0: 715404MB, 512 bytes/sector, 1465149168 sectors > > panic: smashed stack in msdosfs_rename > Stopped at Debugger+0x4: popl %ebp > 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(d08eecfc,f384ed48,d08cbc44,f384ed48,50) at Debugger+0x4 > panic(d08cbc44,d08d0bb5,f384edfc,d04305b1,d08d0bb5) at panic+0x5d > __stack_smash_handler(d08d0bb5,0,d52e2e88,d1245c20,0) at > __stack_smash_handler+ > 0x19 > msdosfs_rename(f384ee14,0,0,d52fab4c,d542d6bc) at msdosfs_rename+0x451 > VOP_RENAME(d542d6bc,d542db9c,f384eed0,d542d6bc,0) at VOP_RENAME+0x41 > dorenameat(d52e2e88,ffffff9c,cfbd1f08,ffffff9c,cfbd2708) at dorenameat+0x220 > sys_rename(d52e2e88,f384ef64,f384ef84,106,d52e6784) at sys_rename+0x38 > syscall() at syscall+0x227 > --- syscall (number -809689336) --- > 0x2: > > ddb> ps > PID PPID PGRP UID S FLAGS WAIT COMMAND > *25904 18097 23267 0 7 0 rsync > 18097 16338 23267 0 3 0x80 select rsync > 16338 13412 23267 0 3 0x80 select rsync > 4945 13412 23267 0 3 0x80 piperd logger > 13412 23267 23267 0 3 0x88 pause sh > 18238 12050 18238 0 3 0x80 netio syslogc > 12050 2939 12050 1000 3 0x88 pause ksh > 2939 31281 31281 1000 3 0x80 select sshd > 31281 3177 31281 0 3 0x80 poll sshd > 22670 1 22670 0 3 0x80 ttyin getty > 10411 1 10411 0 3 0x80 select cron > 23267 1 23267 0 3 0x80 htplev hotplugd > 3731 1 3731 0 3 0x80 nanosleep sensorsd > 29220 14817 24737 0 3 0x80 netcon nc > 1582 14817 24737 0 3 0x80 piperd logger > 14817 1 24737 0 3 0x80 piperd sh > 1963 2967 24737 0 3 0x80 kqread tail > 17921 2967 24737 0 3 0x80 piperd logger > 2967 1 24737 0 3 0x80 piperd sh > 26581 1 11632 0 3 0x80 nanosleep smartd > 29553 1 29553 99 3 0x80 poll sndiod > 30135 1 30135 0 3 0x80 select inetd > 13101 1 13101 0 3 0x80 select sendmail > 3177 1 3177 0 3 0x80 select sshd > 1458 1 1458 0 3 0x80 poll ntpd > 18382 31306 18382 83 3 0x80 poll ntpd > 31306 1 31306 83 3 0x80 poll ntpd > 29646 24735 24735 70 3 0x80 select named > 24735 1 24735 0 3 0x80 netio named > 1422 31840 31840 74 3 0x80 bpf pflogd > 31840 1 31840 0 3 0x80 netio pflogd > 526 15921 15921 73 3 0x80 poll syslogd > 15921 1 15921 0 3 0x80 netio syslogd > 1189 1 1189 77 3 0x80 poll dhclient > 24285 1 24737 0 3 0x80 poll dhclient > 13 0 0 0 3 0x100200 aiodoned aiodoned > 12 0 0 0 3 0x100200 syncer update > 11 0 0 0 3 0x100200 cleaner cleaner > 10 0 0 0 3 0x100200 reaper reaper > 9 0 0 0 3 0x100200 pgdaemon pagedaemon > 8 0 0 0 3 0x100200 bored crypto > 7 0 0 0 3 0x100200 pftm pfpurge > 6 0 0 0 3 0x100200 usbtsk usbtask > 5 0 0 0 3 0x100200 usbatsk usbatsk > 4 0 0 0 3 0x100200 bored syswq > 3 0 0 0 3 0x40100200 idle0 > 2 0 0 0 3 0x100200 kmalloc kmthread > 1 0 1 0 3 0x80 wait init > 0 -1 0 0 3 0x200 scheduler swapper > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > OpenBSD 5.2-current (GENERIC) #6: Sat Sep 1 20:07:26 MDT 2012 > dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC > RTC BIOS diagnostic error 80<clock_battery> > cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) > 499 MHz > cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW > real mem = 267976704 (255MB) > avail mem = 252682240 (240MB) > mainbus0 at root > bios0 at mainbus0: AT/286+ BIOS, date 12/10/07, BIOS32 rev. 0 @ 0xfceb2 > pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000 > pcibios0: pcibios_get_intr_routing - function not supported > pcibios0: PCI IRQ Routing information unavailable. > pcibios0: PCI bus #0 is the last bus > bios0: ROM list: 0xe0000/0xa800 > cpu0 at mainbus0: (uniprocessor) > pci0 at mainbus0 bus 0: configuration mode 1 (bios) > pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x33 > glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES > vr0 at pci0 dev 9 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 10, address > 00:0d:b9:17:1d:08 > ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI > 0x004063, model 0x0034 > vr1 at pci0 dev 11 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 12, > address 00:0d:b9:17:1d:09 > ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI > 0x004063, model 0x0034 > glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit > 3579545Hz timer, watchdog, gpio, i2c > gpio0 at glxpcib0: 32 pins > iic0 at glxpcib0 > maxtmp0 at iic0 addr 0x4c: lm86 > pciide0 at pci0 dev 15 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0 > wired to compatibility, channel 1 wired to compatibility > wd0 at pciide0 channel 0 drive 0: <WDC WD1600BEVE-00WZT0> > wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4 > pciide0: channel 1 ignored (disabled) > ohci0 at pci0 dev 15 function 4 "AMD CS5536 USB" rev 0x02: irq 15, version > 1.0, legacy support > ehci0 at pci0 dev 15 function 5 "AMD CS5536 USB" rev 0x02: irq 15 > usb0 at ehci0: USB revision 2.0 > uhub0 at usb0 "AMD EHCI root hub" rev 2.00/1.00 addr 1 > isa0 at glxpcib0 > isadma0 at isa0 > com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo > com0: console > pcppi0 at isa0 port 0x61 > spkr0 at pcppi0 > npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 > usb1 at ohci0: USB revision 1.0 > uhub1 at usb1 "AMD OHCI root hub" rev 1.00/1.00 addr 1 > mtrr: K6-family MTRR support (2 registers) > nvram: invalid checksum > vscsi0 at root > scsibus0 at vscsi0: 256 targets > softraid0 at root > scsibus1 at softraid0: 256 targets > root on wd0a (7b2e007bf13f250b.a) swap on wd0b dump on wd0b > clock: unknown CMOS layout > WARNING: clock time much less than file system time > WARNING: using file system time > WARNING: CHECK AND RESET THE DATE!