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 193378 - deadlock in options dialog
Summary: deadlock in options dialog
Status: RESOLVED DUPLICATE of bug 193186
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Andrew Krasny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 14:37 UTC by Tomas Danek
Modified: 2011-01-04 13:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
threaddump (17.58 KB, text/plain)
2010-12-14 14:37 UTC, Tomas Danek
Details
threaddump2 (16.42 KB, text/plain)
2010-12-16 16:45 UTC, Tomas Danek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2010-12-14 14:37:01 UTC
Created attachment 104060 [details]
threaddump

Product Version: NetBeans IDE Dev (Build 201012130001)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Users\tester\.netbeans\dev
---------------------------
working with maven project, tried to change in Tools|Options > Editor > Hints but IDE froze. Generated thread dump (attached) before killing it.
Comment 1 Tomas Danek 2010-12-14 14:44:40 UTC
rising to P1, 100% reproducible for me, just try to invoke Tools | Options > Editor > Hints
Comment 2 Yulia Novozhilova 2010-12-14 16:43:43 UTC
I can not reproduce the issue on Win XP. Will try to find Win 7 though not sure if it depends on the OS. 
Anyway, could you please try to run NetBeans with a clean %USERDIR%\.netbeans\dev folder? Does this happen again?
Do you have any logs in %USERDIR%\.netbeans\dev\var\log folder?
If the issue is still reproducible, could you please, give me exact steps in order I could do the same.
Comment 3 Yulia Novozhilova 2010-12-15 14:55:52 UTC
Well, I found Windows 7 and tried to reproduce. The only similar situation happened when "Unpacking index" process was in progress. While this time any interaction with UI was really slow and sometimes IDE seemed to be frozen but in several seconds it started working again. I agree it is uncomfortable and there are many bug reports about slowness in maven.
But I couldn't reproduce this particular issue with Hints. So downgrading to P2 and marking as incomplete.
Please give the exact steps if you are still able to reproduce.
Comment 4 Yulia Novozhilova 2010-12-16 14:55:56 UTC
Anyway there is no a deadlock according to the thread dump. AWT thread is waiting for org.netbeans.modules.options.CategoryModel.masterLookupTask to be finished. So either this task takes too much time to finish or another process takes all the CPU resources and doesn't let it to be finished at the reasonable time. Will investigate.
Comment 5 Tomas Danek 2010-12-16 14:59:38 UTC
well, on my setup 100% reproducible, even with fresh userdir...AWT is blocked for > 5 min, IDE must be killed:(
Comment 6 Yulia Novozhilova 2010-12-16 16:24:28 UTC
Could you please describe what exactly you do to reproduce the bug. Something like the following:
1. Run the IDE (what distribution?)
2. Open (or Create?) for example a Maven Java Application (please describe more accurately, please note if the IDE runs any processes like "scanning projects" or another)
3. Then open tools -> Options -> Editor -> Hints
4. IDE is freezing
Is the thread dump is the same as the one you attached before?
I need your help to understand what is happening on your setup.
Comment 7 Tomas Danek 2010-12-16 16:43:46 UTC
1) start ide (java distro)
2) invoke Tools | Options > Editor > Hints

that's all. Tried this time with jdk 1.7ea, the same result. Will generate a new thread dump.
Comment 8 Tomas Danek 2010-12-16 16:45:10 UTC
Created attachment 104164 [details]
threaddump2
Comment 9 Yulia Novozhilova 2010-12-16 20:17:47 UTC
Thank you, Tomas.
It definitely sticks in org.netbeans.modules.options.CategoryModel.masterLookupTask. Will investigate.
Comment 10 Antonin Nebuzelsky 2010-12-17 14:00:29 UTC
Looks like a problem in Dlight module to me.

Thread "AWT-EventQueue-0" is waiting for thread "org.netbeans.modules.options.CategoryModel" to finish which hangs in initialization of dlight's LocalTerminalAction. The action's constructor calls into LocalTerminalAction.getEnvironment() which triggers and waits for another thread ("Default RequestProcessor") and that thread is hanging in some native execution.

Should be fixed in Dlight IMO.
Comment 11 Yulia Novozhilova 2010-12-21 10:33:24 UTC
Thank you, Tonda!

org.netbeans.modules.nativeexecution.ExecutionEnvironmentFactoryServiceImpl.getLocalHostInfo() method runs another thread that executes HostInfoUtils.getHostInfo(LOCAL) method. Looks like problem is somewhere there.
Reassigning to ide.
Comment 12 Yulia Novozhilova 2010-12-21 10:34:04 UTC
Thank you, Tonda!

org.netbeans.modules.nativeexecution.ExecutionEnvironmentFactoryServiceImpl.getLocalHostInfo() method runs another thread that executes HostInfoUtils.getHostInfo(LOCAL) method. Looks like problem is somewhere there.
Reassigning to ide.
Comment 13 Maria Tishkova 2010-12-21 12:25:06 UTC

*** This bug has been marked as a duplicate of bug 193186 ***
Comment 14 Maria Tishkova 2010-12-21 12:27:13 UTC
Hmm... Not sure it is a duplicate.
Andrew, can you take a look, please.
Comment 15 Andrew Krasny 2010-12-21 13:51:09 UTC
It is a duplicate of that bug. 
I'm pretty sure it is not a deadlock, but 'just' a big pause in response. 
This is true that the problem was caused by getLocalHostInfo(). Now this should be fixed. 

Tomas Musil: could you, please, confirm that the problem is gone? Thanks!

*** This bug has been marked as a duplicate of bug 193186 ***
Comment 16 Tomas Danek 2011-01-03 15:51:53 UTC
i am not able to reproduce anymore, consider as verified.
Comment 17 Andrew Krasny 2011-01-04 13:25:22 UTC
Thanks!