Fatal trap 12 if you unmount detached umass device

From: Yuriy Tsibizov <Yuriy.Tsibizov_at_gfk.ru>
Date: Sun, 3 Jul 2005 11:59:57 +0400 (MSD)
It should be easy to reproduce if you don't follow
attach/mount/unmount/detach order:

1. attach usb storage device
2. mount it
3. detach it
4. unmount it.

Yuriy.


Copyright (c) 1992-2005 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 6.0-CURRENT #4: Sun Jul  3 10:41:23 MSD 2005
    chibis_at_free.home.local:/usr/obj/usr/src/sys/FREE
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: MPSAFE network stack disabled, expect reduced performance.
[...]
[attach card reader]
umass0: KTC cop Mass Storage, rev 1.10/1.00, addr 3
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <USB 1.1 Reader(SM) 2003> Removable Direct Access SCSI-2 device
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
(da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI Status: Check Condition
(da0:umass-sim0:0:0:0): NOT READY asc:3a,0
(da0:umass-sim0:0:0:0): Medium not present
(da0:umass-sim0:0:0:0): Unretryable error
Opened disk da0 -> 6
(da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI Status: Check Condition
(da0:umass-sim0:0:0:0): NOT READY asc:3a,0
(da0:umass-sim0:0:0:0): Medium not present
(da0:umass-sim0:0:0:0): Unretryable error
Opened disk da0 -> 6
(da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI Status: Check Condition
(da0:umass-sim0:0:0:0): NOT READY asc:3a,0
(da0:umass-sim0:0:0:0): Medium not present
(da0:umass-sim0:0:0:0): Unretryable error
Opened disk da0 -> 6
da1 at umass-sim0 bus 0 target 0 lun 1
da1: <USB 1.1 Reader(MS+/SD+) 2003> Removable Direct Access SCSI-2 device
da1: 1.000MB/s transfers
da1: 488MB (1000448 512 byte sectors: 64H 32S/T 488C)
da2 at umass-sim0 bus 0 target 0 lun 2
da2: <USB 1.1 Reader(CF) 2003> Removable Direct Access SCSI-2 device
da2: 1.000MB/s transfers
da2: Attempt to query device size failed: NOT READY, Medium not present
(da2:umass-sim0:0:0:2): READ CAPACITY. CDB: 25 40 0 0 0 0 0 0 0 0
(da2:umass-sim0:0:0:2): CAM Status: SCSI Status Error
(da2:umass-sim0:0:0:2): SCSI Status: Check Condition
(da2:umass-sim0:0:0:2): NOT READY asc:3a,0
(da2:umass-sim0:0:0:2): Medium not present
(da2:umass-sim0:0:0:2): Unretryable error
Opened disk da2 -> 6
(da2:umass-sim0:0:0:2): READ CAPACITY. CDB: 25 40 0 0 0 0 0 0 0 0
(da2:umass-sim0:0:0:2): CAM Status: SCSI Status Error
(da2:umass-sim0:0:0:2): SCSI Status: Check Condition
(da2:umass-sim0:0:0:2): NOT READY asc:3a,0
(da2:umass-sim0:0:0:2): Medium not present
(da2:umass-sim0:0:0:2): Unretryable error
Opened disk da2 -> 6
(da2:umass-sim0:0:0:2): READ CAPACITY. CDB: 25 40 0 0 0 0 0 0 0 0
(da2:umass-sim0:0:0:2): CAM Status: SCSI Status Error
(da2:umass-sim0:0:0:2): SCSI Status: Check Condition
(da2:umass-sim0:0:0:2): NOT READY asc:3a,0
(da2:umass-sim0:0:0:2): Medium not present
(da2:umass-sim0:0:0:2): Unretryable error
Opened disk da2 -> 6

[mount card in reader]

# mount -o ro -t msdosfs /dev/da1s1 /mnt

[detach card reader]

umass0: at uhub0 port 2 (addr 3) disconnected
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
(da1:umass-sim0:0:0:1): lost device
(da2:umass-sim0:0:0:2): lost device
(da2:umass-sim0:0:0:2): removing device entry
umass0: detached

# umount /mnt


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address	= 0xdeadc0ea
fault code		= supervisor read, page not present
instruction pointer	= 0x20:0xc043fe2e
stack pointer	        = 0x28:0xcca1bb08
frame pointer	        = 0x28:0xcca1bb0c
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		= 53 (umount)
[thread pid 53 tid 100040 ]
Stopped at      xpt_schedule_dev+0x36:  movl    0xc(%ebx),%eax
db> tr
Tracing pid 53 tid 100040 td 0xc15ad780
xpt_schedule_dev(deadc0de,c178d208,1) at xpt_schedule_dev+0x36
xpt_schedule(c17d1b80,1) at xpt_schedule+0xb7
cam_periph_getccb(c17d1b80,1,0,0,c17d1b00) at cam_periph_getccb+0x23
daclose(c17d1b00,1,0,c17d1880,c1709580) at daclose+0x46
g_disk_access(c17d1880,ffffffff,0,0,c0754a88) at g_disk_access+0x194
g_access(c1709580,ffffffff,0,fffffffe,c1709580) at g_access+0x192
g_slice_access(c17d1400,ffffffff,0,fffffffe,0) at g_slice_access+0x149
g_access(c16cc940,ffffffff,0,ffffffff) at g_access+0x192
g_wither_geom_close(c17d5200,6,c17c2500,1,c15ad780) at g_wither_geom_close+0x68
g_vfs_close(c16cc940,c15ad780,c06f02ba,37e,0) at g_vfs_close+0x3b
msdosfs_unmount(c1787000,8000000,c15ad780,0,c0754c40) at msdosfs_unmount+0x180
dounmount(c1787000,8000000,c15ad780,c0754c40,0) at dounmount+0x204
unmount(c15ad780,cca1bd04,2,3,206) at unmount+0x1f6
syscall(3b,3b,3b,809e019,80b94c9) at syscall+0x22f
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (22, FreeBSD ELF32, unmount), eip = 0x804a387, esp = 0xbfbfe68c, ebp = 0xbfbfe738 ---
Received on Sun Jul 03 2005 - 06:01:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:38 UTC