Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse WorkerPool does not start new Workers for Jobs(Job-System eventually hangs up)
Eclipse WorkerPool does not start new Workers for Jobs [message #1769080] Wed, 26 July 2017 10:28 Go to next message
Rainer Rieder is currently offline Rainer RiederFriend
Messages: 4
Registered: January 2015
Junior Member
In my RCP Eclipse application I have a number of sessions each run by a controller run by a job. Each controller makes request/response-communication that should be synchrounous per controller but run in a job (for display of progress and parallelism of long running requests in the different sessions).

In 99% of all cases this works correctly. But suddenly there are no new Worker Objects produced in the WorkerPool and the usually spare ones in the pool are gone. I have multiple Heap-Dumps from our customers as proof.

The calling code is roughly as follows:
Job job = new Job("name") {
    // do request/response work, but try/catch the errors -> alsways return Status.OK  
job.join(jobDeadlockTimeout,monitor);  // wait for each request/response job before the next can be scheduled to be in sync per session

Usually in the HEAP-Dump I can see the Workers for my controller-Jobs and spare (sleeping) Worker-Objects that were used for the Request/Response Jobs.

In case the Application hangs i can only see the controller threads in the WorkerPool and no sleeping or unused Workers. They have all been removed an no new Workers are produced. The HEAP-Dumps state that the Eclipse JobManager is active and not suspended. All the Threads are waiting on job.join but none of them can be completed because they don't have Worker-Threads to complete their work. None of the Threads in a thread dump is in blocking-state as far as i can tell.

Unfortunately no one can trigger the Problem it just emerges after hours or even days, and only at very few users but at different locations/customers.

The System-Specifications are as follows:

  • Windows 10, 8 and 7
  • Java 1.8.0 - 131 32Bit
  • Eclipse-RCP-Platform based on Eclipse 4.6 NEON 3

Has anybody experience with this sort of behaviour or a hint what elese i could check ? Is there a way to stop the Job-System from working that my code could trigger some times ?
Re: Eclipse WorkerPool does not start new Workers for Jobs [message #1769136 is a reply to message #1769080] Thu, 27 July 2017 01:53 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 721
Registered: January 2012
Senior Member

I don't have an answer for you (though it seems weird to schedule a job and then join on it). But I've been having similar fun of my own with the Google Cloud Tools for Eclipse project, and we've come up with a thread/job diagnostic helper that has been very helpful in diagnosing thread and job deadlocks. This class outputs a report of the Job locks, with who is waiting on what, current jobs, and current threads. It has some smarts to hide unimportant threads.

Some thread- and jobs-related deadlocks are caused by interactions between thread synchronization and Eclipse locks/scheduling rules. You have to be *very* careful when mixing the two.

Good luck!


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Eclipse WorkerPool does not start new Workers for Jobs [message #1769201 is a reply to message #1769136] Thu, 27 July 2017 14:55 Go to previous message
Rainer Rieder is currently offline Rainer RiederFriend
Messages: 4
Registered: January 2015
Junior Member
I have tried to write a mockup with various long running jobs that create shorter running jobs witch must first join to conitinue to provoke the problematic state.
Unfortunately still no progress in this issue. I still can't trigger the blockage.

But by the analysis it became more clear, that the WorkerPool states that at least one sleeping thread (MIN_THREADS) must be present for the system to work:
					if (job == null && (System.currentTimeMillis() - idleStart > BEST_BEFORE) && (numThreads - busyThreads) > MIN_THREADS) {
						//must remove the worker immediately to prevent all threads from expiring
						return null;

Alle my error HEAP-Dumps state that this is not the case.

There are zero sleeping threads present wich leads to no new workers beeing created.
But I'm still not able to trigger this state.

Previous Topic:Eclipse Common Navigator Framework - Override NavigatorContent Label provider
Next Topic:GTK & Light Themes
Goto Forum:

Current Time: Thu Mar 22 21:58:25 GMT 2018

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

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