|Deadlock/starvation handling [message #895218]
||Thu, 12 July 2012 03:48
| Aaron Digulla
Registered: July 2009
Does e4 provide any means to help handling deadlocks in worker threads?
In the past two years, I've had several occasions where I couldn't start/shut down eclipse anymore because a worker thread was trying to lock something but never actually got that lock either because of a deadlock or starvation (some other worker didn't properly release the lock).
- Is there a good tool to analyze deadlocks in worker threads?
- Is there an API or helper classes to write workers which properly time out if they can't get a lock in time?
With "tool", I mean something which helps to write meaningful bug reports. A stack dump is great but it would help if the tool would help to isolate the threads which are really blocked (i.e. omit idle ones) and it should find out which plug-in provided to code in which the worker hangs, so it can add the ID and version.
With API, I mean tooling that warns about trying to acquire locks without a timeout and maybe a "killer" thread in Eclipse which can kill dead workers. Not ideal, yes, but it's better to kill a hanging thread than risking to corrupt the workspace by killing Eclipse.
I understand that killing a thread could also corrupt the workspace but my gut feeling is that the chances here are slim: The worker thread is hanging somewhere but most likely not inside some operation which saves plug-in state to the workspace metadata.
By killing the thread, I can shut down Eclipse properly. If a worker threads blocks while I shut down, this will interrupt the other (correctly working plug-ins) from saving their state -> doom.
Powered by FUDForum
. Page generated in 0.02248 seconds