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 205366 - [71cat] NB completely hangs
Summary: [71cat] NB completely hangs
Status: RESOLVED INCOMPLETE
Alias: None
Product: platform
Classification: Unclassified
Component: Navigator (show other bugs)
Version: 7.1
Hardware: PC All
: P2 normal (vote)
Assignee: Jan Peska
URL:
Keywords: RANDOM
: 205602 207768 210166 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-21 16:16 UTC by muellermi
Modified: 2012-04-18 14:30 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
dump (24.01 KB, text/plain)
2011-11-21 16:16 UTC, muellermi
Details
messages log older (contains information before stopping NB) (129.41 KB, text/plain)
2011-11-21 16:19 UTC, muellermi
Details
messages log (current) (53.25 KB, text/plain)
2011-11-21 16:19 UTC, muellermi
Details
dump 2011-11-24 (21.37 KB, text/plain)
2011-11-24 13:38 UTC, muellermi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description muellermi 2011-11-21 16:16:29 UTC
Product Version = NetBeans IDE Dev (Build 201111200600)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.7.0_01
Runtime = Java HotSpot(TM) Client VM 21.1-b02


After closing all documents and double clicking onto a web page in project tree, NetBeans completely hung.

This might be the important part of the console window:
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread org.netbeans.core.ui.sampler.SelfSamplerAction$InternalSampler@16753a0

I had to force a stop via TaskManager.
Comment 1 muellermi 2011-11-21 16:16:57 UTC
Created attachment 113373 [details]
dump
Comment 2 muellermi 2011-11-21 16:19:07 UTC
Created attachment 113374 [details]
messages log older (contains information before stopping NB)
Comment 3 muellermi 2011-11-21 16:19:12 UTC
Created attachment 113375 [details]
messages log (current)
Comment 4 Jan Peska 2011-11-22 08:37:54 UTC
According to Thread dump AWT-EventQueue is runnable so there is no deadlock

AWT-EventQueue-0" prio=6 tid=0x0541d400 nid=0x508 runnable [0x05f3f000]
   java.lang.Thread.State: RUNNABLE

and there are no time-expensive operations in AWT-EventQueue (e.g. IO access) so this dump is not valid to this issue. More thread dumps are needed to evaluate this problem -> INCOMPLETE

If you are able to reproduce this issue, please reopen and attach new dumps.

