|
From: Vincent P. <plr...@gm...> - 2020-11-29 14:00:34
|
On Sun, 29 Nov 2020 10:55:21 +0000, Vincent Pelletier <plr...@gm...> wrote: > What could I be doing wrong to cause this error ? I found my mistake, which became apparent as soon as I started using good old printf-debugging rather than relying on gdb and ltrace, which both lie: - it is not at all the usbi_mutex_destroy the coredump address was pointing at which caused the error, it was events_lock. Yay compiler optimisations, I guess. - ltrace does not seem to trace calls happening inside threads (despite -f flag, which apparently only hooks to subprocesses and not threads) The issue is in my teardown code, which, by preventing usage of the libusb context during its teardown, is accidentally preventing the event thread from freeing the event lock. -- Vincent Pelletier |