New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java-level deadlock #680

Closed
lombokissues opened this Issue Jul 14, 2015 · 13 comments

Comments

Projects
None yet
1 participant
@lombokissues
Collaborator

lombokissues commented Jul 14, 2015

Migrated from Google Code (issue 645)

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 sebastian.thomschke   🕗 Feb 24, 2014 at 15:46 UTC

What steps will reproduce the problem?

  1. Rebuild the workspace in Eclipse after an SVN update of multiple projects

What is the expected output? What do you see instead?
The progress bar hangs at "Building workspace > Compiling class xyz". All

What version of the product are you using? On what operating system?
Windows 7, Eclipse Kepler SR1

Please provide any additional information below.

Creating a threaddump reveals the following deadlock:

Found one Java-level deadlock:

"Worker-65":
waiting to lock monitor 0x52ffe43c (object 0x173f4538, a java.util.HashMap),
which is held by "Java indexing"
"Java indexing":
waiting to lock monitor 0x00a86a6c (object 0x173f4318, a lombok.patcher.equinox.EquinoxClassLoader),
which is held by "Worker-65"

Java stack information for the threads listed above:

"Worker-65":
at lombok.patcher.equinox.EquinoxClassLoader.loadClass(EquinoxClassLoader.java:137)
- waiting to lock <0x173f4538> (a java.util.HashMap)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at lombok.eclipse.EclipseAST.packageDeclaration(EclipseAST.java:69)
at lombok.eclipse.EclipseAST.<init>(EclipseAST.java:60)
at lombok.eclipse.TransformEclipseAST.getAST(TransformEclipseAST.java:107)
at lombok.eclipse.TransformEclipseAST.transform(TransformEclipseAST.java:139)
at lombok.eclipse.TransformEclipseAST.transform_swapped(TransformEclipseAST.java:93)
at org.eclipse.jdt.internal.compiler.parser.Parser.endParse(Parser.java:8681)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9715)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9933)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9890)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8454)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:718)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:383)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:428)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:366)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:303)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:184)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
"Java indexing":
at java.lang.ClassLoader.checkCerts(ClassLoader.java:941)
- waiting to lock <0x173f4318> (a lombok.patcher.equinox.EquinoxClassLoader)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:666)
at java.lang.ClassLoader.defineClass(ClassLoader.java:794)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at lombok.patcher.equinox.EquinoxClassLoader.loadClass(EquinoxClassLoader.java:200)
- locked <0x173f4538> (a java.util.HashMap)
at lombok.patcher.equinox.EquinoxClassLoader.overrideLoadResult(EquinoxClassLoader.java:288)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeExitVariableWithInitialization(Parser.java:3737)
at org.eclipse.jdt.internal.compiler.SourceElementParser.consumeExitVariableWithInitialization(SourceElementParser.java:354)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:5559)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9694)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9933)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9890)
at org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit(SourceElementParser.java:921)
at org.eclipse.jdt.internal.core.search.indexing.SourceIndexer.indexDocument(SourceIndexer.java:68)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.indexDocument(JavaSearchParticipant.java:73)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexDocument(IndexManager.java:498)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager$1.execute(IndexManager.java:938)
at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:405)
at java.lang.Thread.run(Thread.java:744)

Found 1 deadlock.

Collaborator

lombokissues commented Jul 14, 2015

👤 sebastian.thomschke   🕗 Feb 24, 2014 at 15:46 UTC

What steps will reproduce the problem?

  1. Rebuild the workspace in Eclipse after an SVN update of multiple projects

What is the expected output? What do you see instead?
The progress bar hangs at "Building workspace > Compiling class xyz". All

What version of the product are you using? On what operating system?
Windows 7, Eclipse Kepler SR1

Please provide any additional information below.

Creating a threaddump reveals the following deadlock:

Found one Java-level deadlock:

