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 178133 - 6.8RC1 (With PHP) becomes slow for no obvious reason
Summary: 6.8RC1 (With PHP) becomes slow for no obvious reason
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: rmatous
URL:
Keywords:
: 178271 180030 180375 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-04 05:02 UTC by bsander
Modified: 2010-04-18 20:37 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
OSX sample of Netbeans process (56.23 KB, text/plain)
2009-12-04 05:02 UTC, bsander
Details
Threaddump of NB hang when creating a new YML file. (88.41 KB, text/plain)
2009-12-08 04:02 UTC, tarjei
Details
jstack thread dump 1 (40.22 KB, text/plain)
2009-12-08 05:10 UTC, bsander
Details
jstack thread dump 2 (42.34 KB, text/plain)
2009-12-08 05:10 UTC, bsander
Details
jstack thread dump 3 (44.06 KB, text/plain)
2009-12-08 05:11 UTC, bsander
Details
jstack thread dump 4 (42.97 KB, text/plain)
2009-12-08 05:11 UTC, bsander
Details
jstack thread dump 5 (43.14 KB, text/plain)
2009-12-08 05:12 UTC, bsander
Details
jmap -histo <pid> (380.29 KB, text/plain)
2009-12-08 06:26 UTC, bsander
Details
new histogram with hints disabled (447.56 KB, text/plain)
2009-12-17 05:35 UTC, bsander
Details
Thread dump (14.54 KB, text/plain)
2010-02-01 06:44 UTC, frantisek_troster
Details
jstack of Netbeans after hanging (109.28 KB, text/plain)
2010-02-08 08:13 UTC, nickelstar
Details
Thread dump of Netbeans after hanging (29.79 KB, text/plain)
2010-02-08 08:20 UTC, nickelstar
Details
stacktrace after hanging (100% cpu usage) (87.94 KB, text/plain)
2010-03-05 10:03 UTC, axelat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bsander 2009-12-04 05:02:38 UTC
Created attachment 92098 [details]
OSX sample of Netbeans process

After I use the PHP edition of Netbeans 6.8RC1 for a while, CPU usage suddenly shoots to 100% or higer, and the app becomes very slow (though it still responds to everything eventually). There's no single action I can pinpoint this behavior to..

I'm attaching a sample from the OSX activity monitor, figured it may help.
Comment 1 Peter Pis 2009-12-04 06:56:50 UTC
Could you please take threaddump while running into this?

http://wiki.netbeans.org/GenerateThreadDump
Comment 2 Peter Pis 2009-12-07 03:55:08 UTC
Reassigning.
Comment 3 Tomas Mysik 2009-12-07 05:15:55 UTC
Yes, please, create _several_ thread dumps, reopen this issue and attach them.

Thanks.
Comment 4 tarjei 2009-12-08 01:01:22 UTC
Hi, I'm reopening this bug as I am experiencing the same issues, but on Linux.

I am working on a symfony project and am experiencing this bug. The UI grinds to a halt after 4 - 6 hrs of usage. It seems to me that it happens faster when I work with symfonys fluent interfaces (f.x. lime_test).

Also, another indicator is that code completion stops working after a while.
Comment 5 Tomas Mysik 2009-12-08 01:47:37 UTC
As I already wrote earlier, please, attach _several_ thread dumps [1] after the IDE gets slow. Without this, there's nothing we can do because we don't know where the problem could be.

Thanks.
[1] http://wiki.netbeans.org/GenerateThreadDump
Comment 6 tarjei 2009-12-08 04:02:37 UTC
Created attachment 92256 [details]
Threaddump of NB hang when creating a new YML file. 

Ok, sorry for not adding a threaddump. I'll add threaddumps each time NB hangs the next few days. 

