Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325941 - Eclipse hangs at startup
Summary: Eclipse hangs at startup
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 critical with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 05:43 EDT by Pierre Gaufillet CLA
Modified: 2020-02-22 11:32 EST (History)
7 users (show)

See Also:


Attachments
jvisualvm threads dump (26.09 KB, text/plain)
2010-09-22 05:44 EDT, Pierre Gaufillet CLA
no flags Details

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