Bug 197680

Summary: IDE continues to burn cpu
Product: cnd Reporter: tbrunhoff <tbrunhoff>
Component: DebuggerAssignee: Egor Ushakov <gorrus>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: apepin, issues, saubrecht
Version: 7.0   
Target Milestone: 7.0   
Hardware: PC   
OS: Linux   
Whiteboard: fix-in-nb701 70patch1-verified
Issue Type: DEFECT Exception Report:
Bug Depends on: 194816, 195672    
Bug Blocks:    
Attachments: stack dump while java was hung.
Another stack dump
stack dump #3
stack dump #4
stack dump, sample 1 (2011-06-21)
stack dump, sample 2 (2011-06-21)
screenshot of ide layout
stack dump, sample 3 (2011-06-21)

Description tbrunhoff 2011-04-12 22:14:33 UTC
Yesterday I upgraded to:

Product Version: NetBeans IDE Dev (Build 201104110401)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Linux version 2.6.35.11-83.fc14.x86_64 running on i386; UTF-8; en_US (nb)
Userdir: /home/toddb/.netbeans/dev

Then started editing. Most of the work centered on one source file (8600 lines) and one header (15000 lines). Not long int it things slowed signifantly and these got filed:
    http://statistics.netbeans.org/analytics/detail.do?id=178314
    http://netbeans.org/bugzilla/show_bug.cgi?id=197419

Shortly after that the ide became unresponsive for minutes at a time, burning lots of cpu. I restarted the ide and tried again. But even after a small amount of editing, the ide would go away for many seconds (10, 20, 30 seconds), yet only rarely would the "slowness detected" dialog pop up.

This is a big change over the last version I used (build 201103260400).
Comment 1 tbrunhoff 2011-04-12 22:15:31 UTC
Created attachment 107701 [details]
stack dump while java was hung.
Comment 2 tbrunhoff 2011-04-12 22:16:03 UTC
Sure seems like a p1 or p2, as the ide has become unusable.
Comment 3 tbrunhoff 2011-04-12 22:26:21 UTC
Created attachment 107702 [details]
Another stack dump

Here's another stackdump after stopping the ide, removing .netbeans/dev/var/cache, restarting and continuing the edit session.
Comment 4 tbrunhoff 2011-04-12 22:34:07 UTC
Created attachment 107703 [details]
stack dump #3 

For this and the previous stack dump, the ide was frozen for 30-40 seconds, but the "slowness detected" dialog did not come up.
Comment 5 tbrunhoff 2011-04-12 23:09:25 UTC
Created attachment 107705 [details]
stack dump #4

Well... I take it back. Build 201103260400 suffers the same problems (very long hangs, slowness dialog only about 20% of the time)
Comment 6 Leonid Lenyashin 2011-04-13 15:15:16 UTC
Please have a look. It is probably too late to be fixed in 7.0 even as a showstopper. Consider for the next patch.
Comment 7 Alexander Pepin 2011-04-13 15:30:43 UTC
I agree, it should be investigated and fixed in the patch.
Comment 8 Alexander Simon 2011-04-13 17:47:30 UTC
Probably low performance of MarkVector is a root of the bug. 
Reassign to evaluation.
Comment 9 Alexander Simon 2011-04-14 04:46:52 UTC
Bug depends on fix of bug #194816.
Since bug #194816 was fixed annotations attaching/detaching can be done in non EDT thread.
So move out of EDT annotations attaching/detaching in class AnnotationsHolder.
Comment 10 Alexander Simon 2011-04-14 15:15:26 UTC
UI freezing was fixed in change set:
http://hg.netbeans.org/cnd-main/rev/5a98b2e2e66d

Created separate bug #197739 for low performance of computing annotations.

Some performance improvements were done in change set:
http://hg.netbeans.org/cnd-main/rev/b22a5a588d21
Comment 11 Quality Engineering 2011-04-15 08:39:17 UTC
Integrated into 'main-golden', will be available in build *201104150401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/5a98b2e2e66d
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #197680 - IDE continues to burn cpu
- move out of EDT annotations attaching/detaching
Comment 12 Quality Engineering 2011-04-16 08:40:02 UTC
Integrated into 'main-golden', will be available in build *201104160401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/32869a1a7dfd
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #197680 - IDE continues to burn cpu
- fix some performance issues of annotations counting
Comment 13 Alexander Pepin 2011-05-13 12:11:48 UTC
verified in trunk build 20110513
Comment 14 Alexander Simon 2011-05-16 08:26:20 UTC
Change sets were transplanted in release70_fixes branch:
5a98b2e2e66d transplanted to 734b2b27e6c9
b22a5a588d21 transplanted to 947cfc2c02fa
32869a1a7dfd transplanted to 798ffecc38c1
Increment specification version:
1588b05a3e64
Comment 15 Alexander Simon 2011-05-16 08:28:22 UTC
For the list of included fixed bugs please check
http://wiki.netbeans.org/NetBeans70PatchesInfo
Comment 16 Alexander Pepin 2011-05-20 10:40:07 UTC
verified in patch1 candidate
Comment 17 tbrunhoff 2011-06-21 15:21:27 UTC
This still occurs. The symptoms are the same, although perhaps less often: I'll be editing (it might always be during a debug session) and when I do something that requires code completion, like typing a control-p, control-space, dot or ->, the ide freezes and java burns cpu.

