[Bug 248500] cam_sim_free() sleeping forever

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 24 Mar 2026 15:40:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248500

Fabian Keil <fk@fabiankeil.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fk@fabiankeil.de

--- Comment #3 from Fabian Keil <fk@fabiankeil.de> ---
(In reply to Warner Losh from comment #2)

I still occasionally run into this problem using an ElectroBSD system based on
stable/14.

The last time it happened a couple of days ago while I was copying data to an
USB stick using sysutils/zogftw. The USB slot is old and the usbus0 got
disconnected while the transfer was ongoing. This resulted in:

35610 101150 usbconfig           -                   mi_switch+0xbd
sleepq_catch_signals+0x2a2 sleepq_wait_sig+0x9 _sx_xlock_hard+0x4fb
usbd_enum_lock_sig+0x91 usb_ref_device+0x21f usb_open+0x104 devfs_open+0x147
VOP_OPEN_APV+0x1d vn_open_vnode+0x1df vn_open_cred+0x5d9 openatfp+0x26c
sys_openat+0x3d amd64_syscall+0x117 fast_syscall_common+0xf8 
68372 100226 usb                 usbus0              mi_switch+0xbd
_cv_wait+0xfb usb_process+0xc0 fork_exit+0x81 fork_trampoline+0xe 
68372 100249 usb                 usbus0              mi_switch+0xbd
_cv_wait+0xfb usb_process+0xc0 fork_exit+0x81 fork_trampoline+0xe 
68372 100250 usb                 usbus0              mi_switch+0xbd
_cv_wait+0xfb usb_process+0xc0 fork_exit+0x81 fork_trampoline+0xe 
68372 100251 usb                 usbus0              mi_switch+0xbd
_sleep+0x1f3 cam_sim_free+0x77 umass_detach+0x136 device_detach+0x180
device_delete_child+0x18 usb_detach_device+0x17f usb_unconfigure+0x83
usb_free_device+0x111 uhub_explore+0x3fc uhub_explore+0xa75
usb_bus_explore+0x140 usb_process+0xfe fork_exit+0x81 fork_trampoline+0xe 
68372 100252 usb                 usbus0              mi_switch+0xbd
_cv_wait+0xfb usb_process+0xc0 fork_exit+0x81 fork_trampoline+0xe 
68372 100254 usb                 usbus1              mi_switch+0xbd
_cv_wait+0xfb usb_process+0xc0 fork_exit+0x81 fork_trampoline+0xe 
68372 100255 usb                 usbus1              mi_switch+0xbd
_cv_wait+0xfb usb_process+0xc0 fork_exit+0x81 fork_trampoline+0xe 
68372 100256 usb                 usbus1              mi_switch+0xbd
_cv_wait+0xfb usb_process+0xc0 fork_exit+0x81 fork_trampoline+0xe 
68372 100257 usb                 usbus1              mi_switch+0xbd
_cv_wait+0xfb usb_process+0xc0 fork_exit+0x81 fork_trampoline+0xe 
68372 100258 usb                 usbus1              mi_switch+0xbd
_cv_wait+0xfb usb_process+0xc0 fork_exit+0x81 fork_trampoline+0xe 

The system finally panicked with:
panic: deadlres_td_sleep_q: possible deadlock detected for 0xfffff80099017740
(usbconfig), blocked for 1802448 ticks

I've got a usable core dump but didn't have time to look at it in detail.

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