I had dig a bit future and setup a breakpoint at usbd_ref_decr. It was called from uvideo_vs_start_bulk_thread, but still it crahses:
Breakpoint at usbd_ref_decr: endbr64 ddb{0}> bt usbd_ref_decr(ffff800002177400) at usbd_ref_decr uvideo_vs_start_bulk_thread(ffff80000021bf000) at uvideo_vs_start_bulk_thread+0xc2 end trace frame: 0x0, count: -1 ddb{0}> c uvm_fault(0xfffffffff027c89c8, 0x3f, 0, 2) -> e kernel: page fault trap, code=2 Stopped at usbd_close_pipe+0x91: movq %rcx,0x40(%rax) TID PID UID PRFLAGS PFLAGS CPU COMMAND 121458 83085 1000 0x100002 0 2 xconsole 210971 28938 0 0x14000 0x200 3 reaper *468258 76766 0 0x14000 0x200 0K usbtask 512899 87028 0 0x14000 0x40000200 1 sensors usbd_close_pipe(ffff800001e54000) at usbd_close_pipe+0x91 uvideo_close(ffff80000021bf000) at uvideo_close+0x57 videoclose(2c01,4,2000,ffff80003ab096e0) at videoclose+0x63 spec_close(ffff80003ab8f6c8) at spec_close+0x2b2 VOP_CLOSE(fffffdb23c0922c8,4,ffffffffffffff,ffff80003ab096e0) at VOP_CLOSE+0x59 vclean(fffffdb23c0922c8,0,ffff80003ab096e0) at vclean+0x147 vgonel(fffffdb23c0922c8,ffff80003ab096e0) at vgonel+0x67 vop_generic_revoke(ffff80003ab8f7f8) at vop_generic_revoke+0x1a2 VOP_REVOKE(fffffdb23c0922c8,1) at VOP_REVOKE+0x3b vdevgone(2c,1,1,4) at vdevgone+0xd5 videodetach(ffff800001fe4400,1) at videodetach+0x67 config_detach(ffff800001fe4400,1) at config_detach+0x166 uvideo_detach(ffff80000021bf000,1) at uvideo_detach+0x4a config_detach(ffff80000021bf000,1) at config_detach+0x166 end trace frame: 0xffff80003ab8fa20, count: 0 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{0}> and here the photo which I've captured with this stacktrace: https://kirill.korins.ky/pub/openbsd-webcam-deattach-crash.jpg -- wbr, Kirill