"Worker-65":
waiting to lock monitor 0x52ffe43c (object 0x173f4538, a java.util.HashMap),
which is held by "Java indexing"
"Java indexing":
waiting to lock monitor 0x00a86a6c (object 0x173f4318, a lombok.patcher.equinox.EquinoxClassLoader),
which is held by "Worker-65"

Java stack information for the threads listed above:

"Worker-65":
at lombok.patcher.equinox.EquinoxClassLoader.loadClass(EquinoxClassLoader.java:137)
- waiting to lock <0x173f4538> (a java.util.HashMap)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at lombok.eclipse.EclipseAST.packageDeclaration(EclipseAST.java:69)
at lombok.eclipse.EclipseAST.<init>(EclipseAST.java:60)
at lombok.eclipse.TransformEclipseAST.getAST(TransformEclipseAST.java:107)
at lombok.eclipse.TransformEclipseAST.transform(TransformEclipseAST.java:139)
at lombok.eclipse.TransformEclipseAST.transform_swapped(TransformEclipseAST.java:93)
at org.eclipse.jdt.internal.compiler.parser.Parser.endParse(Parser.java:8681)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9715)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9933)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9890)
at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:8454)
at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:718)
at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:383)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:428)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:366)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:303)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:184)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
"Java indexing":
at java.lang.ClassLoader.checkCerts(ClassLoader.java:941)
- waiting to lock <0x173f4318> (a lombok.patcher.equinox.EquinoxClassLoader)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:666)
at java.lang.ClassLoader.defineClass(ClassLoader.java:794)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at lombok.patcher.equinox.EquinoxClassLoader.loadClass(EquinoxClassLoader.java:200)
- locked <0x173f4538> (a java.util.HashMap)
at lombok.patcher.equinox.EquinoxClassLoader.overrideLoadResult(EquinoxClassLoader.java:288)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeExitVariableWithInitialization(Parser.java:3737)
at org.eclipse.jdt.internal.compiler.SourceElementParser.consumeExitVariableWithInitialization(SourceElementParser.java:354)
at org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:5559)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9694)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9933)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:9890)
at org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit(SourceElementParser.java:921)
at org.eclipse.jdt.internal.core.search.indexing.SourceIndexer.indexDocument(SourceIndexer.java:68)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.indexDocument(JavaSearchParticipant.java:73)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexDocument(IndexManager.java:498)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager$1.execute(IndexManager.java:938)
at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:405)
at java.lang.Thread.run(Thread.java:744)

Found 1 deadlock.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 sebastian.thomschke   🕗 Feb 24, 2014 at 15:46 UTC

🔗 threaddump.txt View file

Collaborator

lombokissues commented Jul 14, 2015

👤 sebastian.thomschke   🕗 Feb 24, 2014 at 15:46 UTC

🔗 threaddump.txt View file

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 sebastian.thomschke   🕗 Feb 24, 2014 at 15:53 UTC

Using Lombok 1.12.4

Collaborator

lombokissues commented Jul 14, 2015

👤 sebastian.thomschke   🕗 Feb 24, 2014 at 15:53 UTC

Using Lombok 1.12.4

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 r.spilker   🕗 Feb 24, 2014 at 22:17 UTC

Issue #566 has been merged into this issue.

Collaborator

lombokissues commented Jul 14, 2015

👤 r.spilker   🕗 Feb 24, 2014 at 22:17 UTC

Issue #566 has been merged into this issue.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 r.spilker   🕗 Feb 24, 2014 at 22:20 UTC

We tried reproducing this and succeeded. (Actually a different issue with STS and the Gradle plugin. jstack did not report a deadlock, but eclipse is completely stuck with no CPU cycles same as a deadlock, so we're assuming it's related).

And then we failed. So, unfortunately, it looks like this will occur or not based on a race condition. We've eliminated the lock on the 'a Hashmap' in your deadlock report by using a j.u.concurrent alternative. Maybe this will fix things.

How reliably does this bug occur on your computer when you try and reproduce it? Can you tell us how reliable it is, and then give this edge release a shot to see if that fixes the problem? Thanks, owe you a beer!

https://projectlombok.org/download-edge.html

