Subject: kern/36272: linux thread issue seen with java6?
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Mark Davies <mark@mcs.vuw.ac.nz>
List: netbsd-bugs
Date: 05/04/2007 02:25:01
>Number:         36272
>Category:       kern
>Synopsis:       linux thread issue seen with java6?
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 04 02:25:01 +0000 2007
>Originator:     Mark Davies
>Release:        NetBSD 4.99.18
>Organization:
Dept. of Comp. Sci., Victoria Uni. of Wellington, New Zealand.
>Environment:
	
	
System: NetBSD lap3.mcs.vuw.ac.nz 4.99.18 NetBSD 4.99.18 (MCS_LAPTOP) #15: Fri May  4 10:41:52 NZST 2007  mark@lap3.mcs.vuw.ac.nz:/local/SAVE/build.obj/local/src/src/sys/arch/i386/compile/MCS_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
	The sun-jdk6 package seems to be exposing a bug with linux emulation.
	
>How-To-Repeat:
	The below program when compiled and run with java1.5 runs fine under
	linux emulation but when run with java6 segfaults about 3 in every 4
	times it runs.  It runs fine with java6 on a fedora system and if I
	try to run it on a 4.99.9 system it dies with the following error:

	[...]
Thread 4: 399
Thread 4: 400
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  Internal Error (4E4D4554484F440E435050071F), pid=6791, tid=213051
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing)
# An error report file with more information is saved as hs_err_pid6791.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

cheers
mark



/**
 * @author ramsayneil
 * 
 */
public class ThreadTest implements Runnable
{
 public void run()
 {
 for (int i = 0; i <= 1000; i++)
 {
 System.out.printf("Thread %s: %d\n",
Thread.currentThread().getName(), i);
 }
 }
 
 /**
 * @param args
 */
 public static void main(String[] args)
 {
 // Create 5 threads with varying priorities
 
 for (int i = 1; i <= 5; i++)
 {
 Thread thread = new Thread(new ThreadTest());
 thread.setName("" + i);
 thread.start();
 }
 }
}

>Fix:

Unknown
>Unformatted: