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 245293

Summary: OutOfMemoryError: GC overhead limit exceeded
Product: java Reporter: kevcundick
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: alexvsimon, rider453, wrm007
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 210480
Attachments: stacktrace

Description kevcundick 2014-06-27 17:09:45 UTC
Build: NetBeans IDE 7.4 (Build 201310111528)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.55-b03, Java(TM) SE Runtime Environment, 1.7.0_55-b13
OS: Windows 7

User Comments:
kevcundick: Using TomEE 1.0, I started it in debug mode.  I set a break on a line to watch for a specific record duirng a loop.  The app does loop a lot of records.  The record I was watching for was part of an object, ex. pt.getLastName().equals("name").  While running the app, it became extreamly slow.  Eventually I had to kill both the TomEE and Netbeans processes.  I can reproduce this problem at will.  I don't usually have problems debugging this way, for some reason it happens in this instance consistently.




Stacktrace: 
java.lang.OutOfMemoryError: GC overhead limit exceeded
   at com.sun.tools.javac.comp.Check.checkType(Check.java:570)
   at com.sun.tools.javac.comp.Attr$ResultInfo.check(Attr.java:508)
   at com.sun.tools.javac.comp.Resolve$MethodResultInfo.check(Resolve.java:968)
   at com.sun.tools.javac.comp.Resolve$4.checkArg(Resolve.java:818)
   at com.sun.tools.javac.comp.Resolve$AbstractMethodCheck.argumentsAcceptable(Resolve.java:729)
   at com.sun.tools.javac.comp.Resolve$4.argumentsAcceptable(Resolve.java:827)
Comment 1 kevcundick 2014-06-27 17:09:47 UTC
Created attachment 147807 [details]
stacktrace
Comment 2 Dusan Balek 2014-07-24 11:41:27 UTC
Tons of JCClassDecl trees held by DocEnv.treePaths variable. It is declared as WeakHashMap<JCTree, TreePath>, however since every value holds its key (TreePath holds given JCTree at its end), all map entries are held forever. The real pain is that every expression evaluated by debugger adds a new entry to this map.

Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/bcb60d11f7f2
http://hg.netbeans.org/main/nb-javac/rev/145d232bd232
Comment 3 Dusan Balek 2014-07-24 13:23:22 UTC
*** Bug 245934 has been marked as a duplicate of this bug. ***
Comment 4 Dusan Balek 2014-07-24 13:25:13 UTC
*** Bug 244927 has been marked as a duplicate of this bug. ***
Comment 5 Quality Engineering 2014-07-30 02:34:33 UTC
Integrated into 'main-silver', will be available in build *201407300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/bcb60d11f7f2
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #245293: OutOfMemoryError: GC overhead limit exceeded - fixed.
Comment 6 Dusan Balek 2015-03-05 14:02:51 UTC
*** Bug 250893 has been marked as a duplicate of this bug. ***
Comment 7 Dusan Balek 2015-03-12 08:47:34 UTC
*** Bug 244828 has been marked as a duplicate of this bug. ***