Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Deadlock/starvation handling
Deadlock/starvation handling [message #895218] Thu, 12 July 2012 03:48 Go to next message
Eclipse UserFriend
Hello,

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).

My questions:

- 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.

Comments?
Re: Deadlock/starvation handling [message #895283 is a reply to message #895218] Thu, 12 July 2012 07:31 Go to previous messageGo to next message
Eclipse UserFriend
e4 hasn't looked at any kind of profiling, we just use the Jobs API if we have to manage threads (but not very often).

PW
Re: Deadlock/starvation handling [message #895333 is a reply to message #895283] Thu, 12 July 2012 09:19 Go to previous messageGo to next message
Eclipse UserFriend
Would it be possible/make sense to extend the Jobs API to help users detect and report deadlocks?

Or at least extend the progress view to allow me to copy the list of jobs into the clipboard?
Re: Deadlock/starvation handling [message #895360 is a reply to message #895333] Thu, 12 July 2012 10:57 Go to previous message
Eclipse UserFriend
I don't know enough about deadlock detection to comment on enhancing the Jobs framework.

But the progress view could be enhanced with a command to copy out information from the org.eclipse.ui.internal.progress.JobInfo objects.

PW
Previous Topic:SimpleIDE Menus and Navigator Control
Next Topic:Eclipse 4 Application Development Book
Goto Forum:
  


Current Time: Mon Jul 14 14:04:36 EDT 2025

Powered by FUDForum. Page generated in 0.06834 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top