openusb_abort hangs under Darwin if there are outstanding I/O requests. The same &hdev->lock mutex is acquired in openusb_abort (usb.c) and again in darwin_io_cancel (darwin.c). Here's a gdb stack trace:
Thread 7 (process 1511 thread 0x383b):
#0 0x92b25498 in semaphore_wait_signal_trap ()
#1 0x92b2c6f8 in pthread_mutex_lock ()
#2 0x00090b8c in darwin_io_cancel (io=0x104dd0) at darwin.c:1677
#3 0x00066ff8 in openusb_abort (phdl=0x861400) at usb.c:1051
I worked around it by making the mutex recursive (patch attached), but perhaps the second lock isn't needed?
Recursive mutex patch