[Bug 248500] cam_sim_free() sleeping forever
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Aug 6 14:33:11 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248500
Bug ID: 248500
Summary: cam_sim_free() sleeping forever
Product: Base System
Version: CURRENT
Hardware: amd64
OS: Any
Status: New
Keywords: cam
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: bz at FreeBSD.org
CC: bsdimp at FreeBSD.org
Hi,
I have a system with a locked USB because cam_sim_free() seems to sleep forever
(at least 24 hours by now):
# procstat -akk | grep -i usb
15 100045 usb usbus0 mi_switch+0xc1
_cv_wait+0xf2 usb_process+0x101 fork_exit+0x7e fork_trampoline+0xe
15 100046 usb usbus0 mi_switch+0xc1
_cv_wait+0xf2 usb_process+0x101 fork_exit+0x7e fork_trampoline+0xe
15 100047 usb usbus0 mi_switch+0xc1
_cv_wait+0xf2 usb_process+0x101 fork_exit+0x7e fork_trampoline+0xe
15 100048 usb usbus0 mi_switch+0xc1
_sleep+0x1cb cam_sim_free+0x7e umass_detach+0xd8 device_detach+0x185
device_delete_child+0x15 usb_detach_device+0x18f usb_unconfigure+0x2b
usb_free_device+0x
11d uhub_explore+0x2ad usb_bus_explore+0x13e usb_process+0x13b fork_exit+0x7e
fork_trampoline+0xe
15 100049 usb usbus0 mi_switch+0xc1
_cv_wait+0xf2 usb_process+0x101 fork_exit+0x7e fork_trampoline+0xe
0x2be is in cam_sim_free (/usr/src/head.svn/sys/cam/cam_sim.c:142).
137 if (sim->refcount > 0) {
138 error = msleep(sim, mtx, PRIBIO, "simfree", 0);
139 KASSERT(error == 0, ("invalid error value for
msleep(9)"));
140 }
141 KASSERT(sim->refcount == 0, ("sim->refcount == 0"));
142 if (sim->mtx == NULL)
143 mtx_unlock(mtx);
144
145 if (free_devq)
146 cam_simq_free(sim->devq);
What should wake us up in this case? Was there a race somewhere? Any ideas?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list