Collaborator

lombokissues commented Jul 14, 2015

👤 r.spilker   🕗 Feb 24, 2014 at 22:20 UTC

We tried reproducing this and succeeded. (Actually a different issue with STS and the Gradle plugin. jstack did not report a deadlock, but eclipse is completely stuck with no CPU cycles same as a deadlock, so we're assuming it's related).

And then we failed. So, unfortunately, it looks like this will occur or not based on a race condition. We've eliminated the lock on the 'a Hashmap' in your deadlock report by using a j.u.concurrent alternative. Maybe this will fix things.

How reliably does this bug occur on your computer when you try and reproduce it? Can you tell us how reliable it is, and then give this edge release a shot to see if that fixes the problem? Thanks, owe you a beer!

https://projectlombok.org/download-edge.html

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 r.spilker   🕗 Feb 25, 2014 at 20:32 UTC

We've updated the code. Please download the latest edge:

https://projectlombok.org/download-edge.html

Collaborator

lombokissues commented Jul 14, 2015

👤 r.spilker   🕗 Feb 25, 2014 at 20:32 UTC

We've updated the code. Please download the latest edge:

https://projectlombok.org/download-edge.html

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 sebastian.thomschke   🕗 Feb 25, 2014 at 20:33 UTC

The bug is not reliable at all. It happens maybe two times a week. I now installed the edge version. If I don't experience the bug again within the next week I think your change fixed it.

Collaborator

lombokissues commented Jul 14, 2015

👤 sebastian.thomschke   🕗 Feb 25, 2014 at 20:33 UTC

The bug is not reliable at all. It happens maybe two times a week. I now installed the edge version. If I don't experience the bug again within the next week I think your change fixed it.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 r.spilker   🕗 Feb 27, 2014 at 20:42 UTC

We think this is fixed. Awaiting more community feedback before closing the issue.

Collaborator

lombokissues commented Jul 14, 2015

👤 r.spilker   🕗 Feb 27, 2014 at 20:42 UTC

We think this is fixed. Awaiting more community feedback before closing the issue.

@lombokissues lombokissues added parked and removed accepted labels Jul 14, 2015

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 sebastian.thomschke   🕗 Feb 27, 2014 at 22:48 UTC

I extensively used SVN updates on large projects in the last two days and did not encounter the problem anymore. I too think it is fixed. Good job and thanks for the prompt resolution!!!

Collaborator

lombokissues commented Jul 14, 2015

👤 sebastian.thomschke   🕗 Feb 27, 2014 at 22:48 UTC

I extensively used SVN updates on large projects in the last two days and did not encounter the problem anymore. I too think it is fixed. Good job and thanks for the prompt resolution!!!

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 r.spilker   🕗 Mar 10, 2014 at 10:17 UTC

Collaborator

lombokissues commented Jul 14, 2015

👤 r.spilker   🕗 Mar 10, 2014 at 10:17 UTC

@lombokissues lombokissues removed the parked label Jul 14, 2015

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 redlabbe   🕗 Apr 01, 2014 at 09:18 UTC

I also had a deadlock (same stacktrace, not using svn, I doubt it has something to do with that, I'm using git)
Updating to 1.12.6 fixed the issue

Collaborator

lombokissues commented Jul 14, 2015

👤 redlabbe   🕗 Apr 01, 2014 at 09:18 UTC

I also had a deadlock (same stacktrace, not using svn, I doubt it has something to do with that, I'm using git)
Updating to 1.12.6 fixed the issue

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 juraj.misur   🕗 May 07, 2014 at 11:05 UTC

Had the same deadlock in STS 3.5.1. After upgrade to 1.12.6 it's ok.

Collaborator

lombokissues commented Jul 14, 2015

👤 juraj.misur   🕗 May 07, 2014 at 11:05 UTC

Had the same deadlock in STS 3.5.1. After upgrade to 1.12.6 it's ok.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

End of migration

Collaborator

lombokissues commented Jul 14, 2015

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment