Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 2002 17:35:04 +0200
From:      "Simon L. Nielsen" <simon@nitro.dk>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Kernel panic writeing to FAT32
Message-ID:  <20020728153502.GD342@nitro.dk>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]

Hello

My FreeBSD (4.6(.1) recent RELENG_4_6) crashes/panics when I try to write data
to it.  I can reproduce it easily by a simple "echo 123 >
/mnt/newdata/testfile" - where /mnt/newdata is the FAT32 partion.  I have
previusly written files to the partion without problems and I can write to
another FAT32 partion I have (on another harddisk) without crashes.

The FAT32 partion is /dev/ad0s5.

If anybody can see the problem i'm very willing to try patches... If you need
more information please just mail me.

The mail is a bit big, but I wanted to make sure I included as much to help
debugging the problem as posible.

Btw. when I was doing the crashdump I had to type "panic" and "continue" a few
times before it would write the crashdump.. Is this normal?

[root@arthur:simon] uname -a
FreeBSD arthur.bofh 4.6.1-RELEASE FreeBSD 4.6.1-RELEASE #0: Sun Jul 28 16:39:50 CEST 2002     root@arthur.bofh:/usr/obj/usr/src/sys/ARTHUR-D  i386

[root@arthur:simon] fdisk ad0
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=9732 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=9732 heads=255 sectors/track=63 (16065 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 7,(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX)
    start 63, size 41945652 (20481 Meg), flag 0
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 15,(Extended DOS, LBA)
    start 41945715, size 62910540 (30718 Meg), flag 0
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
    start 104856255, size 51488325 (25140 Meg), flag 80 (active)
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 254/ sector 63
The data for partition 4 is:
<UNUSED>

[root@arthur:~] gdb -k /kernel.debug /var/crash/vmcore.0
GNU gdb 4.18 (FreeBSD)
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 0x005b2000
initial pcb at physical address 0x004cde60
panicstr: from debugger
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xe16f0ffc
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc023395f
stack pointer           = 0x10:0xcddd6d04
frame pointer           = 0x10:0xcddd6d14
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         = 189 (csh)
interrupt mask          = none


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xe16f0ffc
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc023395f
stack pointer           = 0x10:0xcddd6d04
frame pointer           = 0x10:0xcddd6d14
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         = 189 (csh)
interrupt mask          = none
panic: from debugger


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xe16f0ffc
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc023395f
stack pointer           = 0x10:0xcddd6d04
frame pointer           = 0x10:0xcddd6d14
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         = 189 (csh)
interrupt mask          = none


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xe16f0ffc
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc023395f
stack pointer           = 0x10:0xcddd6d04
frame pointer           = 0x10:0xcddd6d14
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         = 189 (csh)
interrupt mask          = none


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xe16f0ffc
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc023395f
stack pointer           = 0x10:0xcddd6d04
frame pointer           = 0x10:0xcddd6d14
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         = 189 (csh)
interrupt mask          = none

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xe16f0ffc
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc023395f
stack pointer           = 0x10:0xcddd6d04
frame pointer           = 0x10:0xcddd6d14
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         = 189 (csh)
interrupt mask          = none
panic: from debugger
Uptime: 1m16s

dumping to dev #ad/0x40001, offset 1572992
dump ata0: resetting devices .. done
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 162 161 160 159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 
141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 
103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 5
4 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 
---
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487
487             if (dumping++) {
(kgdb) where
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487
#1  0xc01f8633 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:316
#2  0xc01f8a71 in panic (fmt=0xc03dada4 "from debugger")
    at /usr/src/sys/kern/kern_shutdown.c:595
#3  0xc014c771 in db_panic (addr=-1071433377, have_addr=0, count=-1, 
    modif=0xcddd6b70 "") at /usr/src/sys/ddb/db_command.c:435
#4  0xc014c711 in db_command (last_cmdp=0xc04504f8, cmd_table=0xc0450338, 
    aux_cmd_tablep=0xc04ac378) at /usr/src/sys/ddb/db_command.c:333
#5  0xc014c7d6 in db_command_loop () at /usr/src/sys/ddb/db_command.c:457
#6  0xc014e913 in db_trap (type=12, code=0) at /usr/src/sys/ddb/db_trap.c:71
#7  0xc03a0826 in kdb_trap (type=12, code=0, regs=0xcddd6cc4)
    at /usr/src/sys/i386/i386/db_interface.c:158
#8  0xc03b05f8 in trap_fatal (frame=0xcddd6cc4, eva=3782152188)
    at /usr/src/sys/i386/i386/trap.c:961
#9  0xc03b02d1 in trap_pfault (frame=0xcddd6cc4, usermode=0, eva=3782152188)
    at /usr/src/sys/i386/i386/trap.c:859
#10 0xc03afe77 in trap (frame={tf_fs = 16, tf_es = 16, tf_ds = 16, 
      tf_edi = 15288, tf_esi = -1049686016, tf_ebp = -841126636, 
      tf_isp = -841126672, tf_ebx = -1049690112, tf_edx = 134217727, 
      tf_ecx = 31, tf_eax = -2147483648, tf_trapno = 12, tf_err = 0, 
      tf_eip = -1071433377, tf_cs = 8, tf_eflags = 68246, tf_esp = 268435455, 
      tf_ss = 268435455}) at /usr/src/sys/i386/i386/trap.c:458
#11 0xc023395f in updatefats (pmp=0xc16f0000, bp=0xc6808450, fatbn=15288)
    at /usr/src/sys/msdosfs/msdosfs_fat.c:353
---Type <return> to continue, or q <return> to quit---
#12 0xc0233fea in fatchain (pmp=0xc16f0000, start=1952833, count=0, 
    fillwith=4294967295) at /usr/src/sys/msdosfs/msdosfs_fat.c:674
#13 0xc0234109 in chainalloc (pmp=0xc16f0000, start=1952832, count=1, 
    fillwith=4294967295, retcluster=0xcddd6ddc, got=0xcddd6dd8)
    at /usr/src/sys/msdosfs/msdosfs_fat.c:748
#14 0xc0234306 in clusteralloc (pmp=0xc16f0000, start=0, count=1, 
    fillwith=4294967295, retcluster=0xcddd6ddc, got=0xcddd6dd8)
    at /usr/src/sys/msdosfs/msdosfs_fat.c:842
#15 0xc0234779 in extendfile (dep=0xc1838e00, count=1, bpp=0x0, ncp=0x0, 
    flags=0) at /usr/src/sys/msdosfs/msdosfs_fat.c:1034
#16 0xc0237959 in msdosfs_write (ap=0xcddd6e64)
    at /usr/src/sys/msdosfs/msdosfs_vnops.c:732
#17 0xc022d536 in vn_write (fp=0xc17864c0, uio=0xcddd6ed4, cred=0xc1831b00, 
    flags=0, p=0xcc2aa220) at vnode_if.h:363
#18 0xc0207ee9 in dofilewrite (p=0xcc2aa220, fp=0xc17864c0, fd=1, 
    buf=0x8128720, nbyte=4, offset=-1, flags=0) at /usr/src/sys/sys/file.h:162
#19 0xc0207da0 in write (p=0xcc2aa220, uap=0xcddd6f80)
    at /usr/src/sys/kern/sys_generic.c:329
#20 0xc03b08ed in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, 
      tf_edi = 135719928, tf_esi = 0, tf_ebp = -1077954372, 
      tf_isp = -841125932, tf_ebx = 10, tf_edx = 1, tf_ecx = 135126434, 
      tf_eax = 4, tf_trapno = 22, tf_err = 2, tf_eip = 134966396, tf_cs = 31, 
      tf_eflags = 659, tf_esp = -1077954400, tf_ss = 47})
    at /usr/src/sys/i386/i386/trap.c:1167
