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 23241 - Serious memory leak at compilation/clean stage
Summary: Serious memory leak at compilation/clean stage
Status: CLOSED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: -FFJ-
Hardware: PC Solaris
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-08 13:10 UTC by Alexei Mokeev
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 Alexei Mokeev 2002-05-08 13:10:18 UTC
FFJ oocupies all memory, if you try to
compile/clean servlet  several times.
Steps to reproduce:
1)Create some servlet
2)Set "Execution"->"External Execution" property
for it
3)Compile servlet and then clean it
4)Repeat steps 2-3 for Internal and FastJavac
compilation
5)Repeat steps 2-4 sverla times and notice, that
each round increased amount of memory,
used by FFJ on several megabytes.


On machine with 384 Mb of memory(under Solaris 9) 
after 3-7 rounds FFJ occupies all memory and
throws Exception:
ava.io.IOException: Not enough space
        at
java.lang.UNIXProcess.forkAndExec(Native Method)
        at
java.lang.UNIXProcess.<init>(UNIXProcess.java:54)
        at java.lang.Runtime.execInternal(Native
Method)
        at
java.lang.Runtime.exec(Runtime.java:550)
        at
java.lang.Runtime.exec(Runtime.java:475)
        at
java.lang.Runtime.exec(Runtime.java:441)
        at
org.openide.execution.NbProcessDescriptor.exec(NbProcessDescriptor.java:229)
        at
org.openide.execution.NbProcessDescriptor.exec(NbProcessDescriptor.java:132)
        at
org.netbeans.modules.java.JExternalCompilerGroup.createProcess(JExternalCompilerGroup.java:239)
        at
org.openide.compiler.ExternalCompilerGroup.createProcess(ExternalCompilerGroup.java:121)
        at
org.openide.compiler.CompilerExecutor$CERunnable.run(CompilerExecutor.java:153)
        at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:119)


Well reproduced with FFJ 4.0 020502_02 build under
Solaris 9 with jdk1.4.0
Comment 1 Alexei Mokeev 2002-05-08 13:12:22 UTC
At 5)Repeat steps 2-4 sverla times and notice, that
I've mean: 5)Repeat steps 2-4 several times and notice, that
Comment 2 Petr Jiricka 2002-05-16 17:10:17 UTC
This looks like a problem in the Java module, reassigning.
Comment 3 Svata Dedic 2002-05-17 08:45:34 UTC
Is the process list in the Execution window empty ?
Comment 4 Alexei Mokeev 2002-05-17 14:27:50 UTC
Yes, it is empty. <No Processes Running> printed at Execution view.
Comment 5 Tomas Hurka 2002-05-20 15:13:21 UTC
Cannot reproduce on NB 3.4 dev build from 15/05/2002
Comment 6 Alexei Mokeev 2002-05-20 18:23:50 UTC
Well reproduced for me with 200205200100 dev build under
SunOS shield 5.9 Beta_Refresh sun4u sparc SUNW,Ultra-1
Comment 7 Jan Becicka 2002-05-24 16:29:23 UTC
Alexei, can you reproduce it on different 
platform (Win, Linux) or machine?
Comment 8 Alexei Mokeev 2002-05-28 13:48:33 UTC
Yes, well reproduced on different Solaris 8 station with FFJ4.0 rc5
Can't reproduce it on Win2K: After first several compilation/clean
cycles amount of occupied 
by FFJ memory increased only on 4MB, Next cycles dont increases memory
usage.
Comment 9 Jan Becicka 2002-05-28 16:11:06 UTC
Alexei, there is a Memory Meter in the IDE. You can enable it as a
toolbar. Please do it.
Im trying to reproduce it on Solaris 8, but without success. I've
created Servlet. Memory Meter shows, that there is about 17000 of
33000KB of memory used. After I've repeated compilation with different
compilers, memory meter shows, that there is about 24000 of 33000KB
used. If I push the Garbage Collect button, memory usage is back:
16000 of 33000KB is used.
Can you send us your numbers?
Thanks.
Comment 10 Jan Becicka 2002-05-29 15:44:27 UTC
I'm changing resolution to invalid. The problem is not in the IDE
IMHO, but in the JDK implementation. Please use Bugtraq and file a bug
against JDK. Thanks.
Comment 11 Alexei Mokeev 2002-05-29 16:31:06 UTC
In my case(on Solaris 8) Memory Meter shows values 21000-30000Kb used
of  39000
during clean/compile cycles. So acording to Memory Meter there is no
memory leak.
But "top" shows, that values "SIZE" and "RES" for running java process
increased during each cycle 
on several megabytes and never decreases. Think, that top shows more
trusted values.
Comment 12 Jan Becicka 2002-05-30 09:43:22 UTC
Yes, top shows more trusted values, but we can fix only leaks inside
IDE. And this looks like memory leak in JDK.
Comment 13 Quality Engineering 2003-07-01 13:11:44 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.
Comment 14 Quality Engineering 2003-07-01 13:20:16 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.