I didn't run it but it seems lock in AST is not released because LCK_lock
in the another thread was not in time to return from LM and update lck_id.
I.e. it looks like following sequence of events
thread 1: call LCK_lock() and waits in LockManager::wait_for_request()
here lck_id == 0, lck_logical = 0
thread 2: call LCK_release() and granted lock request of thread 1
thread 1 still waits as it is not sheduled to run yet
thread 3: call LCK_lock() and post blocking AST to lock request of thread 1
blocking ast run and see lck_id == 0,
thus AsyncContextHolder() throws isc_unavalilable exception and
LCK_release() is not called
thread 1: sheduled to run, returns from LCK_lock() and exits
note, lock request of thread 1 is not released
thread 3: loops in wait_for_request() waiting for release of lock request of thread 1
main thread: wait thread 3 indefinitely
Regards,
Vlad