This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233425 - Shutdown starvation in test execution
Summary: Shutdown starvation in test execution
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL: http://deadlock.netbeans.org/job/NB-C...
Keywords: RANDOM, TEST
Depends on:
Blocks:
 
Reported: 2013-07-25 13:05 UTC by Martin Entlicher
Modified: 2014-01-06 12:31 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Console text (14.94 KB, text/html)
2013-07-25 13:05 UTC, Martin Entlicher
Details
does not seem to be test specific, there are random failures in other tests (23.32 KB, text/plain)
2013-08-12 08:33 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Theofanis Oikonomou 2013-08-06 15:27:53 UTC
This seems to fail once every ~15-20 builds. Maybe hardware/memory specific? I am re-assigning for evaluation. Thank you
Comment 2 Jaroslav Tulach 2013-08-12 08:33:36 UTC
Created attachment 138572 [details]
does not seem to be test specific, there are random failures in other tests
Comment 3 Jaroslav Tulach 2013-08-30 13:42:49 UTC
The problem has not appeared in last 19 builds of core main. Probably we can lower the priority to not block branching for release 7.4.
Comment 4 Quality Engineering 2013-09-01 01:26:05 UTC
Integrated into 'main-silver', will be available in build *201309010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/162d8ba2ac18
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: Merge from ergonomics. Their build contains test which fails due to #233425, everything seems to pass OK. Trying to get to main-silver through core-main.
Comment 5 Jaroslav Tulach 2013-11-19 08:58:06 UTC
Fixed? I guess not as http://deadlock.netbeans.org/job/NB-Core-Build/800/testReport/junit/org.netbeans.junit/NbModuleSuite$S$Shutdown/shuttingDown_org_netbeans_core_netigso_EnabledAutoloadTest_/

contains following failure:

The test shuttingDown[org.netbeans.core.netigso.EnabledAutoloadTest] did not finish in 180000ms
Group system
  Group main
    Group IDE Main
      Thread Thread-1
	at java.lang.Object.wait(Object.java:-2)
	at java.lang.Object.wait(Object.java:503)
	at java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1476)
    Thread main
	at java.lang.Thread.dumpThreads(Thread.java:-2)
	at java.lang.Thread.getAllStackTraces(Thread.java:1639)
	at org.netbeans.junit.NbTestCase.threadDump(NbTestCase.java:328)
	at org.netbeans.junit.NbTestCase.access$000(NbTestCase.java:97)
	at org.netbeans.junit.NbTestCase$1Guard.waitFinished(NbTestCase.java:398)
	at org.netbeans.junit.NbTestCase.runBare(NbTestCase.java:456)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at org.netbeans.junit.NbTestCase.run(NbTestCase.java:288)
	at junit.framework.TestCase.run(TestCase.java:117)
	at org.netbeans.junit.NbModuleSuite$S.runInRuntimeContainer(NbModuleSuite.java:959)
	at org.netbeans.junit.NbModuleSuite$S.access$100(NbModuleSuite.java:667)
	at org.netbeans.junit.NbModuleSuite$S$1.protect(NbModuleSuite.java:688)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at org.netbeans.junit.NbModuleSuite$S.run(NbModuleSuite.java:684)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:522)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1062)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:913)
    Thread Active Reference Queue Daemon
	at java.lang.Object.wait(Object.java:-2)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
	at org.openide.util.lookup.implspi.ActiveQueue$Daemon.run(ActiveQueue.java:178)
    Thread CLI Requests Server
	at java.net.PlainSocketImpl.socketAccept(PlainSocketImpl.java:-2)
	at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
	at java.net.ServerSocket.implAccept(ServerSocket.java:530)
	at java.net.ServerSocket.accept(ServerSocket.java:498)
	at org.netbeans.CLIHandler$Server.run(CLIHandler.java:1100)
    Thread Timer-0
	at java.lang.Object.wait(Object.java:-2)
	at java.util.TimerThread.mainLoop(Timer.java:552)
	at java.util.TimerThread.run(Timer.java:505)
    Thread Test Watch Dog: shuttingDown[org.netbeans.core.netigso.EnabledAutoloadTest]
	at sun.misc.Unsafe.park(Unsafe.java:-2)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303)
	at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:236)
	at org.netbeans.core.NbLifecycleManager.finishExitState(NbLifecycleManager.java:180)
	at org.netbeans.core.NbLifecycleManager.exit(NbLifecycleManager.java:214)
	at org.netbeans.core.NbLifecycleManager.exit(NbLifecycleManager.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.netbeans.junit.NbModuleSuite$S$Shutdown.runTest(NbModuleSuite.java:1373)
	at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:97)
	at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:431)
	at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:357)
	at java.lang.Thread.run(Thread.java:744)
  Thread Reference Handler
	at java.lang.Object.wait(Object.java:-2)
	at java.lang.Object.wait(Object.java:503)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
  Thread Finalizer
	at java.lang.Object.wait(Object.java:-2)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:189)
  Thread Signal Dispatcher
  Thread File Watcher
	at com.sun.jna.Native.invokeInt(Native.java:-2)
	at com.sun.jna.Function.invoke(Function.java:344)
	at com.sun.jna.Function.invoke(Function.java:276)
	at com.sun.jna.Library$Handler.invoke(Library.java:216)
	at org.netbeans.modules.masterfs.watcher.linux.$Proxy2.read(null:-1)
	at org.netbeans.modules.masterfs.watcher.linux.LinuxNotifier.nextEventPath(LinuxNotifier.java:139)
	at org.netbeans.modules.masterfs.watcher.linux.LinuxNotifier.nextEvent(LinuxNotifier.java:118)
	at org.netbeans.modules.masterfs.providers.Notifier$1.nextEvent(Notifier.java:119)
	at org.netbeans.modules.masterfs.watcher.Watcher$Ext.run(Watcher.java:304)
	at java.lang.Thread.run(Thread.java:744)
 Log:
