Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Swap tracing buffers for blocked threads #297
The forced swapping of buffers deadlocks when it encounters threads that are blocked in Java synchronization mechanisms.
This should be handled explicitly, by marking the threads, I think.
However, for the moment, we can actually check whether the thread is parked, i.e., blocked.
@daumayr what do you think of this change?
Yes, when hitting a breakpoint, we force-swap the buffers, to be able to update the visualization, and then that thread waits for the buffers to be swapped, which does not happen for threads blocked in java synchronization -> deadlock. Or well, probably a livelock actually (because the loop still goes over all threads again and again.
Took me a while to realize that.