Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Apr 2002 18:33:43 +0200
From:      "Rink Springer" <rink@ikuu.org>
To:        <freebsd-fs@freebsd.org>, <freebsd-hackers@freebsd.org>
Subject:   Bugs in FAT code
Message-ID:  <004101c1e6f6$cdb9be50$0400000a@aurum>

next in thread | raw e-mail | index | archive | help
Hello everyone,

While trying to migrate some FAT32 filesystems to FFS, I encountered a
kernel trap 12 error. This happened on a Pentium II 233 and a K6-2 333MHz.

The fault happends when trying to do a 'ls >q' on a mounted 40GB FAT32 disk,
connected to a Promise TX2 PCI IDE controller.

uname -a says:

--
FreeBSD sidious.ikuu.org 4.5-STABLE FreeBSD 4.5-STABLE #7: Thu Apr 18
17:13:54 GMT 2002 rink@sidious.ikuu.org:/usr/src/sys/compile/SIDIOUS i386
--

The dmesg log is:

--
Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 4.5-STABLE #7: Thu Apr 18 17:13:54 GMT 2002
rink@sidious.ikuu.org:/usr/src/sys/compile/SIDIOUS
Timecounter "i8254" frequency 1193182 Hz
Timecounter "TSC" frequency 334092596 Hz
CPU: AMD-K6(tm) 3D processor (334.09-MHz 586-class CPU)
Origin = "AuthenticAMD" Id = 0x58c Stepping = 12
Features=0x8021bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,PGE,MMX>
AMD Features=0x80000800<SYSCALL,3DNow!>
real memory = 67108864 (65536K bytes)
avail memory = 62390272 (60928K bytes)
Preloaded elf kernel "kernel" at 0xc02f0000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc02f009c.
netsmb_dev: loaded
K6-family MTRR support enabled (2 registers)
Using $PIR table, 4 entries at 0xc00fd9f0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge> at device 1.0 on
pci0
pci1: <PCI bus> on pcib1
pci1: <SiS 6326 SVGA controller> at 0.0
isab0: <VIA 82C586 PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C586 ATA33 controller> port 0xd000-0xd00f at device 7.1 on
pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
pci0: <VIA 83C572 USB controller> at 7.2 irq 11
chip1: <VIA 82C586B ACPI interface> at device 7.3 on pci0
rl0: <RealTek 8139 10/100BaseTX> port 0xd800-0xd8ff mem
0xe8804000-0xe88040ff irq 10 at device 8.0 on pci0
rl0: Ethernet address: 00:50:fc:39:8f:e5
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
atapci1: <Promise TX2 ATA100 controller> port
0xec00-0xec0f,0xe800-0xe803,0xe400-0xe407,0xe000-0xe003,0xdc00-0xdc07 mem
0xe8800000-0xe8803fff irq 12 at device 9.0 on pci0
ata2: at 0xdc00 on atapci1
ata3: at 0xe400 on atapci1
orm0: <Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xc9fff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0: configured irq 4 not in bitmap of probed irqs 0
ad0: 4103MB <ST34321A> [8894/15/63] at ata0-master UDMA33
ad4: 39083MB <Maxtor 4D040H2> [79408/16/63] at ata2-master UDMA100
ad5: 58644MB <Maxtor 4W060H4> [119150/16/63] at ata2-slave UDMA100
ad6: 38182MB <MAXTOR 4K040H2> [77578/16/63] at ata3-master UDMA100
ad7: 39083MB <Maxtor 5T040H4> [79408/16/63] at ata3-slave UDMA100
Mounting root from ufs:/dev/ad0s1a
WARNING: / was not properly dismounted
--

The commands used were:

# mount -t msdos /dev/ad6s1 /mnt
# cd "/mnt/Direct Connect"
# ls >q

Then, the machine bombs out with a Trap 12 error. The machine's DDB said:

--
kernel: type 12 trap, code = 0
Stopped at updatefats+0x37: andl 0(%esi,%edx,4),%eax

db>
--

I compiled DDB and everything in, and analyzed the core dump. This gave:

# cd /sys/compile/SIDIOUS
# gdb -k kernel.debug /var/crash/vmcore.0
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
IdlePTD at phsyical address 0x0030f000
initial pcb at physical address 0x0028ab20
panicstr: from debugger
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address = 0xe09a7ffc
fault code = supervisor read, page not present
instruction pointer = 0x8:0xc01858d3
stack pointer = 0x10:0xc620ad04
frame pointer = 0x10:0xc620ad14
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 152 (ls)
interrupt mask = none
panic: from debugger
panic: from debugger
Uptime: 1m17s
dumping to dev #ad/0x20001, offset 131072
dump ata0: resetting devices .. done
64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40
39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15
14 13 12 11 10 9 8 7 6 5 4 3 2 1
---
#0 dumpsys () at ../../kern/kern_shutdown.c:487
487 if (dumping++) {
(kgdb) where
#0 dumpsys () at ../../kern/kern_shutdown.c:487
#1 0xc014a2fb in boot (howto=260) at ../../kern/kern_shutdown.c:316
#2 0xc014a739 in panic (fmt=0xc0243ee4 "from debugger")
at ../../kern/kern_shutdown.c:595
#3 0xc01201ad in db_panic (addr=-1072146221, have_addr=0, count=-1,
modif=0xc620ab70 "") at ../../ddb/db_command.c:435
#4 0xc012014d in db_command (last_cmdp=0xc026d334, cmd_table=0xc026d174,
aux_cmd_tablep=0xc0286038) at ../../ddb/db_command.c:333
#5 0xc0120212 in db_command_loop () at ../../ddb/db_command.c:457
#6 0xc012234f in db_trap (type=12, code=0) at ../../ddb/db_trap.c:71
#7 0xc0225bf6 in kdb_trap (type=12, code=0, regs=0xc620acc4)
at ../../i386/i386/db_interface.c:158
#8 0xc0232f94 in trap_fatal (frame=0xc620acc4, eva=3768221692)
at ../../i386/i386/trap.c:961
#9 0xc0232c6d in trap_pfault (frame=0xc620acc4, usermode=0, eva=3768221692)
at ../../i386/i386/trap.c:859
#10 0xc02327e7 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16,
tf_edi = 1168, tf_esi = -1063616512, tf_ebp = -970937068,
tf_isp = -970937104, tf_ebx = -1063620608, tf_edx = 134217727,
tf_ecx = 31, tf_eax = -2147483648, tf_trapno = 12, tf_err = 0,
tf_eip = -1072146221, tf_cs = 8, tf_eflags = 68246, tf_esp = 268435455,
tf_ss = 268435455}) at ../../i386/i386/trap.c:458
#11 0xc01858d3 in updatefats (pmp=0xc09a7000, bp=0xc1d2203c, fatbn=1168)
at ../../msdosfs/msdosfs_fat.c:353
#12 0xc0185f2e in fatchain (pmp=0xc09a7000, start=146136, count=0,
fillwith=4294967295) at ../../msdosfs/msdosfs_fat.c:674
#13 0xc018604d in chainalloc (pmp=0xc09a7000, start=146135, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:748
#14 0xc018624a in clusteralloc (pmp=0xc09a7000, start=0, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:842
#15 0xc01866bd in extendfile (dep=0xc09cf400, count=1, bpp=0x0, ncp=0x0,
flags=0) at ../../msdosfs/msdosfs_fat.c:1034
#16 0xc0189875 in msdosfs_write (ap=0xc620ae64)
at ../../msdosfs/msdosfs_vnops.c:725
#17 0xc017f45e in vn_write (fp=0xc09a66c0, uio=0xc620aed4, cred=0xc099ca00,
flags=0, p=0xc5749700) at vnode_if.h:363
#18 0xc0159b91 in dofilewrite (p=0xc5749700, fp=0xc09a66c0, fd=1,
buf=0x80a4000, nbyte=2471, offset=-1, flags=0) at ../../sys/file.h:162
#19 0xc0159a4a in write (p=0xc5749700, uap=0xc620af80)
at ../../kern/sys_generic.c:329
#20 0xc0233275 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
tf_edi = 134799256, tf_esi = 134889472, tf_ebp = -1077938804,
tf_isp = -970936364, tf_ebx = 134799256, tf_edx = 134697044,
tf_ecx = 134864896, tf_eax = 4, tf_trapno = 12, tf_err = 2,
tf_eip = 134705060, tf_cs = 31, tf_eflags = 659, tf_esp = -1077938848,
tf_ss = 47}) at ../../i386/i386/trap.c:1167
#21 0xc0226ad5 in Xint0x80_syscall ()
#22 0x80750a9 in ?? ()
#23 0x8076bf4 in ?? ()
#24 0x8074fb7 in ?? ()
#25 0x8076ffa in ?? ()
#26 0x8048955 in ?? ()
#27 0x8048135 in ?? ()
(kgdb)
#0 dumpsys () at ../../kern/kern_shutdown.c:487
#1 0xc014a2fb in boot (howto=260) at ../../kern/kern_shutdown.c:316
#2 0xc014a739 in panic (fmt=0xc0243ee4 "from debugger")
at ../../kern/kern_shutdown.c:595
#3 0xc01201ad in db_panic (addr=-1072146221, have_addr=0, count=-1,
modif=0xc620ab70 "") at ../../ddb/db_command.c:435
#4 0xc012014d in db_command (last_cmdp=0xc026d334, cmd_table=0xc026d174,
aux_cmd_tablep=0xc0286038) at ../../ddb/db_command.c:333
#5 0xc0120212 in db_command_loop () at ../../ddb/db_command.c:457
#6 0xc012234f in db_trap (type=12, code=0) at ../../ddb/db_trap.c:71
#7 0xc0225bf6 in kdb_trap (type=12, code=0, regs=0xc620acc4)
at ../../i386/i386/db_interface.c:158
#8 0xc0232f94 in trap_fatal (frame=0xc620acc4, eva=3768221692)
at ../../i386/i386/trap.c:961
#9 0xc0232c6d in trap_pfault (frame=0xc620acc4, usermode=0, eva=3768221692)
at ../../i386/i386/trap.c:859
#10 0xc02327e7 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16,
tf_edi = 1168, tf_esi = -1063616512, tf_ebp = -970937068,
tf_isp = -970937104, tf_ebx = -1063620608, tf_edx = 134217727,
tf_ecx = 31, tf_eax = -2147483648, tf_trapno = 12, tf_err = 0,
tf_eip = -1072146221, tf_cs = 8, tf_eflags = 68246, tf_esp = 268435455,
tf_ss = 268435455}) at ../../i386/i386/trap.c:458
#11 0xc01858d3 in updatefats (pmp=0xc09a7000, bp=0xc1d2203c, fatbn=1168)
at ../../msdosfs/msdosfs_fat.c:353
#12 0xc0185f2e in fatchain (pmp=0xc09a7000, start=146136, count=0,
fillwith=4294967295) at ../../msdosfs/msdosfs_fat.c:674
#13 0xc018604d in chainalloc (pmp=0xc09a7000, start=146135, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:748
#14 0xc018624a in clusteralloc (pmp=0xc09a7000, start=0, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:842
#15 0xc01866bd in extendfile (dep=0xc09cf400, count=1, bpp=0x0, ncp=0x0,
flags=0) at ../../msdosfs/msdosfs_fat.c:1034
#16 0xc0189875 in msdosfs_write (ap=0xc620ae64)
at ../../msdosfs/msdosfs_vnops.c:725
#17 0xc017f45e in vn_write (fp=0xc09a66c0, uio=0xc620aed4, cred=0xc099ca00,
flags=0, p=0xc5749700) at vnode_if.h:363
#18 0xc0159b91 in dofilewrite (p=0xc5749700, fp=0xc09a66c0, fd=1,
buf=0x80a4000, nbyte=2471, offset=-1, flags=0) at ../../sys/file.h:162
#19 0xc0159a4a in write (p=0xc5749700, uap=0xc620af80)
at ../../kern/sys_generic.c:329
#20 0xc0233275 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
tf_edi = 134799256, tf_esi = 134889472, tf_ebp = -1077938804,
tf_isp = -970936364, tf_ebx = 134799256, tf_edx = 134697044,
tf_ecx = 134864896, tf_eax = 4, tf_trapno = 12, tf_err = 2,
tf_eip = 134705060, tf_cs = 31, tf_eflags = 659, tf_esp = -1077938848,
tf_ss = 47}) at ../../i386/i386/trap.c:1167
#21 0xc0226ad5 in Xint0x80_syscall ()
#22 0x80750a9 in ?? ()
#23 0x8076bf4 in ?? ()
#24 0x8074fb7 in ?? ()
#25 0x8076ffa in ?? ()
#26 0x8048955 in ?? ()
#27 0x8048135 in ?? ()
(kgdb)
#0 dumpsys () at ../../kern/kern_shutdown.c:487
#1 0xc014a2fb in boot (howto=260) at ../../kern/kern_shutdown.c:316
#2 0xc014a739 in panic (fmt=0xc0243ee4 "from debugger")
at ../../kern/kern_shutdown.c:595
#3 0xc01201ad in db_panic (addr=-1072146221, have_addr=0, count=-1,
modif=0xc620ab70 "") at ../../ddb/db_command.c:435
#4 0xc012014d in db_command (last_cmdp=0xc026d334, cmd_table=0xc026d174,
aux_cmd_tablep=0xc0286038) at ../../ddb/db_command.c:333
#5 0xc0120212 in db_command_loop () at ../../ddb/db_command.c:457
#6 0xc012234f in db_trap (type=12, code=0) at ../../ddb/db_trap.c:71
#7 0xc0225bf6 in kdb_trap (type=12, code=0, regs=0xc620acc4)
at ../../i386/i386/db_interface.c:158
#8 0xc0232f94 in trap_fatal (frame=0xc620acc4, eva=3768221692)
at ../../i386/i386/trap.c:961
#9 0xc0232c6d in trap_pfault (frame=0xc620acc4, usermode=0, eva=3768221692)
at ../../i386/i386/trap.c:859
#10 0xc02327e7 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16,
tf_edi = 1168, tf_esi = -1063616512, tf_ebp = -970937068,
tf_isp = -970937104, tf_ebx = -1063620608, tf_edx = 134217727,
tf_ecx = 31, tf_eax = -2147483648, tf_trapno = 12, tf_err = 0,
tf_eip = -1072146221, tf_cs = 8, tf_eflags = 68246, tf_esp = 268435455,
tf_ss = 268435455}) at ../../i386/i386/trap.c:458
#11 0xc01858d3 in updatefats (pmp=0xc09a7000, bp=0xc1d2203c, fatbn=1168)
at ../../msdosfs/msdosfs_fat.c:353
#12 0xc0185f2e in fatchain (pmp=0xc09a7000, start=146136, count=0,
fillwith=4294967295) at ../../msdosfs/msdosfs_fat.c:674
#13 0xc018604d in chainalloc (pmp=0xc09a7000, start=146135, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:748
#14 0xc018624a in clusteralloc (pmp=0xc09a7000, start=0, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:842
#15 0xc01866bd in extendfile (dep=0xc09cf400, count=1, bpp=0x0, ncp=0x0,
flags=0) at ../../msdosfs/msdosfs_fat.c:1034
#16 0xc0189875 in msdosfs_write (ap=0xc620ae64)
at ../../msdosfs/msdosfs_vnops.c:725
#17 0xc017f45e in vn_write (fp=0xc09a66c0, uio=0xc620aed4, cred=0xc099ca00,
flags=0, p=0xc5749700) at vnode_if.h:363
#18 0xc0159b91 in dofilewrite (p=0xc5749700, fp=0xc09a66c0, fd=1,
buf=0x80a4000, nbyte=2471, offset=-1, flags=0) at ../../sys/file.h:162
#19 0xc0159a4a in write (p=0xc5749700, uap=0xc620af80)
at ../../kern/sys_generic.c:329
#20 0xc0233275 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
tf_edi = 134799256, tf_esi = 134889472, tf_ebp = -1077938804,
tf_isp = -970936364, tf_ebx = 134799256, tf_edx = 134697044,
tf_ecx = 134864896, tf_eax = 4, tf_trapno = 12, tf_err = 2,
tf_eip = 134705060, tf_cs = 31, tf_eflags = 659, tf_esp = -1077938848,
tf_ss = 47}) at ../../i386/i386/trap.c:1167
#21 0xc0226ad5 in Xint0x80_syscall ()
#22 0x80750a9 in ?? ()
#23 0x8076bf4 in ?? ()
#24 0x8074fb7 in ?? ()
#25 0x8076ffa in ?? ()
#26 0x8048955 in ?? ()
#27 0x8048135 in ?? ()
(kgdb)
#0 dumpsys () at ../../kern/kern_shutdown.c:487
#1 0xc014a2fb in boot (howto=260) at ../../kern/kern_shutdown.c:316
#2 0xc014a739 in panic (fmt=0xc0243ee4 "from debugger")
at ../../kern/kern_shutdown.c:595
#3 0xc01201ad in db_panic (addr=-1072146221, have_addr=0, count=-1,
modif=0xc620ab70 "") at ../../ddb/db_command.c:435
#4 0xc012014d in db_command (last_cmdp=0xc026d334, cmd_table=0xc026d174,
aux_cmd_tablep=0xc0286038) at ../../ddb/db_command.c:333
#5 0xc0120212 in db_command_loop () at ../../ddb/db_command.c:457
#6 0xc012234f in db_trap (type=12, code=0) at ../../ddb/db_trap.c:71
#7 0xc0225bf6 in kdb_trap (type=12, code=0, regs=0xc620acc4)
at ../../i386/i386/db_interface.c:158
#8 0xc0232f94 in trap_fatal (frame=0xc620acc4, eva=3768221692)
at ../../i386/i386/trap.c:961
#9 0xc0232c6d in trap_pfault (frame=0xc620acc4, usermode=0, eva=3768221692)
at ../../i386/i386/trap.c:859
#10 0xc02327e7 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16,
tf_edi = 1168, tf_esi = -1063616512, tf_ebp = -970937068,
tf_isp = -970937104, tf_ebx = -1063620608, tf_edx = 134217727,
tf_ecx = 31, tf_eax = -2147483648, tf_trapno = 12, tf_err = 0,
tf_eip = -1072146221, tf_cs = 8, tf_eflags = 68246, tf_esp = 268435455,
tf_ss = 268435455}) at ../../i386/i386/trap.c:458
#11 0xc01858d3 in updatefats (pmp=0xc09a7000, bp=0xc1d2203c, fatbn=1168)
at ../../msdosfs/msdosfs_fat.c:353
#12 0xc0185f2e in fatchain (pmp=0xc09a7000, start=146136, count=0,
fillwith=4294967295) at ../../msdosfs/msdosfs_fat.c:674
#13 0xc018604d in chainalloc (pmp=0xc09a7000, start=146135, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:748
#14 0xc018624a in clusteralloc (pmp=0xc09a7000, start=0, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:842
#15 0xc01866bd in extendfile (dep=0xc09cf400, count=1, bpp=0x0, ncp=0x0,
flags=0) at ../../msdosfs/msdosfs_fat.c:1034
#16 0xc0189875 in msdosfs_write (ap=0xc620ae64)
at ../../msdosfs/msdosfs_vnops.c:725
#17 0xc017f45e in vn_write (fp=0xc09a66c0, uio=0xc620aed4, cred=0xc099ca00,
flags=0, p=0xc5749700) at vnode_if.h:363
#18 0xc0159b91 in dofilewrite (p=0xc5749700, fp=0xc09a66c0, fd=1,
buf=0x80a4000, nbyte=2471, offset=-1, flags=0) at ../../sys/file.h:162
#19 0xc0159a4a in write (p=0xc5749700, uap=0xc620af80)
at ../../kern/sys_generic.c:329
#20 0xc0233275 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
tf_edi = 134799256, tf_esi = 134889472, tf_ebp = -1077938804,
tf_isp = -970936364, tf_ebx = 134799256, tf_edx = 134697044,
tf_ecx = 134864896, tf_eax = 4, tf_trapno = 12, tf_err = 2,
tf_eip = 134705060, tf_cs = 31, tf_eflags = 659, tf_esp = -1077938848,
tf_ss = 47}) at ../../i386/i386/trap.c:1167
#21 0xc0226ad5 in Xint0x80_syscall ()
#22 0x80750a9 in ?? ()
#23 0x8076bf4 in ?? ()
#24 0x8074fb7 in ?? ()
#25 0x8076ffa in ?? ()
#26 0x8048955 in ?? ()
#27 0x8048135 in ?? ()
(kgdb)
#0 dumpsys () at ../../kern/kern_shutdown.c:487
#1 0xc014a2fb in boot (howto=260) at ../../kern/kern_shutdown.c:316
#2 0xc014a739 in panic (fmt=0xc0243ee4 "from debugger")
at ../../kern/kern_shutdown.c:595
#3 0xc01201ad in db_panic (addr=-1072146221, have_addr=0, count=-1,
modif=0xc620ab70 "") at ../../ddb/db_command.c:435
#4 0xc012014d in db_command (last_cmdp=0xc026d334, cmd_table=0xc026d174,
aux_cmd_tablep=0xc0286038) at ../../ddb/db_command.c:333
#5 0xc0120212 in db_command_loop () at ../../ddb/db_command.c:457
#6 0xc012234f in db_trap (type=12, code=0) at ../../ddb/db_trap.c:71
#7 0xc0225bf6 in kdb_trap (type=12, code=0, regs=0xc620acc4)
at ../../i386/i386/db_interface.c:158
#8 0xc0232f94 in trap_fatal (frame=0xc620acc4, eva=3768221692)
at ../../i386/i386/trap.c:961
#9 0xc0232c6d in trap_pfault (frame=0xc620acc4, usermode=0, eva=3768221692)
at ../../i386/i386/trap.c:859
#10 0xc02327e7 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16,
tf_edi = 1168, tf_esi = -1063616512, tf_ebp = -970937068,
tf_isp = -970937104, tf_ebx = -1063620608, tf_edx = 134217727,
tf_ecx = 31, tf_eax = -2147483648, tf_trapno = 12, tf_err = 0,
tf_eip = -1072146221, tf_cs = 8, tf_eflags = 68246, tf_esp = 268435455,
tf_ss = 268435455}) at ../../i386/i386/trap.c:458
#11 0xc01858d3 in updatefats (pmp=0xc09a7000, bp=0xc1d2203c, fatbn=1168)
at ../../msdosfs/msdosfs_fat.c:353
#12 0xc0185f2e in fatchain (pmp=0xc09a7000, start=146136, count=0,
fillwith=4294967295) at ../../msdosfs/msdosfs_fat.c:674
#13 0xc018604d in chainalloc (pmp=0xc09a7000, start=146135, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:748
#14 0xc018624a in clusteralloc (pmp=0xc09a7000, start=0, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:842
#15 0xc01866bd in extendfile (dep=0xc09cf400, count=1, bpp=0x0, ncp=0x0,
flags=0) at ../../msdosfs/msdosfs_fat.c:1034
#16 0xc0189875 in msdosfs_write (ap=0xc620ae64)
at ../../msdosfs/msdosfs_vnops.c:725
#17 0xc017f45e in vn_write (fp=0xc09a66c0, uio=0xc620aed4, cred=0xc099ca00,
flags=0, p=0xc5749700) at vnode_if.h:363
#18 0xc0159b91 in dofilewrite (p=0xc5749700, fp=0xc09a66c0, fd=1,
buf=0x80a4000, nbyte=2471, offset=-1, flags=0) at ../../sys/file.h:162
#19 0xc0159a4a in write (p=0xc5749700, uap=0xc620af80)
at ../../kern/sys_generic.c:329
#20 0xc0233275 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
tf_edi = 134799256, tf_esi = 134889472, tf_ebp = -1077938804,
tf_isp = -970936364, tf_ebx = 134799256, tf_edx = 134697044,
tf_ecx = 134864896, tf_eax = 4, tf_trapno = 12, tf_err = 2,
tf_eip = 134705060, tf_cs = 31, tf_eflags = 659, tf_esp = -1077938848,
tf_ss = 47}) at ../../i386/i386/trap.c:1167
#21 0xc0226ad5 in Xint0x80_syscall ()
#22 0x80750a9 in ?? ()
#23 0x8076bf4 in ?? ()
#24 0x8074fb7 in ?? ()
#25 0x8076ffa in ?? ()
#26 0x8048955 in ?? ()
#27 0x8048135 in ?? ()
(kgdb)
#0 dumpsys () at ../../kern/kern_shutdown.c:487
#1 0xc014a2fb in boot (howto=260) at ../../kern/kern_shutdown.c:316
#2 0xc014a739 in panic (fmt=0xc0243ee4 "from debugger")
at ../../kern/kern_shutdown.c:595
#3 0xc01201ad in db_panic (addr=-1072146221, have_addr=0, count=-1,
modif=0xc620ab70 "") at ../../ddb/db_command.c:435
#4 0xc012014d in db_command (last_cmdp=0xc026d334, cmd_table=0xc026d174,
aux_cmd_tablep=0xc0286038) at ../../ddb/db_command.c:333
#5 0xc0120212 in db_command_loop () at ../../ddb/db_command.c:457
#6 0xc012234f in db_trap (type=12, code=0) at ../../ddb/db_trap.c:71
#7 0xc0225bf6 in kdb_trap (type=12, code=0, regs=0xc620acc4)
at ../../i386/i386/db_interface.c:158
#8 0xc0232f94 in trap_fatal (frame=0xc620acc4, eva=3768221692)
at ../../i386/i386/trap.c:961
#9 0xc0232c6d in trap_pfault (frame=0xc620acc4, usermode=0, eva=3768221692)
at ../../i386/i386/trap.c:859
#10 0xc02327e7 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16,
tf_edi = 1168, tf_esi = -1063616512, tf_ebp = -970937068,
tf_isp = -970937104, tf_ebx = -1063620608, tf_edx = 134217727,
tf_ecx = 31, tf_eax = -2147483648, tf_trapno = 12, tf_err = 0,
tf_eip = -1072146221, tf_cs = 8, tf_eflags = 68246, tf_esp = 268435455,
tf_ss = 268435455}) at ../../i386/i386/trap.c:458
#11 0xc01858d3 in updatefats (pmp=0xc09a7000, bp=0xc1d2203c, fatbn=1168)
at ../../msdosfs/msdosfs_fat.c:353
#12 0xc0185f2e in fatchain (pmp=0xc09a7000, start=146136, count=0,
fillwith=4294967295) at ../../msdosfs/msdosfs_fat.c:674
#13 0xc018604d in chainalloc (pmp=0xc09a7000, start=146135, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:748
#14 0xc018624a in clusteralloc (pmp=0xc09a7000, start=0, count=1,
fillwith=4294967295, retcluster=0xc620addc, got=0xc620add8)
at ../../msdosfs/msdosfs_fat.c:842
#15 0xc01866bd in extendfile (dep=0xc09cf400, count=1, bpp=0x0, ncp=0x0,
flags=0) at ../../msdosfs/msdosfs_fat.c:1034
#16 0xc0189875 in msdosfs_write (ap=0xc620ae64)
at ../../msdosfs/msdosfs_vnops.c:725
#17 0xc017f45e in vn_write (fp=0xc09a66c0, uio=0xc620aed4, cred=0xc099ca00,
flags=0, p=0xc5749700) at vnode_if.h:363
#18 0xc0159b91 in dofilewrite (p=0xc5749700, fp=0xc09a66c0, fd=1,
buf=0x80a4000, nbyte=2471, offset=-1, flags=0) at ../../sys/file.h:162
#19 0xc0159a4a in write (p=0xc5749700, uap=0xc620af80)
at ../../kern/sys_generic.c:329
#20 0xc0233275 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
tf_edi = 134799256, tf_esi = 134889472, tf_ebp = -1077938804,
tf_isp = -970936364, tf_ebx = 134799256, tf_edx = 134697044,
tf_ecx = 134864896, tf_eax = 4, tf_trapno = 12, tf_err = 2,
tf_eip = 134705060, tf_cs = 31, tf_eflags = 659, tf_esp = -1077938848,
tf_ss = 47}) at ../../i386/i386/trap.c:1167
#21 0xc0226ad5 in Xint0x80_syscall ()
#22 0x80750a9 in ?? ()
#23 0x8076bf4 in ?? ()
#24 0x8074fb7 in ?? ()
#25 0x8076ffa in ?? ()
#26 0x8048955 in ?? ()
#27 0x8048135 in ?? ()
(kgdb) q
---

Seems to me the bug is in /sys/msdosfs/msdosfs_fat.c:353, but I think it may
be better to have the original developer look into this.

Good luck, and contact me if any more info is needed. I will make the
vmcore.0 and kernel.debug files available on request.

--Rink Springer


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004101c1e6f6$cdb9be50$0400000a>