eclipse-xtext / eclipse-xtext/xtext
Deadlock during Eclipse startup (Xtext 2.27)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
After upgrading to Xtext 2.27 users complain about startup problems of their Java-IDE also containing a bunch (16) Xtext-DSLs. The IDE process starts but ceases to use any CPU before displaying a window.
This happens only when the IDE has been closed with an DSL editor window in the front.
In the attached stacktrace dump you can see that the main thread tries to restore the DSL editor window and during that also tries to load/register the EPackage instances. Another thread Storage2UriMapperJavaImpl::doInitializeCache also tries to load/register these EPackage instances. Since the 16 metamodels of our DSLs are in one project/genmodel the "hit area" for the race condition/deadlock is much bigger than usual.
Further info:
- JDK: OpenJDK Runtime Environment Zulu17.34+19-CA (build 17.0.3+7-LTS)
- Source/Target Level of our classes: 11
- Currently I cannot test this in newer Xtext-Versions :-(
Workaround
I have disabled registering the metamodels using the generated_package extension point and do the registration in the Bundle Activator of the project. Side-effect: The EMF generator insists on modifying the plugin.xml -- so we cannot use any other extension point in that project.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached Xtext-Deadlock-ThreadDump.txt and inspect Storage2UriMapperJavaImpl::doInitializeCache alongside the main thread's DSL editor restoration path. Compare the generated_package registration with the Bundle Activator workaround described in the issue. Done means reproducing startup with a DSL editor open and confirming that the IDE restores the editor without deadlocking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100