Date: Wed, 13 Apr 2022 20:07:24 +0000 From: bugzilla-noreply@freebsd.org To: scsi@FreeBSD.org Subject: [Bug 252575] panic: camq_remove: Attempt to remove out-of-bounds index -2 from queue Message-ID: <bug-252575-5313-05nDzYrxON@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-252575-5313@https.bugs.freebsd.org/bugzilla/> References: <bug-252575-5313@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252575 Andrey V. Elsukov <ae@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ae@FreeBSD.org --- Comment #4 from Andrey V. Elsukov <ae@FreeBSD.org> --- We have panic with similar trace on 13.0. It seems it can happen when some CAM device disappears. Unread portion of the kernel message buffer: (cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 00 00 00 01 00=20 (cd0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (cd0:umass-sim0:0:0:0): Retrying command, 3 more tries remain (cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 00 00 00 01 00=20 (cd0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (cd0:umass-sim0:0:0:0): Retrying command, 2 more tries remain (cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 00 00 00 01 00=20 (cd0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (cd0:umass-sim0:0:0:0): Retrying command, 1 more tries remain (cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 00 00 00 01 00=20 (cd0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (cd0:umass-sim0:0:0:0): Retrying command, 0 more tries remain (cd0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 00 00 00 01 00=20 (cd0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (cd0:umass-sim0:0:0:0): Error 5, Retries exhausted (cd0:umass-sim0:0:0:0): cddone: got error 0x5 back cd0 at umass-sim0 bus 0 scbus3 target 0 lun 0 cd0: <MP EMS Virtual Media 0326> detached da0 at umass-sim0 bus 0 scbus3 target 0 lun 1 da0: <MP EMS Virtual Media 0326> detached da1 at umass-sim0 bus 0 scbus3 target 0 lun 2 da1: <MP EMS Virtual Media 0326> detached (cd0:umass-sim0:0:0:0): Periph destroyed Fatal trap 12: page fault while in kernel mode cpuid =3D 2; apic id =3D 04 fault virtual address =3D 0x100000070 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff8034e3f0 stack pointer =3D 0x28:0xfffffe0037796990 (da1:umass-sim0:0:0:2): Periph destroyed frame pointer =3D 0x28:0xfffffe00377969e0 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 7 (doneq0) trap number =3D 12 panic: page fault cpuid =3D 2 time =3D 1645903760 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0037796= 650 vpanic() at vpanic+0x182/frame 0xfffffe00377966a0 panic() at panic+0x43/frame 0xfffffe0037796700 trap_fatal() at trap_fatal+0x387/frame 0xfffffe0037796760 trap_pfault() at trap_pfault+0x4f/frame 0xfffffe00377967b0 trap() at trap+0x271/frame 0xfffffe00377968c0 calltrap() at calltrap+0x8/frame 0xfffffe00377968c0 --- trap 0xc, rip =3D 0xffffffff8034e3f0, rsp =3D 0xfffffe0037796990, rbp = =3D 0xfffffe00377969e0 --- xpt_run_devq() at xpt_run_devq+0x90/frame 0xfffffe00377969e0 xpt_release_simq() at xpt_release_simq+0x6d/frame 0xfffffe0037796a10 xpt_async_process() at xpt_async_process+0x37a/frame 0xfffffe0037796b20 xpt_done_process() at xpt_done_process+0x3da/frame 0xfffffe0037796b60 xpt_done_td() at xpt_done_td+0xf5/frame 0xfffffe0037796bb0 fork_exit() at fork_exit+0x7e/frame 0xfffffe0037796bf0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0037796bf0 --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- Uptime: 81d8h53m59s Dumping 9884 out of 32621 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..= 91% __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 55 /usr/src/sys/amd64/include/pcpu_aux.h: No such file or directory. (kgdb) macro define offsetof(t, f) &((t *) 0)->f (kgdb) bt #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 #1 doadump (textdump=3D1) at /usr/src/sys/kern/kern_shutdown.c:394 #2 0xffffffff80b377eb in kern_reboot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:481 #3 0xffffffff80b37c6a in vpanic (fmt=3D<optimized out>, ap=3D<optimized ou= t>) at /usr/src/sys/kern/kern_shutdown.c:913 #4 0xffffffff80b37a83 in panic (fmt=3D<unavailable>) at /usr/src/sys/kern/kern_shutdown.c:839 #5 0xffffffff80efab67 in trap_fatal (frame=3D0xfffffe00377968d0, eva=3D429= 4967408) at /usr/src/sys/amd64/amd64/trap.c:915 #6 0xffffffff80efabbf in trap_pfault (frame=3D0xfffffe00377968d0, usermode=3D<optimized out>, signo=3D<optimized out>, ucode=3D<optimized out= >) at /usr/src/sys/amd64/amd64/trap.c:732 #7 0xffffffff80efa221 in trap (frame=3D0xfffffe00377968d0) at /usr/src/sys/amd64/amd64/trap.c:398 #8 <signal handler called> #9 xpt_run_devq (devq=3D0xfffff806f74a1180) at /usr/src/sys/cam/cam_xpt.c:= 3448 #10 0xffffffff80351a2d in xpt_release_simq (sim=3D0xfffff80724a6d700, run_queue=3D1) at /usr/src/sys/cam/cam_xpt.c:4617 #11 0xffffffff8035182a in xpt_async_process (periph=3D<optimized out>, ccb=3D0xfffff8045f5c9800) at /usr/src/sys/cam/cam_xpt.c:4363 #12 0xffffffff80351eaa in xpt_done_process (ccb_h=3D0xfffff8045f5c9800) at /usr/src/sys/cam/cam_xpt.c:5490 #13 0xffffffff803540c5 in xpt_done_td (arg=3D0xffffffff81586a80 <cam_doneqs= >) at /usr/src/sys/cam/cam_xpt.c:5517 #14 0xffffffff80af5a3e in fork_exit (callout=3D0xffffffff80353fd0 <xpt_done= _td>, arg=3D0xffffffff81586a80 <cam_doneqs>, frame=3D0xfffffe0037796c00) at /usr/src/sys/kern/kern_fork.c:1052 #15 <signal handler called> (kgdb) f 9 #9 xpt_run_devq (devq=3D0xfffff806f74a1180) at /usr/src/sys/cam/cam_xpt.c:= 3448 3448 /usr/src/sys/cam/cam_xpt.c: No such file or directory. (kgdb) p work_ccb $1 =3D (union ccb *) 0xffffffff (kgdb) p offsetof(union ccb, ccb_h.flags) $2 =3D (u_int32_t *) 0x70 (kgdb) l 0xffffffff8034f5e0 is in xpt_run_devq (/usr/src/sys/cam/cam_xpt.c:3448). 3443 if (work_ccb =3D=3D NULL) { 3444 printf("device on run queue with no ccbs???\n"); 3445 continue; 3446 } 3447=20=20=20=20 3448 if ((work_ccb->ccb_h.flags & CAM_HIGH_POWER) !=3D 0= ) { 3449=20=20=20=20 3450 mtx_lock(&xsoftc.xpt_highpower_lock); 3451 if (xsoftc.num_highpower <=3D 0) { 3452 /* --=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-252575-5313-05nDzYrxON>