[Bug 277499] panic in doneq0 xpt_done_td xpt_done_process after HDD falling off the bus (Periph destroyed)

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 05 Mar 2024 18:47:27 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277499

Warner Losh <imp@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |imp@FreeBSD.org

--- Comment #1 from Warner Losh <imp@FreeBSD.org> ---
This looks like an old bug that I killed 3 or 4 years ago.

The root cause is that we're leaking a reference, so the periph is torn down
with outstanding devices.

       if ((ccb_h->func_code & XPT_FC_USER_CCB) == 0) {
                struct cam_ed *dev = ccb_h->path->device;

                if (sim)
                        devq = sim->devq;
                KASSERT(devq, ("Periph disappeared with CCB %p %s request
pending.",
                        ccb_h, xpt_action_name(ccb_h->func_code)));

                mtx_lock(&devq->send_mtx);

devq is NULL here, according to the traceback...

The hard part is figuring out how this came to be.

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