Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Jan 2017 17:03:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 215856] [PATCH] Prevent page fault in g_dev_orphan() after ejecting disc
Message-ID:  <bug-215856-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215856

            Bug ID: 215856
           Summary: [PATCH] Prevent page fault in g_dev_orphan() after
                    ejecting disc
           Product: Base System
           Version: 11.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: fk@fabiankeil.de
          Keywords: patch

Created attachment 178604
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D178604&action=
=3Dedit
g_dev_orphan(): Return early if the device is already gone

The following panic was the result of running "cdcontrol eject"
after using the physical ejection key on the device before the
tray was actually ejected.

The device was loaded with a DVD.

 Unread portion of the kernel message buffer:
 stack pointer          =3D 0x28:0xfffffe01eba0a9e0
 frame pointer          =3D 0x28:0xfffffe01eba0a9f0
 code segment           =3D base 0x0, limit 0xfffff, type 0x1b
                        =3D DPL 0, pres 1, long 1, def32 0, gran 1
 processor eflags       =3D interrupt enabled, resume, IOPL =3D 0
 current process        =3D 13 (g_event)
 trap number            =3D 12
 panic: page fault
 cpuid =3D 3
 KDB: stack backtrace:
 db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01eba0=
a560
 vpanic() at vpanic+0x182/frame 0xfffffe01eba0a5e0
 panic() at panic+0x43/frame 0xfffffe01eba0a640
 trap_fatal() at trap_fatal+0x331/frame 0xfffffe01eba0a6a0
 trap_pfault() at trap_pfault+0x1e3/frame 0xfffffe01eba0a700
 trap() at trap+0x273/frame 0xfffffe01eba0a910
 calltrap() at calltrap+0x8/frame 0xfffffe01eba0a910
 --- trap 0xc, rip =3D 0xffffffff80500fde, rsp =3D 0xfffffe01eba0a9e0, rbp =
=3D
0xfffffe01eba0a9f0 ---
 g_dev_orphan() at g_dev_orphan+0x2e/frame 0xfffffe01eba0a9f0
 g_resize_provider_event() at g_resize_provider_event+0x71/frame
0xfffffe01eba0aa20
 g_run_events() at g_run_events+0x20e/frame 0xfffffe01eba0aa70
 fork_exit() at fork_exit+0x85/frame 0xfffffe01eba0aab0
 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe01eba0aab0
 --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 ---
 Uptime: 3h17m41s
 Dumping 1120 out of 8055 MB:..2%..12%..22%..32%..42%..52%..62%..72%..82%..=
92%

 Reading symbols from /usr/lib/debug/boot/kernel/zfs.ko.debug...done.
 [...]
 Loaded symbols for /usr/lib/debug/boot/kernel/iicbb.ko.debug
 #0  doadump (textdump=3D1) at pcpu.h:222
 222    pcpu.h: No such file or directory.
        in pcpu.h
 (kgdb) where
 #0  doadump (textdump=3D1) at pcpu.h:222
 #1  0xffffffff805cce3e in kern_reboot (howto=3D260) at
/usr/src/sys/kern/kern_shutdown.c:366
 #2  0xffffffff805cd40b in vpanic (fmt=3D<value optimized out>, ap=3D<value
optimized out>) at /usr/src/sys/kern/kern_shutdown.c:759
 #3  0xffffffff805cd243 in panic (fmt=3D0x0) at
/usr/src/sys/kern/kern_shutdown.c:690
 #4  0xffffffff808eece1 in trap_fatal (frame=3D0xfffffe01eba0a920, eva=3D8)=
 at
/usr/src/sys/amd64/amd64/trap.c:801
 #5  0xffffffff808eeed3 in trap_pfault (frame=3D0xfffffe01eba0a920, usermod=
e=3D0)
at /usr/src/sys/amd64/amd64/trap.c:658
 #6  0xffffffff808ee4d3 in trap (frame=3D0xfffffe01eba0a920) at
/usr/src/sys/amd64/amd64/trap.c:421
 #7  0xffffffff808d2701 in calltrap () at
/usr/src/sys/amd64/amd64/exception.S:236
 #8  0xffffffff80500fde in g_dev_orphan (cp=3D0xfffff800069e6280) at
/usr/src/sys/geom/geom_dev.c:754
 #9  0xffffffff80509ff1 in g_resize_provider_event (arg=3D<value optimized =
out>,
flag=3D<value optimized out>) at /usr/src/sys/geom/geom_subr.c:631
 #10 0xffffffff80504f1e in g_run_events () at
/usr/src/sys/geom/geom_event.c:264
 #11 0xffffffff805830e5 in fork_exit (callout=3D0xffffffff805079c0
<g_event_procbody>, arg=3D0x0, frame=3D0xfffffe01eba0aac0) at
/usr/src/sys/kern/kern_fork.c:1040
 #12 0xffffffff808d2c3e in fork_trampoline () at