Starting test shuttingDown[org.netbeans.core.netigso.EnabledAutoloadTest]
[org.netbeans.core.NbLifecycleManager] THREAD: Test Watch Dog: shuttingDown[org.netbeans.core.netigso.EnabledAutoloadTest] MSG: Initiating exit with status 0
[org.netbeans.core.NbLifecycleManager] THREAD: Test Watch Dog: shuttingDown[org.netbeans.core.netigso.EnabledAutoloadTest] MSG: blockForExit, new org.netbeans.core.NbLifecycleManager$1@0[Count = 1]
[org.netbeans.core.NbLifecycleManager] THREAD: Test Watch Dog: shuttingDown[org.netbeans.core.netigso.EnabledAutoloadTest] MSG: NbLifeExit(0, 0, null, org.netbeans.core.NbLifecycleManager$1@0[Count = 1]) = org.netbeans.core.NbLifeExit@1
[org.netbeans.core.NbLifecycleManager] THREAD: AWT-EventQueue-0 MSG: org.netbeans.core.NbLifeExit@1.run()
[org.netbeans.core.NbLifecycleManager] THREAD: AWT-EventQueue-0 MSG: NbLifeExit(1, 0, null, org.netbeans.core.NbLifecycleManager$1@0[Count = 1]) = org.netbeans.core.NbLifeExit@2
[org.netbeans.core.NbLifecycleManager] THREAD: AWT-EventQueue-0 MSG: org.netbeans.core.NbLifeExit@2.run()
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.Stamps] THREAD: Flushing caches MSG: Nonexistent cache directory: /hudson/workdir/jobs/NB-Core-Build/workspace/core.netigso/build/test/unit/work/o.n.c.n.E/ab/var/cache
[org.netbeans.core.NbLifecycleManager] THREAD: Test Watch Dog: shuttingDown[org.netbeans.core.netigso.EnabledAutoloadTest] MSG: finishExitState Thread[Test Watch Dog: shuttingDown[org.netbeans.core.netigso.EnabledAutoloadTest],5,main] clean: true
[org.netbeans.core.NbLifecycleManager] THREAD: Test Watch Dog: shuttingDown[org.netbeans.core.netigso.EnabledAutoloadTest] MSG: About to block on org.netbeans.core.NbLifecycleManager$1@0[Count = 1]
[org.netbeans.core.netigso.Netigso] THREAD: Netigso Events MSG: bundle org.apache.felix.framework@4.2.1 256
[org.netbeans.core.netigso.Netigso] THREAD: Netigso Events MSG: bundle org.apache.felix.framework@4.2.1 256
[org.netbeans.core.NbLifecycleManager] THREAD: AWT-EventQueue-0 MSG: NbLifeExit(2, 0, org.netbeans.TaskFuture@3, org.netbeans.core.NbLifecycleManager$1@0[Count = 1]) = org.netbeans.core.NbLifeExit@4
[org.netbeans.core.NbLifecycleManager] THREAD: Nb Exit MSG: org.netbeans.core.NbLifeExit@4.run()
[org.netbeans.core.NbLifecycleManager] THREAD: Nb Exit MSG: NbLifeExit(4, 0, null, org.netbeans.core.NbLifecycleManager$1@0[Count = 1]) = org.netbeans.core.NbLifeExit@5
Comment 6 Jaroslav Tulach 2013-12-10 08:30:16 UTC
I'd like to find the reason for the problem soon.
Comment 7 Jaroslav Tulach 2013-12-11 13:25:31 UTC
Looks like the Event Dispatch Thread is gone, even a Runnable has been posted to it. The message 

THREAD: Nb Exit MSG: NbLifeExit(4, 0, null, org.netbeans.core.NbLifecycleManager$1@0[Count = 1]) = org.netbeans.core.NbLifeExit@5

is printed just before Mutex.EVENT.readAccess is called, but the first message in the runnable - e.g. 

NbLifecycleManager.LOG.log(Level.FINE, "{0}.run()", this);

is not printed at all. Looks like this is the case when EDT disappeared - which is a JDK bug.
Comment 8 Jaroslav Tulach 2014-01-06 12:28:15 UTC
let's hope following workaround helps (ergonomics#704af7b58982) overcome the JDK bug.