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 183993 - [69cat] A lot of memory consumed through SelfSamplerAction
Summary: [69cat] A lot of memory consumed through SelfSamplerAction
Status: CLOSED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-13 11:45 UTC by Jan Lahoda
Modified: 2011-05-25 11:40 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2010-04-13 11:45:58 UTC
I opened a heap dump linked from:
http://netbeans.org/projects/www/lists/netcat/archive/2010-04/message/226
(I can provide you a copy offline if needed).

The four most common instances in the heap dump are:
-j.l.Long: ~8M5 instances, ~205MB of memory
-j.l.Object[]: ~3M instances, ~500MB of memory
-j.u.ArrayList: ~3M instances, almost 100MB of memory
-SamplesOutputStream$Sample: ~1M5 instances, ~60MB of memory

I tried to look at the Longs, and the instances I inspected were held by SelfSamplerAction$Controller. The biggest Object[] itself consumes ~12MB of memory, and is also held by SelfSamplerAction$Controller. So it looks like the SelfSamplerAction$Controller retains incredible amounts of memory, which it should not, IMO.
Comment 1 Jaroslav Tulach 2010-04-13 12:54:00 UTC
Tomáši, please limit the number of gathered snapshots to 5min. I'll fix bug 183201 in code completion meanwhile.
Comment 2 Jiri Kovalsky 2010-04-13 18:46:13 UTC
This report is based on investigations from NetCAT team hence adding appropriate prefix.
Comment 3 Tomas Hurka 2010-04-13 18:59:38 UTC
There is no problem with SelfSamplerAction. The main problem is that due a problem in code completion, which can run multiple samplings over a long time.
Comment 4 David Strupl 2010-04-13 19:29:32 UTC
Wait a second. After returning from lunch yesterday I had the OOME with very similar heap dump (500.000 of longs, 15000 of stacktraces etc.). I didn't touch the IDE when I was on lunch. I consider that a P1. Maybe it is a different problem. Should I attach my heap dump from that for you to compare? I can guarantee that I did not invoke code completion from lunch ;-)
Comment 5 Tomas Hurka 2010-04-13 19:36:07 UTC
You experienced issue #183201. That issue is P1, but the problem is _not_ in SelfSamplerAction. Your problem will be fixed by fix of issue #183201.
Comment 6 David Strupl 2010-04-13 19:40:22 UTC
Ok, thanks.
Comment 7 Tomas Hurka 2010-04-13 19:41:08 UTC
See also issue #183832.
Comment 8 Tomas Hurka 2010-04-20 10:00:19 UTC
maximum sampling time limited to 5 minutes

fixed in profiler-main

changeset:   167939:03cf9491afab
user:        Tomas Hurka <thurka@netbeans.org>
date:        Tue Apr 20 11:46:59 2010 +0200
summary:     bugfix #183993, limit maximum sampling time to 5 minutes
Comment 9 Quality Engineering 2010-04-23 04:28:47 UTC
Integrated into 'main-golden', will be available in build *201004230200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/03cf9491afab
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #183993, limit maximum sampling time to 5 minutes