Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327836 - JobManager#resume violates lock acquisition requirement by accessing WorkerPool
Summary: JobManager#resume violates lock acquisition requirement by accessing WorkerPool
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.6.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 18:16 EDT by Natasha D'Silva CLA
Modified: 2019-09-22 12:38 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.