-
Bug
-
Resolution: Fixed
-
P4
-
1.1, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7
-
b03
-
generic, sparc
-
generic, solaris_2.5.1, solaris_2.6
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2016319 | 1.1.8 | Patrick Ong | P4 | Resolved | Fixed | 1.1.8 |
JDK-2016318 | 1.1.7 | Patrick Ong | P4 | Resolved | Fixed | b01 |
Name: rlT66838 Date: 07/30/97
Software: Solaris 2.5.1
Hardware: Ultra Sparc 1
The following source core makes the Java VM grow in
size indefinitely indicating a memory leak in the VM
or the Solaris motif libraries.
Here's the java source code:
import java.awt.*;
public class MemoryLeak7
{
public static void main( String args[] )
{
for( ;; )
{
for( int i = 0; i < 16; i++ )
{
Frame frame = new Frame();
frame.setSize( 300, 300 );
frame.setTitle( "Leaky Frame" );
frame.setVisible( true );
frame.setVisible( false );
frame.dispose();
frame = null;
}
System.gc();
System.runFinalization();
try
{
System.out.println( "---------- Sleeping ----------" );
Thread.currentThread().sleep( 5000 );
System.out.println( "------ Finished Sleeping ------" );
}
catch( Exception e )
{
System.err.println( "Thread interrupted" );
}
} // end: infinite for loop
} // end: main
}
company - Sterling Diagnostic Imaging, Inc. , email - ###@###.###
======================================================================
###################### so#3383176 - Thu14May98-15:45 BELLEY ###############3
# java -fullversion
java full version "Solaris_JDK_1.1.5_02"
Bug number 4068618 still occurs on a cleanly installed 128MB Ultra 5
running 2.5.1. Per the install instructions, I installed patches 103566-25
and 103640-17.
I was monitoring memory usage by simply doing ls -la /proc/xxx on the pid
of the job. Left running, this program will CRASH the machine (first, it
reports a SYSSEGV error, and the machine is left in a state that requires a
reboot to clear).
The source code I was using is as follows: (slightly modified from the
reported bug:)
import java.awt.*;
import java.util.*;
public class MemoryLeak7
{
public static void main( String args[] )
{
Frame frame;
Runtime rt = Runtime.getRuntime();
for( ;; )
{
for( int i = 0; i < 16; i++ )
{
frame = new Frame();
frame.setSize( 300, 300 );
frame.setTitle( "Leaky Frame" );
frame.setVisible( true );
frame.setVisible( false );
frame.dispose();
}
rt.gc();
System.gc();
System.runFinalization();
rt.gc();
try
{
System.out.println( "---------- Sleeping ----------" );
Thread.currentThread().sleep( 1000 );
System.out.println( "------ Finished Sleeping ------" );
System.out.println("Total Memory: "+rt.freeMemory());
}
catch( Exception e )
{
System.err.println( "Thread interrupted" );
}
} // end: infinite for loop
} // end: main
}
For what it is worth, we tried this on a system running 2.6, and the same
problem occurs.
######################
Software: Solaris 2.5.1
Hardware: Ultra Sparc 1
The following source core makes the Java VM grow in
size indefinitely indicating a memory leak in the VM
or the Solaris motif libraries.
Here's the java source code:
import java.awt.*;
public class MemoryLeak7
{
public static void main( String args[] )
{
for( ;; )
{
for( int i = 0; i < 16; i++ )
{
Frame frame = new Frame();
frame.setSize( 300, 300 );
frame.setTitle( "Leaky Frame" );
frame.setVisible( true );
frame.setVisible( false );
frame.dispose();
frame = null;
}
System.gc();
System.runFinalization();
try
{
System.out.println( "---------- Sleeping ----------" );
Thread.currentThread().sleep( 5000 );
System.out.println( "------ Finished Sleeping ------" );
}
catch( Exception e )
{
System.err.println( "Thread interrupted" );
}
} // end: infinite for loop
} // end: main
}
company - Sterling Diagnostic Imaging, Inc. , email - ###@###.###
======================================================================
###################### so#3383176 - Thu14May98-15:45 BELLEY ###############3
# java -fullversion
java full version "Solaris_JDK_1.1.5_02"
Bug number 4068618 still occurs on a cleanly installed 128MB Ultra 5
running 2.5.1. Per the install instructions, I installed patches 103566-25
and 103640-17.
I was monitoring memory usage by simply doing ls -la /proc/xxx on the pid
of the job. Left running, this program will CRASH the machine (first, it
reports a SYSSEGV error, and the machine is left in a state that requires a
reboot to clear).
The source code I was using is as follows: (slightly modified from the
reported bug:)
import java.awt.*;
import java.util.*;
public class MemoryLeak7
{
public static void main( String args[] )
{
Frame frame;
Runtime rt = Runtime.getRuntime();
for( ;; )
{
for( int i = 0; i < 16; i++ )
{
frame = new Frame();
frame.setSize( 300, 300 );
frame.setTitle( "Leaky Frame" );
frame.setVisible( true );
frame.setVisible( false );
frame.dispose();
}
rt.gc();
System.gc();
System.runFinalization();
rt.gc();
try
{
System.out.println( "---------- Sleeping ----------" );
Thread.currentThread().sleep( 1000 );
System.out.println( "------ Finished Sleeping ------" );
System.out.println("Total Memory: "+rt.freeMemory());
}
catch( Exception e )
{
System.err.println( "Thread interrupted" );
}
} // end: infinite for loop
} // end: main
}
For what it is worth, we tried this on a system running 2.6, and the same
problem occurs.
######################
- backported by
-
JDK-2016318 Motif FontPeer needs to be disposed to prevent memory leak
- Resolved
-
JDK-2016319 Motif FontPeer needs to be disposed to prevent memory leak
- Resolved
- duplicates
-
JDK-4037927 Graphics.setFont() causes virtual memory leaks
- Closed
-
JDK-4168395 Component.setFont() leaks memory.
- Closed
-
JDK-4380741 When Applogic run,it is not finish and dead lock.
- Closed
- relates to
-
JDK-4174998 System.gc method doesn't work correctly on Solaris environment.
- Closed
(1 relates to)