/usr/src/sys/amd64/amd64/exception.S:611
 #13 0x0000000000000000 in ?? ()
 Current language:  auto; currently minimal
 (kgdb) f 8
 #8  0xffffffff80500fde in g_dev_orphan (cp=3D0xfffff800069e6280) at
/usr/src/sys/geom/geom_dev.c:754
 754            g_trace(G_T_TOPOLOGY, "g_dev_orphan(%p(%s))", cp,
cp->geom->name);
 (kgdb) p cp
 $1 =3D (struct g_consumer *) 0xfffff800069e6280
 (kgdb) p cp->geom
 $2 =3D (struct g_geom *) 0xfffff801acd6d100
 (kgdb) p cp->geom->name
 $3 =3D 0xfffff8007479bf60 "cd0"
 (kgdb) f 8
 #8  0xffffffff80500fde in g_dev_orphan (cp=3D0xfffff800069e6280) at
/usr/src/sys/geom/geom_dev.c:754
 754            g_trace(G_T_TOPOLOGY, "g_dev_orphan(%p(%s))", cp,
cp->geom->name);
 (kgdb) l
 754            g_trace(G_T_TOPOLOGY, "g_dev_orphan(%p(%s))", cp,
cp->geom->name);
 755
 756            /* Reset any dump-area set on this device */
 757            if (dev->si_flags & SI_DUMPDEV)
 758                    (void)set_dumper(NULL, NULL, curthread);
 759
 760            /* Destroy the struct cdev *so we get no more requests */
 761            destroy_dev_sched_cb(dev, g_dev_callback, cp);
 762    }
 763
 (kgdb) p dev->si_flags
 Cannot access memory at address 0x8
 (kgdb) p dev
 $4 =3D (struct cdev *) 0x0

The last messages before the panic:

Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c0 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c0 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c0 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c0 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:23 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:24 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:26 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c0 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c0 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c0 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c0 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
9 c6
c1 00 00 01 00
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: ILLEGAL REQUE=
ST
asc:6f,3 (Read of scrambled sector without authentication)
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:09:33 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:33:49 t520 kernel: ahcich1: Timeout on slot 8 port 0
Dec 30 16:33:49 t520 kernel: ahcich1: is 00000000 cs 00000100 ss 00000000 rs
00000100 tfd d0 serr 00000000 cmd 000cc817
Dec 30 16:33:49 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
e a2
eb 00 00 01 00
Dec 30 16:33:49 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: Command timeo=
ut
Dec 30 16:33:49 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command
Dec 30 16:33:57 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
e a2
eb 00 00 01 00
Dec 30 16:33:57 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:33:57 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:33:57 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: MEDIUM ERROR
asc:10,0 (ID CRC or ECC error)
Dec 30 16:33:57 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:33:57 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:34:05 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
e a2
ad 00 00 04 00
Dec 30 16:34:05 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:34:05 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:34:05 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: MEDIUM ERROR
asc:10,0 (ID CRC or ECC error)
Dec 30 16:34:05 t520 kernel: (cd0:ahcich1:0:0:0): Retrying command (per sen=
se
data)
Dec 30 16:34:14 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
e a2
ad 00 00 04 00
Dec 30 16:34:14 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:34:14 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:34:14 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: MEDIUM ERROR
asc:10,0 (ID CRC or ECC error)
Dec 30 16:34:14 t520 kernel: (cd0:ahcich1:0:0:0): Error 5, Retries exhausted
Dec 30 16:34:14 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x5 back
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
e a2
eb 00 00 01 00
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: NOT READY
asc:3a,0 (Medium not present)
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): Error 6, Unretryable error
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x6 back
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
e a2
ea 00 00 01 00
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: NOT READY
asc:3a,0 (Medium not present)
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): Error 6, Unretryable error
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x6 back
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
e a2
ea 00 00 01 00
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: NOT READY
asc:3a,0 (Medium not present)
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): Error 6, Unretryable error
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x6 back
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): READ(10). CDB: 28 00 00 3=
e a2
eb 00 00 01 00
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): CAM status: SCSI Status E=
rror
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): SCSI status: Check Condit=
ion
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): SCSI sense: NOT READY
asc:3a,0 (Medium not present)
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): Error 6, Unretryable error
Dec 30 16:34:18 t520 kernel: (cd0:ahcich1:0:0:0): cddone: got error 0x6 back

The system was based on 11-STABLE r310319 with ElectroBSD
patches that shouldn't be relevant.

I didn't notice any recent commits that seem relevant and assume
the issue can occur on other branches as well.

For now I'm using the attached patch to let g_dev_orphan()
return early if the device is already gone.

A more elegant solution could be to prevent geom from trying
to orphan the device when it's already gone but I haven't
looked into this yet.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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