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 123712 - Netbeans regularly uses 100% CPU and > 500Mb memory
Summary: Netbeans regularly uses 100% CPU and > 500Mb memory
Status: CLOSED WORKSFORME
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: THREAD
: 128824 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-10 00:55 UTC by lionelv
Modified: 2011-05-25 11:38 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This is the logfile after one such event. (53.24 KB, text/plain)
2007-12-10 00:56 UTC, lionelv
Details
Here's a thread dump. This particular case wasn't using quite so much memory, but I had to kill Netbeans after getting the thread dump. (12.52 KB, text/plain)
2007-12-14 04:05 UTC, lionelv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lionelv 2007-12-10 00:55:24 UTC
For my particular setup with several projects I often find Netbeans Java VM using 100% CPU and > 500Mb memory. No
particular action seems to cause it but when it happens, restarting doesn't seem to solve the problem.

It may or may not be important, but the 5 projects I have open are dependent on each other. Each is created from an
existing ant script. I'm also using external jars and for some reason adding jars from the eclipse EMF projects and
related does not seem to solve code completion problems, Netbeans won't recognise the classes that are in these jars.

The only way to stop Netbeans in such circumstances is to kill the JVM via task manager.

I'm sorry I don't know of a way to repeat the problem as it's undeterministic even on my machine.
Comment 1 lionelv 2007-12-10 00:56:02 UTC
Created attachment 54050 [details]
This is the logfile after one such event.
Comment 2 novakm 2007-12-11 09:41:04 UTC
Could you attach a threaddump, please? http://wiki.netbeans.org/wiki/view/GenerateThreadDump
Comment 3 lionelv 2007-12-14 04:05:21 UTC
Created attachment 54246 [details]
Here's a thread dump. This particular case wasn't using quite so much memory, but I had to kill Netbeans after getting the thread dump.
Comment 4 lionelv 2007-12-14 04:17:24 UTC
Some additional info. The problem seems to occur when I click a compile error link in the output window. Once this
happens I generally have to kill netbeans and start again. However, compiling again and trying to follow that link will
repeat the problem. To get past it I manually navigate to the class that has the error and correct it.

So far the compile error in all cases that I can think of is an import to a class that no longer exists. I'm a bit of a
unique case because I'm using Eclipse EMF (argh, yuk - sorry, I was forced) to generate code which breaks a lot of
things, then I go back to Netbeans (nice - except this problem :)) to do my code development and fix the errors.

P.S.

The page you linked about getting a thread dump isn't perfect. Using the console window I would have had to copy text
via the dos method, which is a real pain, and I didn't realise this at first. And the instructions for StackTrace were
not accurate, maybe for an older version, I'm not sure, I got there though :).
Comment 5 Peter Pis 2008-01-17 09:30:12 UTC
Reassigning to "java" for evaluation.
Comment 6 Dusan Balek 2008-02-29 12:07:07 UTC
No Java infrastructure related activity can be seen in the attached thread dump. Passing to 'cnd' for further evaluation.
Comment 7 Vladimir Voskresensky 2008-02-29 13:19:13 UTC
cnd threads are in WAITING or TIMED_WAITING state, 
so, it's not C++ pack problem.

reassign to core platform for evaluating
Comment 8 Lukas Hasik 2008-02-29 14:08:23 UTC
I'm not a thread dump expert however this one looks strange. I'd blame cnd.
	- waiting on <0x046cb910> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:485)
	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserQueue.waitReady(ParserQueue.java:401)
	- locked <0x046cb910> (a java.lang.Object)

Petre, could you please "quickly" look at the thread dump. Thanks
Comment 9 Jiri Rechtacek 2008-03-03 16:16:34 UTC
*** Issue 128824 has been marked as a duplicate of this issue. ***
Comment 10 Lukas Hasik 2008-03-04 10:15:23 UTC
lionelv, are able to reproduce it? Could you try to get another thread dump? 
thank you
Comment 11 Jiri Rechtacek 2008-03-04 15:08:36 UTC
*** Issue 128824 has been marked as a duplicate of this issue. ***
Comment 12 Denis Anisimov 2008-03-27 08:46:46 UTC
Could you please provide more details with answers to questions:
1) As I understand you have problems with JAVA project ( not C++ ) ?
2) The problem appears when you are trying go to compilation error from Output window 
via Link ?
3) Are you sure that provided thread dump is gotten after click on link ?

There are some ambiguity in your description about following by error link 
and provided thread dump.

I don't see any method in the dump that points to your clicking action.
So this is why I'm asking these questions. 
Could you please attach thread dump one more time that you see after clicking on link with error.
Comment 13 lionelv 2008-03-27 09:12:19 UTC
Reposting response here:

Responses follow:


On 27 Mar 2008 07:46:47 -0000, ads@netbeans.org <ads@netbeans.org> wrote:

    ------- Additional comments from ads@netbeans.org Thu Mar 27 07:46:46 +0000 2008 -------
    Could you please provide more details with answers to questions:
    1) As I understand you have problems with JAVA project ( not C++ ) ?



Yes.
 

    2) The problem appears when you are trying go to compilation error from Output window
    via Link ?



On reflection it may just appear that the problem occurs after clicking on a compilation error. However I think it may
be that the JVM is already using 100% cpu when I try to click on the compilation error in the output window and so I
don't get a response.
 

    3) Are you sure that provided thread dump is gotten after click on link ?

    There are some ambiguity in your description about following by error link
    and provided thread dump.

    I don't see any method in the dump that points to your clicking action.
    So this is why I'm asking these questions.



As above, the problem may already be occurring when I click the link and you may be right, Netbeans may never even be
getting a chance to process my click on the compilation error in the output window.

I'm not sure how netbeans works but from what I have seen it appears that it does some sort of
parsing/tracing/compilation dynamically as code changes. It may be that I have changed code externally and broken
several links and the next time Netbeans runs its dynamic compilation it brings itself into this state. I'm really just
guessing though.


    Could you please attach thread dump one more time that you see after clicking on link with error.



Unfortunately (or fortunately whichever way you look at it) I have not seen the error in some time so I can only say
that if I see it again I will post a thread dump.


Sorry I couldn't be more help.
Comment 14 Jaroslav Tulach 2008-06-23 14:30:12 UTC
Waiting for some reasonable thread dump.