Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328697 - Deadlock when starting Eclipse and waiting for all EJB-Validators finished
Summary: Deadlock when starting Eclipse and waiting for all EJB-Validators finished
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 3.2.3   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-26 09:01 EDT by Stefan Cordes CLA
Modified: 2010-12-01 19:52 EST (History)
3 users (show)

See Also:
cbridgha: review+


Attachments
Thread Dump from VisualVM (51.00 KB, text/plain)
2010-10-26 09:02 EDT, Stefan Cordes CLA
no flags Details
Same deadlock fix as j2ee models (18.11 KB, patch)
2010-12-01 14:46 EST, Carl Anderson CLA
no flags Details | Diff
Fix LooseconfigPackageImpl, too (28.94 KB, patch)
2010-12-01 15:35 EST, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Cordes CLA 2010-10-26 09:01:15 EDT
Build Identifier: 20100917-0705

Thread synchronization is brocken in commonarchive.

See Visual VM Thread dump waiting for 
org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescriptor.getEPackage(RegistryReader.java:274)
but never coming back because of thread deadlock.

Fix need to be analog to jst.j2ee
https://bugs.eclipse.org/bugs/show_bug.cgi?id=315286

Reproducible: Always

Steps to Reproduce:
1. Start an Eclipse with several EJB Projects
2. Sometimes Validators won't finish because they wait for each other.
Comment 1 Stefan Cordes CLA 2010-10-26 09:02:30 EDT
Created attachment 181718 [details]
Thread Dump from VisualVM
Comment 2 Remy Suen CLA 2010-10-26 09:09:53 EDT
Seems unrelated to Eclipse's generic IDE support.
Comment 3 Carl Anderson CLA 2010-10-26 12:52:35 EDT
The commonarchive EMF model needs to access the legacy J2EE EMF models in the same way as bug 315286.
Comment 4 Carl Anderson CLA 2010-12-01 14:46:26 EST
Created attachment 184295 [details]
Same deadlock fix as j2ee models
Comment 5 Carl Anderson CLA 2010-12-01 14:48:22 EST
This fix uses the J2EEInit.initEMFModels() to properly initialize the j2ee EMF models in order, and uses the same lock during initializePackageContents() to prevent re-entrance there.

I have run the entire J2EE JUnit bucket against this fix.
Comment 6 Carl Anderson CLA 2010-12-01 15:35:48 EST
Created attachment 184299 [details]
Fix LooseconfigPackageImpl, too
Comment 7 Chuck Bridgham CLA 2010-12-01 17:06:10 EST
approved
Comment 8 Carl Anderson CLA 2010-12-01 19:52:44 EST
Committed to R3_2_maintenance and HEAD for WTP 3.2.3 and WTP 3.3