Bug 214597 - [panic] Fatal trap 9 while mounting SD card with lock switch on
Summary: [panic] Fatal trap 9 while mounting SD card with lock switch on
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2016-11-17 06:07 UTC by Felix Johnson
Modified: 2022-10-17 12:18 UTC (History)
0 users

See Also:


Attachments
Screencap of fatal trap 9 (89.57 KB, image/jpeg)
2016-11-17 06:07 UTC, Felix Johnson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Johnson 2016-11-17 06:07:40 UTC
Created attachment 177106 [details]
Screencap of fatal trap 9

While trying to mount an SD card with the lock switch on (very much like PR 94838), I get a kernel panic and fatal trap 9. The difference with this PR is
that they were running on 6.1-PRERELEASE, whereas I am running on 11.0-RELEASE (p2), so the condition either wasn't fixed or was reintroduced.

I insert the SD card and the console shows:

ugen0.7: <Generic> at usbus0
umass1: <Bulk-In, Bulk-Out, Interface> on usbus0
umass1:  SCSI over Bulk-Only; quirks = 0x4000
umass1:2:1: Attached to scbus2
da1 at umass-sim1 bus 1 scbus2 target 0 lun 0
da1: <Generic- SD/MMC/MS PRO 1.00> Removable Direct Access SPC-2 SCSI device
da1: Serial Number 20121112761000000
da1: 40.000MB/s transfers

When I try to mount the SD card with
mount -t msdosfs /dev/da1s1 /mnt

I get:
Fatal trap 9: general protection fault while in kernel mode
cpuid = 1; apic id = 01

I'm not going to type out the panic information - I took a photo of it and
it's attached to this PR.

I can reliably reproduce this by inserting the SD card with the physical 
write protect set, trying to mount it (which fails), and then either (1) trying to unmount the device or (2) removing the SD card.

I'm running on:
FreeBSD laptop 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

I have the core files, if that helps.

I also have a few KLDs loaded:
kern.vty=vt
fuse_load="YES"
vboxdrv_load="YES"
atapicam_load="YES"

I'm willing to help troubleshoot, just let me know what you need.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:18:26 UTC
Keyword: 

    crash

– in lieu of summary line prefix: 

    [panic]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>