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 188883 - ThreadDeath from Installer.close
Summary: ThreadDeath from Installer.close
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 189406 (view as bug list)
Depends on:
Blocks: 164593
  Show dependency tree
 
Reported: 2010-07-22 20:28 UTC by Jesse Glick
Modified: 2010-08-18 18:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-07-22 20:28:45 UTC
If you shut down the IDE while the indexer is running, you get on console:

WARNING [org.netbeans.modules.maven.indexer.Installer]: Killing Maven Repo Transfer thread on system exit...
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.maven.ModInstall$1
java.lang.ThreadDeath
        at java.lang.Thread.stop(Thread.java:715)
        at org.netbeans.modules.maven.indexer.Installer.close(Installer.java:65)
        at org.netbeans.core.startup.NbInstaller.close(NbInstaller.java:696)
        at org.netbeans.ModuleManager.shutDown(ModuleManager.java:1636)
        at org.netbeans.core.startup.ModuleSystem.shutDown(ModuleSystem.java:308)
        at org.netbeans.core.NbLifecycleManager.doExit(NbLifecycleManager.java:167)
        at org.netbeans.core.NbLifecycleManager.access$000(NbLifecycleManager.java:75)
        at org.netbeans.core.NbLifecycleManager$ExitActions.run(NbLifecycleManager.java:123)
        at org.openide.util.Mutex.doEvent(Mutex.java:1341)
        at org.openide.util.Mutex.readAccess(Mutex.java:348)
        at org.netbeans.core.NbLifecycleManager.exit(NbLifecycleManager.java:111)
        at org.netbeans.core.windows.view.ui.MainWindow$4.windowClosing(MainWindow.java:358)
        at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
        at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
        at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
        at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
        at java.awt.Window.processWindowEvent(Window.java:1865)
        at javax.swing.JFrame.processWindowEvent(JFrame.java:274)
        at java.awt.Window.processEvent(Window.java:1823)
        at java.awt.Component.dispatchEventImpl(Component.java:4630)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Window.dispatchEventImpl(Window.java:2478)
        at java.awt.Component.dispatchEvent(Component.java:4460)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
        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)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
        at org.openide.util.RequestProcessor.post(RequestProcessor.java:433)
        at org.netbeans.modules.maven.ModInstall.restored(ModInstall.java:131)
        at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:426)
        at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:366)
        at org.netbeans.ModuleManager.enable(ModuleManager.java:961)
        at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:318)
        at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:254)
        at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:286)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:172)
        at org.netbeans.core.startup.Main.start(Main.java:302)
        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:114)
[catch] at java.lang.Thread.run(Thread.java:619)

This ought to be handled more gracefully.
Comment 1 David Simonek 2010-07-23 07:24:15 UTC
Handled more gracefully...how? Look at the comments in the source, I wasn't happy to wrote such code, but didn't find any better way...
Comment 2 Jesse Glick 2010-07-23 14:06:08 UTC
At least the stack trace might be suppressable. But surely the Maven indexer should offer some way of canceling long-running tasks. If there is not such a capability now, we need an upstream patch.
Comment 3 Jesse Glick 2010-08-13 16:05:40 UTC
Trying harder to kill things, using the fix of #189316 as well as other tricks, though java.net.HTTPURLConnection cannot in general be killed except by Thread.stop (Thread.interrupt does not seem to work). Problems sometimes reproducible by shutting off the network connection in the middle of a download. There was also a hang sometimes *after* killing the indexing threads, trying to get a lock in shutdownAll.
Comment 4 Jesse Glick 2010-08-13 16:06:39 UTC
core-main #0e5eb36a57a9
Comment 5 Quality Engineering 2010-08-17 03:15:26 UTC
Integrated into 'main-golden', will be available in build *201008170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0e5eb36a57a9
User: Jesse Glick <jglick@netbeans.org>
Log: #188883: ThreadDeath from Installer.close
Comment 6 Jesse Glick 2010-08-18 18:12:30 UTC
*** Bug 189406 has been marked as a duplicate of this bug. ***