One thing: My problem is on Linux. Is it ok to use the same bug or should I create a new one?
Comment 7 bsander 2009-12-08 05:10:09 UTC
Created attachment 92259 [details]
jstack thread dump 1
Comment 8 bsander 2009-12-08 05:10:41 UTC
Created attachment 92260 [details]
jstack thread dump 2
Comment 9 bsander 2009-12-08 05:11:07 UTC
Created attachment 92261 [details]
jstack thread dump 3
Comment 10 bsander 2009-12-08 05:11:41 UTC
Created attachment 92262 [details]
jstack thread dump 4
Comment 11 bsander 2009-12-08 05:12:03 UTC
Created attachment 92263 [details]
jstack thread dump 5
Comment 12 bsander 2009-12-08 05:14:20 UTC
Here are my thread dumps. I can confirm that code completion stops working (it hangs on the text 'Scanning in progress...'. Also, the contents of the code navigator don't update when switching working files (though its title does).

Hope this helps!
Comment 13 Tomas Mysik 2009-12-08 05:54:44 UTC
> One thing: My problem is on Linux. Is it ok to use the same bug or should I
> create a new one?

One issue is OK.
Comment 14 Tomas Mysik 2009-12-08 06:05:33 UTC
Could you please attach histogram [1] when the IDE is slow?

Thanks a lot for your cooperation.
[1] jmap -histo <pid>
Comment 15 bsander 2009-12-08 06:26:36 UTC
Created attachment 92272 [details]
jmap -histo <pid>
Comment 16 Tomas Mysik 2009-12-08 06:51:39 UTC
It looks like a memory leak... Would it be possible to get a heap dump [1]? A problem could be that the generated file will be likely too big (even compressed) to be able to attach it to this issue. Do you have a possibility to upload it somewhere (e.g. Dropbox?) and provide a link, please?

Thanks a lot.
[1] jmap -dump:format=b <pid>
Comment 17 bsander 2009-12-08 07:18:46 UTC
Heh, that's quite the understatement ;) That command generated a file of about 550MB! I zipped it up (making it 83 MB) and put it here:

http://files.sanderbouwhuis.com/netbeans/heapdump.zip
Comment 18 rmatous 2009-12-14 05:24:32 UTC
I would like to fix this issue for 68 patch 1. I would like to confirm that disabling introduce hint will help. So, please go to Tools->Options->Editor->Hints->PHP and then disable the hint "Introduce Hint". As a result the reported problem should disappear - please confirm, thank
Comment 19 bsander 2009-12-15 08:03:13 UTC
Well, confirming something like that is hard since it shows up with unpredictable intervals, but I've been using Netbeans (6.8 final) for about 6 hours now without this problem, so I think it's a safe bet that hints are indeed causing this :)

I'll update if the problem reappears, but for now it seems to be gone with this workaround..
Comment 20 bsander 2009-12-17 05:35:24 UTC
Created attachment 92707 [details]
new histogram with hints disabled

OK scratch that, I just ran into the same problem again, even with hints disabled. I'm attaching a new histogram and I also created a new heap dump in the same folder as the previous one (37 MB, expands to 206 MB):

