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 238793 - Unusual high CPU and Memory usage in 7.4.1
Summary: Unusual high CPU and Memory usage in 7.4.1
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Action Items (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jan Peska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 19:13 UTC by ecerichter
Modified: 2014-03-14 07:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NB log (579.72 KB, application/octet-stream)
2013-11-25 19:13 UTC, ecerichter
Details
NB log (220.91 KB, application/octet-stream)
2013-11-25 19:15 UTC, ecerichter
Details
Screenshot of Task Manager (39.49 KB, image/png)
2013-11-25 19:16 UTC, ecerichter
Details
Visual WM Thread Dump (29.73 KB, application/octet-stream)
2013-11-25 19:17 UTC, ecerichter
Details
Self Sampler (138.10 KB, application/octet-stream)
2013-11-25 19:17 UTC, ecerichter
Details
Visual WM sampler (11.25 KB, application/octet-stream)
2013-11-25 19:17 UTC, ecerichter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ecerichter 2013-11-25 19:13:20 UTC
Created attachment 142564 [details]
NB log

I two episodes of high memory and cpu usage after upgrade to 7.4.1.
Unfortunately, I had not captured details from the first episode.
Here are the information regarding the second episode.
Comment 1 ecerichter 2013-11-25 19:15:47 UTC
Created attachment 142565 [details]
NB log
Comment 2 ecerichter 2013-11-25 19:16:37 UTC
Created attachment 142566 [details]
Screenshot of Task Manager
Comment 3 ecerichter 2013-11-25 19:17:16 UTC
Created attachment 142567 [details]
Visual WM Thread Dump
Comment 4 ecerichter 2013-11-25 19:17:34 UTC
Created attachment 142568 [details]
Self Sampler
Comment 5 ecerichter 2013-11-25 19:17:55 UTC
Created attachment 142569 [details]
Visual WM sampler
Comment 6 Tomas Hurka 2013-11-26 08:43:11 UTC
The snapshot shows that most of the time is spent in tasklist thread, however there is a lot of errors in messages.log. Especially 35 lines with:
"Wrong Classpath entry file:/C:/Program%20Files/glassfish-4.0/glassfish/modules/*"
and there is also number of errors from jasper report. Namely
"java.io.FileNotFoundException: jar:file:/C:/Program%20Files/NetBeans%207.4/ireport/modules/com-jaspersoft-ireport.jar!/com/jaspersoft/ireport/*"

Please fix those first and try again. Thanks.

BTW: There is no tool named "Visual WM". The correct name is VisualVM.
BTW2: If you want to provide data from VisualVM (in addition to snapshot from selfsampler), please attach application snapshot <http://visualvm.java.net/snapshots.html> and not just sampler snapshot.
Comment 7 ecerichter 2013-11-26 10:43:56 UTC
I hate when someone seems that doesn't want to spend time to fix a serious bug.

1) Yes, I know most of time is spent in tasklist thread. I've look at. __This is the problem__ actually, good that programmers found it.

2) The "Wrong Classpath entry" is a NB problem: Glassfish has been installed by NetBeans.

3) Yes, I have installed JasperReports plugin. It could be faulty, but then NB must have some kind of protection from faulty plugins - and I know it can't be protected from all the issues, but this is a good opportunity to look at it and make the first step!

4) I can't "fix those errors first" - I just simply don't know how to, if I knew, then I already did it. As said, Glassfish has been installed by NB itself. And regarding iReport, I can uninstall the plugin. The point is that this problem started after upgrade to 7.4.1 as part of NetCat testing program.

5) Regarding BTW: I don't care if the tool is called "Visual WM" or "VisualVM". I have a problem with NetBeans, not with VisualVM.

6) Regarding BTW2: If I don't want to provide the information, I HAD NOT SPENT TIME GATHERING THE INFORMATION.

Instead of "closing as incomplete", should keep it moving forward. I don't have to time to waste "defending my tickets" - but I'm interested in providing more information if you ask for.

Now, the information provided is compliant with what was asked by Gj in NetCat list. Sorry if not enough.
Comment 8 ecerichter 2013-11-26 10:46:20 UTC
In time: if those errors in messages.log are too serious, they should be pointed that user interface, not in obscure log that nobody will look at until having a huge performance problem like I have right now.
Comment 9 ecerichter 2013-11-26 10:50:26 UTC
Ah, and wan't by Gj, but Jirka. Sorry, Gj :-).
Comment 10 ecerichter 2013-11-26 10:57:55 UTC
Startup options (would affect behavior):


netbeans_default_options="--fontsize 14 --locale en:US -J-Dcom.sun.management.jmxremote.port=7099 -J-Dcom.sun.management.jmxremote.ssl=false -J-Dcom.sun.management.jmxremote.authenticate=false -J-XX:+OptimizeStringConcat -J-XX:+AggressiveOpts -J-XX:+UseG1GC -J-Xms1g -J-Xmx2g -J-XX:MaxPermSize=512m -J-XX:+PrintCommandLineFlags -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.zip.disableMemoryMapping=true -J-Dplugin.manager.check.updates=true -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes"
Comment 11 ecerichter 2013-11-26 10:58:18 UTC
Tell me where can I attache memory dump (1Gb, 110Mb compressed).
Comment 12 Jan Peska 2013-11-26 13:23:07 UTC
Hi,

there were no changes at all in Action Items in 7.4.1, is it possible that you opened Action Items window after the update? From the snapshot I can assume that you have over 100 projects opened is that right? 

In that case I'm afraid there is not much I can do, those projects have to be scanned and with so many of them it will take some time.

I suggest to switch your scope to "Selected Project".

Let me know if I miss something.
Comment 13 ecerichter 2013-11-26 13:44:23 UTC
- I do have only 3 projects open in one project group:

Main project have 250K LOC, with lots of libraries and also some documents in specific "documents" folder (kept togheter because of Subversion). Project folder has 2.78Gb in size.

- Action Items window was already open.
- I always use "Current project" option only in Action Items to make it faster.
Comment 14 ecerichter 2013-11-26 13:58:22 UTC
Heap dump sent to Hudson.
Hope this helps.
Comment 15 Jan Peska 2013-11-27 08:40:17 UTC
> - I always use "Current project" option only in Action Items to make it
> faster.

I that case it seems that the unusual usage of CPU is caused by switching project context in the middle of loading the action items. Loading of the previous project is not canceled properly and it could end up with calling QuerySupport.findRoots fro every FO in project which in your case is crucial.

I'm not sure why this occurs after 7.4.1 but it is possible that e.g. there were some changes in the way of setting current project after startup which make it happen. Anyway I think there is an easy fix for it - cancel the previous load properly if the project is switched...
Comment 16 Jan Peska 2013-11-27 13:30:06 UTC
fix: http://hg.netbeans.org/core-main/rev/beb5ccd174ac
Comment 17 ecerichter 2013-11-27 13:38:45 UTC
Will this fix be available in 7.4.1 final?
Or will this be only in 7.4.2?

Thanks,

Edson
Comment 18 Jan Peska 2013-11-27 13:57:38 UTC
Unfortunately it won't be in 7.4.1 - it is too late for that. SO it will be in next release/patch
Comment 19 belloinchat 2014-03-14 00:02:03 UTC
I have problem on 7.4 100% CPU. I am almost given up using netbean.... when and where is this patch going to be downloadable?
Comment 20 Ondrej Vrabec 2014-03-14 07:04:26 UTC
(In reply to belloinchat from comment #19)
> I have problem on 7.4 100% CPU. I am almost given up using netbean.... when
> and where is this patch going to be downloadable?
Then simply close the Action items window and do not reopen it.