---Type <return> to continue, or q <return> to quit---
#21 0xc03a16f5 in Xint0x80_syscall ()
#22 0x805d9d0 in ?? ()
#23 0x8054b82 in ?? ()
#24 0x805486b in ?? ()
#25 0x80534b4 in ?? ()
#26 0x8060a0b in ?? ()
#27 0x8060c49 in ?? ()
#28 0x804a84b in ?? ()
#29 0x8049a77 in ?? ()
#30 0x8048135 in ?? ()

[simon@arthur:~] cat /var/run/dmesg.boot 
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.6.1-RELEASE #0: Sun Jul 28 16:39:50 CEST 2002
    root@arthur.bofh:/usr/obj/usr/src/sys/ARTHUR-D
Timecounter "i8254"  frequency 1193182 Hz
CPU: AMD Athlon(tm) Processor (604.23-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x621  Stepping = 1
  Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
  AMD Features=0xc0400000<AMIE,DSP,3DNow!>
real memory  = 268369920 (262080K bytes)
avail memory = 255414272 (249428K bytes)
Preloaded elf kernel "kernel" at 0xc0593000.
netsmb_dev: loaded
Pentium Pro MTRR support enabled
md0: Malloc disk
Using $PIR table, 7 entries at 0xc00f8120
apm0: <APM BIOS> on motherboard
apm: found APM BIOS v1.2, connected at v1.2
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <AMD-751 host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <AMD-751 PCI-PCI (1x/2x AGP) bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <NVidia GeForce DDR graphics accelerator> at 5.0 irq 11
isab0: <VIA 82C686 PCI-ISA bridge> at device 4.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C686 ATA66 controller> port 0xffa0-0xffaf at device 4.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xd000-0xd01f irq 9 at device 4.2 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xd400-0xd41f irq 9 at device 4.3 on pci0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
ichsmb0: <SMBus controller> at device 4.4 on pci0
device_probe_and_attach: ichsmb0 attach returned 6
sym0: <860> port 0xd800-0xd8ff mem 0xefffff00-0xefffffff irq 10 at device 15.0 on pci0
sym0: Symbios NVRAM, ID 7, Fast-20, SE, parity checking
sym0: open drain IRQ line driver
sym0: using LOAD/STORE-based firmware.
sym0: SCAN AT BOOT disabled for targets 0 1 2 3 5 6.
xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xcc00-0xcc7f mem 0xeffffe80-0xeffffeff irq 9 at device 16.0 on pci0
xl0: Ethernet address: 00:10:4b:9d:f0:f9
miibus0: <MII bus> on xl0
xlphy0: <3Com internal media interface> on miibus0
xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
orm0: <Option ROM> at iomem 0xc0000-0xcbfff on isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model GlidePoint, device ID 0
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 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
ppi0: <Parallel I/O> on ppbus0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
Vendor Specific Word = ffff
sbc0: <SoundBlaster 16> at port 0x240-0x24f irq 5 drq 1 flags 0x15 on isa0
pcm0: <SB16 DSP 4.13> on sbc0
DUMMYNET initialized (011031)
IP packet filtering initialized, divert disabled, rule-based forwarding disabled, default to deny, logging limited to 100 packets/entry by default
IPsec: Initialized Security Association Processing.
ad0: 76345MB <MAXTOR 6L080L4> [155114/16/63] at ata0-master UDMA66
ad1: 29314MB <IBM-DTLA-307030> [59560/16/63] at ata0-slave UDMA66
acd0: CDROM <CD-952E/TKU> at ata1-master PIO4
Waiting 2 seconds for SCSI devices to settle
(noperiph:sym0:0:-1:-1): SCSI BUS reset delivered.
sa0 at sym0 bus 0 target 4 lun 0
sa0: <HP C1537A L907> Removable Sequential Access SCSI-2 device 
sa0: 10.000MB/s transfers (10.000MHz, offset 8)
Mounting root from ufs:/dev/ad0s3a

-- 
Simon L. Nielsen

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9RA8m8kocFXgPTRwRAsw/AKDMJbGvrnxojcC0WDqWiQ3WKaMRYACgnOAH
PDXy+enWFaqhros/2yaAhhw=
=0RZt
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020728153502.GD342>