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

Bug 325941

Summary: Eclipse hangs at startup
Product: [Eclipse Project] Platform Reporter: Pierre Gaufillet <pierre.gaufillet>
Component: TeamAssignee: Platform Team Inbox <platform-team-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: critical    
Priority: P3 CC: david.matejcek, jamesblackburn+eclipse, mathieu.meaux, remy.suen, Szymon.Brandys, tjwatson, tsunin2
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
jvisualvm threads dump none

Description Pierre Gaufillet CLA 2010-09-22 05:43:19 EDT
Build Identifier: I20100608-0911

Sometimes, a workspace reaches a state where Eclipse can not be started anymore.
It hangs during start-up on "org.eclipse.team.cvs.ui" each time Eclipse is launched. The only work around I found consists in resetting the meta-data of the workspace.



Reproducible: Sometimes

Steps to Reproduce:
1. Start Eclipse (on a specific workspace)
Comment 1 Pierre Gaufillet CLA 2010-09-22 05:44:56 EDT
Created attachment 179363 [details]
jvisualvm threads dump
Comment 2 John Arthorne CLA 2010-09-22 14:00:53 EDT
This appears to be a deadlock between the class loader and the UI thread. Essentially the UI thread is attempting to load a class, while the thread that owns the class loader lock is attempting to do a syncExec. This is caused by a password prompt being initiated from the core.net activator. This is generally discouraged as mentioned in the javadoc of Plugin#start:

 * Note 3: The class loader typically has monitors acquired during 
 * invocation of this method.  It is strongly recommended that this 
 * method avoid synchronized blocks or other thread locking mechanisms,
 * as this would lead to deadlock vulnerability.

Szymon, is there any way core.net could avoid the password prompt during bundle activation?
Comment 3 James Blackburn CLA 2012-01-30 18:30:06 EST
bug 364550 has a similar root cause.  Password prompt syncExec on startup leading to deadlock.
Comment 4 David Matějček CLA 2013-08-01 04:47:42 EDT
Did not happen with 4.3 (Kepler) so I think this issue can be closed.
Comment 5 Thomas Watson CLA 2013-08-01 08:38:14 EDT
(In reply to comment #4)
> Did not happen with 4.3 (Kepler) so I think this issue can be closed.

I don't think anything got released for this, but if running on Java 7 the class loader locking has become much more fine grained and we make the use of parallel class loaders [1] in the framework.  That should eliminate the case where the class loader lock was causing a hang.

[1] http://docs.oracle.com/javase/7/docs/api/java/lang/ClassLoader.html#registerAsParallelCapable()
Comment 6 David Matějček CLA 2015-09-04 06:34:30 EDT
Cannot reproduce on Oracle JDK8 (u25-60), OpenJDK8, and Eclipse 4.5. It dit not happen to me for very long time (I think much more than year).
Comment 7 Eclipse Genie CLA 2020-02-22 11:32:30 EST
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.