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.
Installer.writeOut() method is executed in a task and it uses synchronized (UIGESTURE_LOG_LOCK). Installer.readLogs() uses synchronized (UIGESTURE_LOG_LOCK), under which it waits for the task to finish. This creates waiting on two locks in opposite order and leads to deadlock. Before this change http://hg.netbeans.org/main/rev/3febf5809ae5 the deadlock was interrupted by the timeout.
See http://deadlock.netbeans.org/hudson/job/NB-Core-Build/8108/console Thread Test Watch Dog: testLogsReceivedOnExit at java.lang.Object.wait(Object.java:-2) at org.openide.util.Task.waitFinished(Task.java:161) at org.openide.util.RequestProcessor$Task.waitFinished(RequestProcessor.java:1747) at org.netbeans.modules.uihandler.UIHandler.waitFlushed(UIHandler.java:180) at org.netbeans.modules.uihandler.Installer.readLogs(Installer.java:713) at org.netbeans.modules.uihandler.Installer.getLogs(Installer.java:800) at org.netbeans.modules.uihandler.InstallerTest.getLogsSize(InstallerTest.java:572) at org.netbeans.modules.uihandler.LogsTooLateTest.testLogsReceivedOnExit(LogsTooLateTest.java:86) at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:95) at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:400) at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:326) at java.lang.Thread.run(Thread.java:662) Thread Flush UI Logs at org.netbeans.modules.uihandler.Installer.writeOut(Installer.java:443) at org.netbeans.modules.uihandler.UIHandler$2WriteOut.run(UIHandler.java:154) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1452) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2032) at org.netbeans.junit.NbTestCase$1Guard.waitFinished(NbTestCase.java:367) at org.netbeans.junit.NbTestCase.runBare(NbTestCase.java:425) at org.netbeans.junit.NbTestCase.run(NbTestCase.java:260)
Fixed by changeset: 218085:bb2409b5bd34 http://hg.netbeans.org/main/rev/bb2409b5bd34
BTW: there is also a synchronization problem of logsSize field and clearLogs() method Issue #210823.
Integrated into 'main-golden', will be available in build *201204070400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/bb2409b5bd34 User: mentlicher@netbeans.org Log: #210820: Deadlock resolution.