http://files.sanderbouwhuis.com/netbeans/heapdump2.zip
Comment 21 Tomas Mysik 2010-02-01 01:58:39 UTC
*** Bug 180030 has been marked as a duplicate of this bug. ***
Comment 22 frantisek_troster 2010-02-01 06:42:34 UTC
(In reply to comment #21)
> *** Bug 180030 has been marked as a duplicate of this bug. ***

Hi,

I am experiencing very similar or almost the same problem. I tried disabling "introduce hints" but without any effect. I created a dump, which is attached. I also found how to invoke this error at any time. I can provide the PHP project which causes this error (it's a symfony project) and a short video (http://screencast.com/t/N2U3ZWE2) of how to get the error (project was just reopened and fresh netbeans). Please let me know what is needed more.
Comment 23 frantisek_troster 2010-02-01 06:44:02 UTC
Created attachment 93713 [details]
Thread dump
Comment 24 rmatous 2010-02-01 06:48:18 UTC
Frantisek, if you can to provide the project then please do it, thanks
Comment 25 Tomas Mysik 2010-02-07 05:15:17 UTC
*** Bug 180375 has been marked as a duplicate of this bug. ***
Comment 26 nickelstar 2010-02-08 08:13:35 UTC
Created attachment 93964 [details]
jstack of Netbeans after hanging

I too have been experiencing 100% CPU utilization with Netbeans which results in the UI becoming unresponsive. This started with version 6.8 and has gotten noticeably worse with version 6.8.1. I can reproduce the probably consistently by attempting to rename a variable in a PHP function by pressing Control-R . On my machine (Ubuntu 9.10, 32-bit) this will always cause the issue to occur. I have attached a jstack. Also here is my system info:


Product Version         = NetBeans IDE 6.8 (Build 200912041610) (#ec9be6a6486c)
Operating System        = Linux version 2.6.31-19-generic running on i386
Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun Microsystems Inc.
Runtime                 = Java(TM) SE Runtime Environment 1.6.0_15-b03
Java Home               = /usr/lib/jvm/java-6-sun-1.6.0.15/jre
System Locale; Encoding = en_US (nb); UTF-8
Comment 27 nickelstar 2010-02-08 08:20:11 UTC
Created attachment 93965 [details]
Thread dump of Netbeans after hanging
Comment 28 Quality Engineering 2010-02-08 21:38:42 UTC
Integrated into 'main-golden', will be available in build *201002090200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a28716ade492
User: Radek Matous <rmatous@netbeans.org>
Log: #178133 - 6.8RC1 (With PHP) becomes slow for no obvious reason
Comment 29 rmatous 2010-02-09 02:59:37 UTC
Fixed:

http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a28716ade492
User: Radek Matous <rmatous@netbeans.org>
Log: #178133 - 6.8RC1 (With PHP) becomes slow for no obvious reason
Comment 30 Filip Zamboj 2010-02-09 09:30:56 UTC
@bsander@netbeans.org: 
could you, please, verify this fix? Just download new build from http://bertram.netbeans.org/hudson/job/PHP-build/ and check if you still face the same error. Then close as verified or reopen, please. Thanks a lot!!
Comment 31 frantisek_troster 2010-02-10 02:24:17 UTC
Hi, I've tested the new build and the problem seems to be fixed and suggestions works fine right now.
Comment 32 bsander 2010-02-10 03:26:15 UTC
Unfortunately, it's not. I downloaded Build #1363 (2010-02-10_09-04-24) this morning and imported my project. This issue has reappeared twice in the last 2 hours, so unfortunately this isn't fixed yet.

I've uploaded a new heapdump to http://files.sanderbouwhuis.com/netbeans/heapdump-1363.tbz (~20MB).

I did re-enable the "Introduce Hint" option by the way, it had been turned off since being proposed as a possible workaround in comment #18.
Comment 33 axelat 2010-03-05 10:01:19 UTC
same problem for me, using netbeans with symfony - after 1-2 minutes netbeans uses 100% cpu and gets extremly slow. stacktrace attached
Comment 34 axelat 2010-03-05 10:03:13 UTC
Created attachment 94806 [details]
stacktrace after hanging (100% cpu usage) 

stacktrace after hanging (100% cpu usage) - editor can still be used, but extremly slow, process couldn't be closed with close button.
Comment 35 Tomas Mysik 2010-03-08 06:46:58 UTC
Please, _always_ provide info about your NB version (Help > About).

Thanks.
Comment 36 axelat 2010-03-08 06:59:03 UTC
netbeans version 6.8 (see also stacktrace line 1) thx
Comment 37 Tomas Mysik 2010-03-08 08:32:34 UTC
(In reply to comment #36)
> netbeans version 6.8

In such case, feel free to try NB 6.9 Milestone 1 or our latest development version, it could (and should, we hope) be fixed now.
Comment 38 rmatous 2010-03-18 14:08:15 UTC
*** Bug 178271 has been marked as a duplicate of this bug. ***
Comment 39 rmatous 2010-04-09 09:54:18 UTC
http://hg.netbeans.org/main/rev/28309ea359d8

hopefully fixed, please try with the latest build and verify or reopen, please
Comment 40 bsander 2010-04-18 20:37:37 UTC
Yeah, looks like this is fixed now!