Thanks
Comment 5 muellermi 2011-11-24 13:38:20 UTC
Created attachment 113508 [details]
dump 2011-11-24
Comment 6 muellermi 2011-11-24 13:38:45 UTC
hangs whilst working with web apps (ok, I'm mostly working with wab apps, thus this might be no criteria)
Comment 7 Jan Peska 2011-12-02 09:01:23 UTC
*** Bug 205602 has been marked as a duplicate of this bug. ***
Comment 8 Jan Peska 2011-12-02 09:08:02 UTC
Another report of this issue appeared. To find out the problem I need to know few important details.

- was CPU working during this freeze?
- what were you doing when it happened? (possible scenario for reproduction would be great)

Thanks
Comment 9 aldobrucale 2011-12-02 09:20:59 UTC
If I remember correctly, the cpu was not under heavy load during the freeze, and the nb process was not using it.

I don't remember exactly what I was doing when it happened, probably I had just expanded a source folder node in the explorer right after doing something else in the editor window (somehow I thougth I had done a sequence of actions too quickly)
Comment 10 Jan Peska 2011-12-02 10:29:17 UTC
> After closing all documents and double clicking onto a web page in project
> tree, NetBeans completely hung.

How many documents did you close, approximately?
Comment 11 Jan Peska 2011-12-02 10:53:57 UTC
(In reply to comment #9)
> If I remember correctly, the cpu was not under heavy load during the freeze,
> and the nb process was not using it.

If the problem happens again please check CPU usage to be sure.

And one more thing you didn't mentioned, that freeze was permanent?
Comment 12 aldobrucale 2011-12-02 11:21:00 UTC
(In reply to comment #11)
> (In reply to comment #9)
> > If I remember correctly, the cpu was not under heavy load during the freeze,
> > and the nb process was not using it.
> 
> If the problem happens again please check CPU usage to be sure.

It happened four days ago, so I'm only 95% sure the CPU usage was low.

> 
> And one more thing you didn't mentioned, that freeze was permanent?

Yes, I killed the process a few minutes later.
Comment 13 Jan Peska 2011-12-05 08:36:42 UTC
Especially question for muellermi: 

Does it happen on a specific project? You were able to reproduce it (according to addition thread dump you uploaded).


> After closing all documents and double clicking onto a web page in project
> tree, NetBeans completely hung.

Was this web page you opened e.g. abnormally large?
Comment 14 muellermi 2011-12-06 21:10:09 UTC
The hang appeared two times. I was not able to force this problem. Only the IDE hang whilst other apps worked properly. I don't know how much documents I closed before ND haang the second time. Maybe somethine between 10 and 20.
I know this is only minimal information, sorry I can't tell more...
Comment 15 Jan Peska 2011-12-08 08:42:27 UTC
I'm afraid we are not able to get enough information about this issue so I'm not able to find out what causes this freeze. 

I will mark this issue as INCOMPLETE and I'm afraid that only way to get more details is to wait until it happens again. 

In case of another freeze please create several thread dumps for one occurrence (e.g. in 10s frequency) and reopen this issue.

Thanks
Comment 16 Jan Peska 2012-02-08 13:18:49 UTC
*** Bug 207768 has been marked as a duplicate of this bug. ***
Comment 17 Jan Peska 2012-03-28 08:03:36 UTC
*** Bug 210166 has been marked as a duplicate of this bug. ***
Comment 18 Jan Peska 2012-03-28 08:16:22 UTC
Another occurrence of this issue appears -> REOPENED

Thanks to Marian Petras we have a Netbeans snapshot (see http://netbeans.org/bugzilla/attachment.cgi?id=117307).

It seems that AWT-EventQueue thread is busy removing the node listener (in org.openide.util.WeakListenerImpl) -> reassigning to Platform/Other, please evaluate.
Comment 19 Antonin Nebuzelsky 2012-03-29 15:10:13 UTC
http://bugzilla-attachments-210166.netbeans.org/bugzilla/attachment.cgi?id=117308

AWT thread and Project UI thread are both on the same lock, but AWT thread is not the one blocked.

Jesse, please evaluate.
Comment 20 Jesse Glick 2012-03-29 18:35:51 UTC
Sorry, no clues; nothing looks blocked for any clear reason.

NavigatorController.updateContext() appears in all the thread dumps, though the snapshot makes no sense: it says Node.removeNodeListener is called once whereas EventListenerList.remove is called 43 times, which is impossible. My suspicion is that invocation counts in self-profiler snapshots are generally bogus.
Comment 21 Jan Peska 2012-04-02 08:48:45 UTC
(In reply to comment #20)
> Sorry, no clues; nothing looks blocked for any clear reason.
> 
> NavigatorController.updateContext() appears in all the thread dumps, though the
> snapshot makes no sense: it says Node.removeNodeListener is called once whereas
> EventListenerList.remove is called 43 times, which is impossible. My suspicion
> is that invocation counts in self-profiler snapshots are generally bogus.

But still in most cases Node.removeNodeListener is called once in the NavigatorController.updatedContex() because it removes listeners from active node(s) so I don't know what could be possibly wrong about that. Do you know about any similar issues having problem with Node.removeNodeListener or is it just this one?
Comment 22 Jesse Glick 2012-04-02 14:48:20 UTC
I do not know about anything similar. N.rNL should of course be fast.
Comment 23 Jan Peska 2012-04-17 07:04:00 UTC
I've added logging which determines how many node listeners is to be removed. Please use FINE level of logging and reopen this issue as soon as the problem occurs and attach message log.

Thank you.
Comment 24 Antonin Nebuzelsky 2012-04-18 12:38:14 UTC
(In reply to comment #23)
> Please use FINE level of logging and reopen this issue as soon as the problem
> occurs and attach message log.

Honza, add a note here what the users need to use as the command line option for the fine logging in this case.
Comment 25 Jan Peska 2012-04-18 13:51:34 UTC
(In reply to comment #24)
> 
> Honza, add a note here what the users need to use as the command line option
> for the fine logging in this case.

You simply start NetBeans via command line using this switch: 

-J-Dname.of.the.Logger.level=500
Comment 26 Jesse Glick 2012-04-18 14:01:25 UTC
But what is the name of the logger? (You did not even mention which changeset added the logging.)
Comment 27 Jan Peska 2012-04-18 14:30:00 UTC
(In reply to comment #26)
> But what is the name of the logger? (You did not even mention which changeset
> added the logging.)

Ahh sorry, my bad.

Changes set: http://hg.netbeans.org/core-main/rev/17ea24f1e5d9
Logger name: org.netbeans.modules.navigator.NavigatorController