If the instrumentation generates a lot of messages it may deadlock the traced application on exit - the internal message queue is using backoff sleep but does not correctly handle InterruptedException effectively causing all other threads attempting to send a BTrace message to get locked.
The solution is to properly handle InterruptedException