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.
Summary: | Asynch shutDown proposal - IDE hangs on exit with any onStop tasks doing AWT access | ||
---|---|---|---|
Product: | platform | Reporter: | Vladimir Voskresensky <vv159170> |
Component: | Module System | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aldobrucale, alexvsimon, anebuzelsky, apireviews, issues, mmirilovic, vkvashin |
Priority: | P2 | Keywords: | API_REVIEW_FAST |
Version: | 7.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Review |
Description
Vladimir Voskresensky
2012-10-29 15:06:40 UTC
"AWT-EventQueue-1" prio=3 tid=0x0b451000 nid=0x24 in Object.wait() [0x5b7fe000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0xe7822648> (a org.openide.util.RequestProcessor$Task) at java.lang.Object.wait(Object.java:485) at org.openide.util.Task.waitFinished(Task.java:135) - locked <0xe7822648> (a org.openide.util.RequestProcessor$Task) at org.openide.util.RequestProcessor$Task.waitFinished(RequestProcessor.java:1710) at org.netbeans.core.startup.NbInstaller.close(NbInstaller.java:742) at org.netbeans.ModuleManager.shutDown(ModuleManager.java:1947) at org.netbeans.core.startup.ModuleSystem.shutDown(ModuleSystem.java:322) at org.netbeans.core.NbLifecycleManager.doExit(NbLifecycleManager.java:179) at org.netbeans.core.NbLifecycleManager.access$000(NbLifecycleManager.java:75) at org.netbeans.core.NbLifecycleManager$ExitActions.run(NbLifecycleManager.java:135) at org.openide.util.Mutex.doEvent(Mutex.java:1343) at org.openide.util.Mutex.readAccess(Mutex.java:350) at org.netbeans.core.NbLifecycleManager.exit(NbLifecycleManager.java:111) at org.netbeans.core.windows.view.ui.MainWindow$6.windowClosing(MainWindow.java:479) at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332) at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332) at java.awt.Window.processWindowEvent(Window.java:1871) at javax.swing.JFrame.processWindowEvent(JFrame.java:274) at java.awt.Window.processEvent(Window.java:1829) at java.awt.Component.dispatchEventImpl(Component.java:4660) at java.awt.Container.dispatchEventImpl(Container.java:2097) at java.awt.Window.dispatchEventImpl(Window.java:2489) at java.awt.Component.dispatchEvent(Component.java:4488) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668) at java.awt.EventQueue.access$400(EventQueue.java:81) at java.awt.EventQueue$2.run(EventQueue.java:627) at java.awt.EventQueue$2.run(EventQueue.java:625) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$3.run(EventQueue.java:641) at java.awt.EventQueue$3.run(EventQueue.java:639) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:638) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) "On Start/Stop" daemon prio=3 tid=0x0affe000 nid=0x86 in Object.wait() [0x57dff000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0xe7779408> (a java.awt.EventQueue$1AWTInvocationLock) at java.lang.Object.wait(Object.java:485) at java.awt.EventQueue.invokeAndWait(EventQueue.java:1070) - locked <0xe7779408> (a java.awt.EventQueue$1AWTInvocationLock) at org.openide.util.Mutex.doEventAccess(Mutex.java:1396) at org.openide.util.Mutex.readAccess(Mutex.java:273) at org.netbeans.core.windows.services.DialogDisplayerImpl.createDialog(DialogDisplayerImpl.java:116) at org.netbeans.core.execution.Install.showPendingTasks(Install.java:271) at org.netbeans.core.execution.Install.access$000(Install.java:111) at org.netbeans.core.execution.Install$Down.run(Install.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1454) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2036) Created attachment 127131 [details]
Review
*** Bug 217317 has been marked as a duplicate of this bug. *** VV01: ProxyTask has a sync window which can lead to never reached 'cnt==0' condition. Constructor takes already running tasks => this.cnt = waitFor.size(); and loop with t.addTaskListener(this); are not atomic => tasks can be already finished => taskFinished will not be called for already finished ones => cnt can not reach zero (In reply to comment #4) > tasks can be already finished => taskFinished will not be > called for already finished ones Actually it should be called. The in case one add TaskListener to already finished task, the callback is called immediately. I've documented the existing behaviour in ergonomics#fef258ff2339 *** Bug 220817 has been marked as a duplicate of this bug. *** *** Bug 221636 has been marked as a duplicate of this bug. *** Integrated into 'main-golden', will be available in build *201211080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/cb998950be80 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #221034: Adding @RandomlyFails until that bug is fixed Unless there are other comments, I'll integrate in few days. ergonomics#4be73336bebf Integrated into 'main-golden', will be available in build *201211150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/4be73336bebf User: Jaroslav Tulach <jtulach@netbeans.org> Log: #221034: Support for asynchronous shutdown |