Name: ks84122 Date: 11/14/2002
Original description from HP:
----------------------------
Server and client debug VM (build 1.4.1-b21-debug, mixed mode) crashes when using -Xconcgc and -XX:+UseParNewGC options together on Solaris.
$ uname -a
SunOS hppdl694 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-4
$ jdk141_b21/jdk1.4.1/bin/java_g -XX:+UseParNewGC -Xconcgc -verbose:gc Garbage1 none
VM option '+UseParNewGC'
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1-b21-debug mixed mode)
#
# Fatal: must own lock CompactibleFreeListSpace._lock
#
# Error ID: /BUILD_AREA/jdk1.4.1/hotspot/src/share/vm/runtime/mutexLocker.cpp, 93 [ Patched ]
#
# Problematic Thread: prio=10 tid=0xb4448 nid=0x4 runnable
#
Dumping core....
Abort(coredump)
----------------------------
The source code of the test case is in the following:
// Garbage1.java
// java Garbage1 [none|before|after]
// Demonstration of the garbage collector and finalization
class Chair
{
static boolean gcrun = false;
static boolean f = false;
static int created = 0;
static int finalized = 0;
int i;
Chair()
{
i = ++ created;
if((created % 10000) == 0)
System.out.println("Created " + created);
}
protected void finalize()
{
if(!gcrun)
{
gcrun = true;
System.out.println("Beginning to finalize after " + created +
" Chairs have been created");
}
if(i == 50000)
{
System.out.println("Finalizing Chair #300000, " + "Setting flag to" +
" stop Chair creation");
f = true;
}
finalized ++;
if(finalized >= created)
System.out.println("All " + finalized + " finalized");
}
}
public class Garbage1
{
public static void main(String [] args)
{
int count = 1;
long t1 = System.currentTimeMillis();
if (args.length == 0)
{
System.err.println("Usage: \n" + "java Garbage1 before\n or:\n" +
"java Garbage1 after");
return;
}
while(!Chair.f)
{
new Chair();
new String("To take up space");
// if (count++ % 50000 == 0)
// System.gc();
}
System.out.println("After all Chairs have been created:\n" +
"total created = " + Chair.created +
", total finalized = " + Chair.finalized);
if(args[0].equals("before"))
{
System.out.println("gc():");
System.gc();
System.out.println("runFinalization():");
System.runFinalization();
}
System.out.println("bye!");
if(args[0].equals("after"))
System.runFinalizersOnExit(true);
long t2 = System.currentTimeMillis();
System.out.println("Finish: " + (t2-t1) + "ms" );
}
}
(Review ID: 166982)
======================================================================