Bug 415879 - DeadlockDetectionTest fails sporadically
Summary: DeadlockDetectionTest fails sporadically
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks: 51538
  Show dependency tree
 
Reported: 2013-08-26 10:09 EDT by Dani Megert CLA
Modified: 2014-10-14 12:04 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2013-08-26 10:09:30 EDT
N20130825-2000.

http://download.eclipse.org/eclipse/downloads/drops4/N20130825-2000/testresults/html/org.eclipse.core.tests.runtime_linux.gtk.x86_6.0.html


1.0

junit.framework.AssertionFailedError: 1.0
at org.eclipse.core.tests.runtime.jobs.DeadlockDetectionTest.testThreeLocks(DeadlockDetectionTest.java:169)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:655)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 John Arthorne CLA 2013-08-26 15:54:02 EDT
Could not reproduce and haven't seen this failure before. The test intentionally creates a deadlock between three ILocks, and then checks that our deadlock detection code resolves it. This failure implies it failed to resolve the deadlock.
Comment 2 Szymon Ptaszkiewicz CLA 2013-08-27 03:37:18 EDT
(In reply to comment #1)
> This failure implies it failed to resolve the deadlock.

I think that's not entirely true. In this test deadlock can be resloved correctly many times and still the test can fail if threads are not killed successfully. It's not reproducible on demand, but it could happen if RandomTestRunnable.alive was cached and the result of kill was not seen by the thread. You can reproduce the failure by commenting out kill(allRunnables) which would simulate unsuccessful killing. Wouldn't RandomTestRunnable.alive deserve to be volatile?

In fact, we could tell if deadlock was resolved or not based on the console output, but at the moment it's impossible to tell which log entry belongs to which test. We could add test name to RandomTestRunnable to get more descriptive logs. Adding getName() in DeadlockDetectionTest.createRunnables(..) is sufficient.
Comment 3 Dani Megert CLA 2013-08-27 03:45:27 EDT
(In reply to comment #1)
> Could not reproduce and haven't seen this failure before.

Not exactly that one, but other DeadlockDetectionTest tests, see bug 51538 comment 0.
Comment 4 Dani Megert CLA 2013-11-21 09:43:19 EST
DeadlockDetectionTest.testVeryComplex failed in N20131120-2000:

1.0

junit.framework.AssertionFailedError: 1.0
at org.eclipse.core.tests.runtime.jobs.DeadlockDetectionTest.testVeryComplex(DeadlockDetectionTest.java:974)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:657)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 5 Dani Megert CLA 2013-11-28 05:29:34 EST
N20131127-2000:

junit.framework.AssertionFailedError: 1.0
at org.eclipse.core.tests.runtime.jobs.DeadlockDetectionTest.testVeryComplex(DeadlockDetectionTest.java:974)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:657)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 6 Szymon Ptaszkiewicz CLA 2014-01-16 10:36:12 EST
I pushed a change to Gerrit that should help to diagnose the cause of these failures:

https://git.eclipse.org/r/#/c/20717/
Comment 7 John Arthorne CLA 2014-01-16 12:00:39 EST
(In reply to Szymon Ptaszkiewicz from comment #6)
> I pushed a change to Gerrit that should help to diagnose the cause of these
> failures:
> 
> https://git.eclipse.org/r/#/c/20717/

Pushed:

http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=74f101a07c12cac26ce02a9039b23ba59db8faa3
Comment 8 Szymon Ptaszkiewicz CLA 2014-10-14 12:04:42 EDT
These tests have not failed for quite some time. Closing as WORKSFORME, but please reopen if you see it again.