Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327836

Summary: JobManager#resume violates lock acquisition requirement by accessing WorkerPool
Product: [Eclipse Project] Platform Reporter: Natasha D'Silva <ndsilva>
Component: RuntimeAssignee: platform-runtime-inbox <platform-runtime-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: pwebster, yevshif
Version: 3.6.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Natasha D'Silva CLA 2010-10-14 18:16:31 EDT
Build Identifier: 3.6

From the comment in JobManager.java:
 * There are various locks used and held throughout the JobManager
 * implementation. When multiple locks interact, circular hold and waits must
 * never happen, or a deadlock will occur. To prevent deadlocks, this is the
 * order that locks must be acquired.
 * 
 * WorkerPool -> JobManager.implicitJobs -> JobManager.lock -> 
 * InternalJob.jobStateLock

But JobManager#resume:
	/*(non-Javadoc)
	 * @see org.eclipse.core.runtime.jobs.IJobManager#resume()
	 */
	public final void resume() {
		synchronized (lock) {
			suspended = false;
			//poke the job pool
			pool.jobQueued();
		}
	}

jobQueued is a synchronized method in WorkerPool, so I'm not sure if there is a valid reason for invoking this method within the synchronized block or if this is just an oversight. I don't know much at all about the job manager but this seemed like a potential problem

Reproducible: Always
Comment 1 Eclipse Genie CLA 2019-09-22 12:38:53 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.