This morning it went away for about 10 minutes. Then partly repainted the screen and went away again. Attached is are a couple of stack dumps taken minutes apart during the freeze.

The stack dumps always appear to show AWT-EventQueue-1 as runnable and painting the screen.
Comment 18 tbrunhoff 2011-06-21 15:37:10 UTC
Product Version: NetBeans IDE Dev (Build 201106041000)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Linux version 2.6.35.13-91.fc14.x86_64 running on i386; UTF-8; en_US (nb)
Userdir: /home/toddb/.netbeans/dev
Comment 19 tbrunhoff 2011-06-21 15:38:42 UTC
Created attachment 109020 [details]
stack dump, sample 1 (2011-06-21)
Comment 20 tbrunhoff 2011-06-21 15:39:19 UTC
Created attachment 109021 [details]
stack dump, sample 2 (2011-06-21)
Comment 21 Alexander Simon 2011-06-21 17:00:48 UTC
Tod, please attach IDE screen shot, because thread dump does not contain any information about what component is repainted.

Reassign to evaluation.
Comment 22 Vladimir Voskresensky 2011-06-21 17:08:37 UTC
Todd, if it is rather stable to be reproducible in your usual workflow, could you, please, help us to understand the problematic component by changing your workflow granularly. 
Could you, please, start by not using terminal windows (because I see a lot of threads related to terminal)?
Comment 23 tbrunhoff 2011-06-21 17:46:12 UTC
> Tod, please attach IDE screen shot, because thread dump does not contain any information about what component is repainted.

I think there is nothing to see in a screen snapshot. At the time of the hang, the real estate occupied by the ide is frozen, and if I switch screens or workspaces and come back, it is blank. Attached is a screenshot of the approximate ide layout with the debugger stopped and editor and output windows open. Note that there are no external terminal windows, only the internal windows. If you see external terminal windows in the stack trace, perhaps that is the problem. I will switch back to gnome terminal.

>Todd, if it is rather stable to be reproducible in your usual workflow, could
you, please, help us to understand the problematic component by changing your
workflow granularly.

I can restart more often. Note that I frequently remove ~/.netbeans/dev/var/cache because the code model gets confused. I don't have a good way to characterize how and when this happens.

>Could you, please, start by not using terminal windows (because I see a lot of
threads related to terminal)?

"console type" was configured as "internal terminal" and is not configured as "external terminal".  Let's see what happens.
Comment 24 tbrunhoff 2011-06-21 17:47:17 UTC
Created attachment 109028 [details]
screenshot of ide layout
Comment 25 tbrunhoff 2011-06-21 17:49:12 UTC
Correction: "console type" was configured as "internal terminal" and is *now* configured as "external terminal".  Let's see what happens.
Comment 26 tbrunhoff 2011-06-21 19:06:48 UTC
Another hang (27 sec). This time I did not get a stack trace but the "slowness" detector did.  See http://statistics.netbeans.org/analytics/exception.do?id=515629
Comment 27 tbrunhoff 2011-06-21 19:10:43 UTC
... which has the same trace as bug http://netbeans.org/bugzilla/show_bug.cgi?id=195672 which was closed as incomplete.
Comment 28 tbrunhoff 2011-06-21 19:17:37 UTC
Created attachment 109029 [details]
stack dump, sample 3 (2011-06-21)

And another freeze, this time for 76sec.  stack dump sample 3 is attached. See http://statistics.netbeans.org/analytics/exception.do?id=515632
Comment 29 tbrunhoff 2011-06-21 20:09:50 UTC
This is pretty consistent:
 - debugging session
 - begin editing
 - type "ptr->" where ptr is a class instance

And the ide hangs for 20 seconds and up.
Comment 30 Egor Ushakov 2011-06-22 09:09:20 UTC
Todd, could you please try:
- latest jre (1.6.0_26)
- hide different tabs (callstack, variables, output, navigator etc.) and try to reproduce the bug, maybe you could track it down to the problematic component
Comment 31 Egor Ushakov 2011-06-22 10:17:51 UTC
I was able to reproduce it several times, usually
it requires:
- debug session
- some opened tabs which will intersect with the completion popup
- mouse pointer at any variable when you press ctrl
when I press space I experience the same hang for ~10 seconds
Comment 32 Egor Ushakov 2011-06-22 12:21:14 UTC
It looks like java bug, investigating further.
For now workaround is not to maximize IDE window :)
Popup and even tooltips appearing close to the right side of the screen leads to IDE hang.
Comment 33 Egor Ushakov 2011-06-22 12:40:53 UTC
another workaround is to hide type column from the variables view...
Comment 34 Egor Ushakov 2011-06-22 16:02:54 UTC
original issue was solved in 70 patch1, the freeze during the debug session will be fixed in the bug 195672
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo