From nobody Wed Apr 13 20:07:24 2022 X-Original-To: scsi@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 659071B3F8D2 for ; Wed, 13 Apr 2022 20:07:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kdtt51hXFz3mWF for ; Wed, 13 Apr 2022 20:07:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16AC0125EA for ; Wed, 13 Apr 2022 20:07:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 23DK7PWY074467 for ; Wed, 13 Apr 2022 20:07:25 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 23DK7Px6074466 for scsi@FreeBSD.org; Wed, 13 Apr 2022 20:07:25 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Wed, 13 Apr 2022 20:07:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.2-RELEASE X-Bugzilla-Keywords: panic X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ae@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: scsi@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: SCSI subsystem List-Archive: https://lists.freebsd.org/archives/freebsd-scsi List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649880445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E66DqvLk6Ztdr3TaMzhgOuWNSJmun6XUP/8G0RjiEf0=; b=iNYgYvQ3VjL/N4pVRIdA7/1w5mbjh6pQuJnKh5/Sc9sYHb5Wxc07Tyo1H+2S4mHJhzcBpy fTR/a1an7v3yyVEaazSKvn96+EXcaBB6JwOegR9ykcAUyGdgiuIo6g3Xt8q0HokpmpLNKk wcE7+dvonKmo5l+GbNRs1D57anuocHWJmAP+qcMRGdAw8TKR81HF85x7PZDTnNnkoUVBu3 Xea8ztW/DtNIMPZdfGD8tfvFLsIer47VX8bQ2WUdVB9/y30ER9c4Zl6TVAWEWBvVnkCK+l 9V8OhkdpZG2CKjutAPHhbiwppoFhEXxEgHrNfrMfboysWpP13XtKV2CZjMjajw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649880445; a=rsa-sha256; cv=none; b=PISuhnbD9Drv0XxQN+DV/+z7OPo+xRJOovYIchUm3LaCniYUVbBCall+rwAI8X0VHexDXm HA8MaLjGi7zp9ulxd4WK7h/mqFnLLbpYqnUEMaPL7VeOa1RNL4qad1X9i+8MV/aSg3Romx coRsHNPhuUJ2FEw9KyWHBhB1zMhlxv09+Mxz0cVIVW4Az83lyOUZ7QDhMYF41oTbGxmhUZ n6b9lPhMpNLqI0nPn+XshAy02ZRa/GbzzkVwTHJhfrzz1sHa8llDkqoyXvJTBU0D3JUt0z cSA4oWZL8ZpWMiRIY2Es0aNRIHfSoV1mgj3KhUZUXDnkEHCfpclrb4Ms1ghyDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252575 Andrey V. Elsukov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ae@FreeBSD.org --- Comment #4 from Andrey V. Elsukov --- 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: detached da0 at umass-sim0 bus 0 scbus3 target 0 lun 1 da0: detached da1 at umass-sim0 bus 0 scbus3 target 0 lun 2 da1: 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, ap=3D) at /usr/src/sys/kern/kern_shutdown.c:913 #4 0xffffffff80b37a83 in panic (fmt=3D) 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, signo=3D, ucode=3D) 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 #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, 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 ) at /usr/src/sys/cam/cam_xpt.c:5517 #14 0xffffffff80af5a3e in fork_exit (callout=3D0xffffffff80353fd0 , arg=3D0xffffffff81586a80 , frame=3D0xfffffe0037796c00) at /usr/src/sys/kern/kern_fork.c:1052 #15 (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.=