Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Oct 2007 23:42:47 -0400 (EDT)
From:      "Mikhail T." <mi@aldan.algebra.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/117005: Accidental unplugging of a USB disk results in crash
Message-ID:  <200710080342.l983glH0002168@aldan.algebra.com>
Resent-Message-ID: <200710080420.l984K1iL060347@freefall.freebsd.org>

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

>Number:         117005
>Category:       kern
>Synopsis:       Accidental unplugging of a USB disk results in crash
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 08 04:20:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Mikhail T.
>Release:        FreeBSD 6.2-STABLE amd64
>Organization:
Virtual Estates, Inc.
>Environment:
System: FreeBSD aldan.algebra.com 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Sep 16 20:59:39 EDT 2007 root@aldan.algebra.com:/var/src/sys/amd64/compile/SILVER-SMP amd64

>Description:
	After copying data to an external hard-drive (USB) I --
	accidentally -- unplugged it before performing `umount'.

	This lead to the below panic -- quite pathetic for
	a modern OS, which prides itself in /stability/.

Unread portion of the kernel message buffer:
g_vfs_done():da6s1[WRITE(offset=25088834560, length=32768)]error = 6
g_vfs_done():da6s1[WRITE(offset=38021282816, length=32768)]error = 6
g_vfs_done():da6s1[WRITE(offset=12206652416, length=32768)]error = 6
g_vfs_done():da6s1[WRITE(offset=33389657088, length=32768)]error = 6
g_vfs_done():da6s1[WRITE(offset=25088834560, length=32768)]error = 6
fsync: giving up on dirty
0xffffff00111b0000: tag msdosfs, type VREG
    usecount 1, writecount 0, refcount 143 mountedhere 0
    flags ()
    v_object 0xffffff00073d6540 ref 0 pages 1128
     lock type msdosfs: EXCL (count 1) by thread 0xffffff007a41d260 (pid 42015)
	startcluster 765214, dircluster 1046373, diroffset 1248, 

Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address	= 0xa0
fault code		= supervisor read data, page not present
instruction pointer	= 0x8:0xffffffff80284831
stack pointer	        = 0x10:0xffffffffd5232800
frame pointer	        = 0x10:0x0
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 42015 (umount)
trap number		= 12
panic: page fault
cpuid = 3
Uptime: 4d15h58m21s
(da6:dead_sim0:0:0:0): Synchronize cache failed, status == 0x8, scsi status == 0x0
Dumping 2047 MB (2 chunks)
  chunk 0: 1MB (156 pages) ... ok
  chunk 1: 2047MB (524016 pages) (CTRL-C to abort)  (CTRL-C to abort)  2031 (CTRL-C to abort)  2015 1999 1983 1967 1951 1935 1919 1903 1887 1871 1855 1839 1823 1807 1791 1775 1759 1743 1727 1711 1695 1679 1663 1647 1631 1615 1599 1583 1567 1551 1535 1519 1503 1487 1471 1455 1439 1423 1407 1391 1375 1359 1343 1327 1311 1295 1279 1263 1247 1231 1215 1199 1183 1167 1151 1135 1119 1103 1087 1071 1055 1039 1023 1007 991 975 959 943 927 911 895 879 863 847 831 815 799 783 767 751 735 719 703 687 671 655 639 623 607 591 575 559 543 527 511 495 479 463 447 431 415 399 383 367 351 335 319 303 287 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 31 15

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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 "amd64-marcel-freebsd"...
(kgdb) #0  doadump () at pcpu.h:172
#1  0x0000000000000004 in ?? ()
#2  0xffffffff802b7d07 in boot (howto=260) at ../../../kern/kern_shutdown.c:409
#3  0xffffffff802b83a1 in panic (fmt=0xffffff007a41d260 "XC\233w") at ../../../kern/kern_shutdown.c:565
#4  0xffffffff8041b62f in trap_fatal (frame=0xffffff007a41d260, eva=18446742976204587864)
    at ../../../amd64/amd64/trap.c:669
#5  0xffffffff8041b9ac in trap_pfault (frame=0xffffffffd5232750, usermode=0) at ../../../amd64/amd64/trap.c:580
#6  0xffffffff8041bc63 in trap (frame=
      {tf_rdi = 0, tf_rsi = -2136928256, tf_rdx = 1, tf_rcx = 1079945, tf_r8 = 1048064, tf_r9 = 32, tf_rax = 58, tf_rbx = -1098309017088, tf_rbp = 0, tf_r10 = -719116464, tf_r11 = 4294967220, tf_r12 = -1099224645632, tf_r13 = 0, tf_r14 = 4, tf_r15 = 35, tf_trapno = 12, tf_addr = 160, tf_flags = -1098269861760, tf_err = 0, tf_rip = -2144843727, tf_cs = 8, tf_rflags = 66178, tf_rsp = -719116272, tf_ss = 16}) at ../../../amd64/amd64/trap.c:353
#7  0xffffffff8040192b in calltrap () at ../../../amd64/amd64/exception.S:168
#8  0xffffffff80284831 in devtoname (dev=0x0) at ../../../kern/kern_conf.c:722
#9  0xffffffffd5748804 in ?? ()
#10 0x0000000000000023 in ?? ()
#11 0xffffff00111b0000 in ?? ()
#12 0xffffffffd5232870 in ?? ()
#13 0xffffffff80465afd in VOP_PRINT_APV (vop=0x3a, a=0xffffffff80a11000) at vnode_if.c:1896
#14 0xffffffff8032740d in vn_printf (vp=0xffffff0047ae6200, fmt=0x0) at vnode_if.h:971
#15 0xffffffff80319e5b in vop_stdfsync (ap=0xffffffffd5232a80) at ../../../kern/vfs_default.c:462
#16 0xffffffffd5746f01 in ?? ()
#17 0xffffffffd5232ad0 in ?? ()
#18 0xffffff00111b0000 in ?? ()
#19 0xffffffffd5232ad0 in ?? ()
#20 0xffffffff8046585d in VOP_FSYNC_APV (vop=0x3a, a=0xffffffff80a11000) at vnode_if.c:1020
#21 0xffffffffd5745b41 in ?? ()
#22 0x000000006e3c7e28 in ?? ()
#23 0xffffff00578f7000 in ?? ()
#24 0x00000001d5232aa0 in ?? ()
#25 0xffffff000e82ea00 in ?? ()
#26 0x0000000000001000 in ?? ()
#27 0xffffff006e3c7d90 in ?? ()
#28 0x0000000000000004 in ?? ()
#29 0xffffff007a41d260 in ?? ()
#30 0xffffffff8061ef20 in vop_remove_vp_offsets ()
#31 0xffffff00111b0000 in ?? ()
#32 0x0000000000000001 in ?? ()
#33 0xffffff007a41d260 in ?? ()
#34 0xffffffff8061eba0 in vop_bmap_vp_offsets ()
#35 0xffffff0018e59000 in ?? ()
#36 0xffffff007a41d260 in ?? ()
#37 0x0000000000001000 in ?? ()
#38 0x0000000008000000 in ?? ()
#39 0x0000000000000000 in ?? ()
#40 0x0000000000000004 in ?? ()
#41 0xffffffff8031fc18 in dounmount (mp=0xffffff00627ee318, flags=1652482960, td=0x0)
    at ../../../kern/vfs_mount.c:1232
#42 0xffffffff8032011f in unmount (td=0xffffff007a41d260, uap=0xffffffffd5232bc0) at ../../../kern/vfs_mount.c:1133
#43 0xffffffff8041c0bd in syscall (frame=
      {tf_rdi = 140737488346496, tf_rsi = 134217728, tf_rdx = 10, tf_rcx = 140737488345984, tf_r8 = 0, tf_r9 = 2, tf_rax = 22, tf_rbx = 140737488346496, tf_rbp = 140737488346432, tf_r10 = 140737488346144, tf_r11 = 4294967295, tf_r12 = 5273120, tf_r13 = 0, tf_r14 = 0, tf_r15 = 0, tf_trapno = 12, tf_addr = 34367033344, tf_flags = 0, tf_err = 2, tf_rip = 34366579372, tf_cs = 43, tf_rflags = 518, tf_rsp = 140737488346376, tf_ss = 35})
    at ../../../amd64/amd64/trap.c:799
#44 0xffffffff80401ac8 in Xfast_syscall () at ../../../amd64/amd64/exception.S:270
#45 0x00000008006862ac in ?? ()
(kgdb) 

>How-To-Repeat:
	See description.

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



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