Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2005 11:52:14 +0800
From:      Huang wen hui <hwh@gddsn.org.cn>
To:        java@freebsd.org, threads@freebsd.org
Subject:   jdk15 and libthr
Message-ID:  <4349E56E.6060300@gddsn.org.cn>

next in thread | raw e-mail | index | archive | help
Hi,
I try to use jdk15+libthr on 6.0 and CURRENT, somtimes jdk15 could not
pass very simple Test:

# cat TestThread.java
public class TestThread extends Thread{
public TestThread() {
}

public void run() {
try{
Thread.sleep(12);
//Thread.sleep(1235);
}
catch(Exception ex) {

}
System.out.println("end");
}

public static void main(String[] args) throws Exception {
TestThread[] threads = new TestThread[5000];
for(int i=0;i<threads.length; i++) {
threads[i] = new TestThread();
try{
Thread.sleep(50);
}
catch(Exception ex) {
}
threads[i].start();
threads[i].join();
}
}
}

# gdb -core java_g.core /usr/local/jdk1.5.0//bin/java_g
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `java_g'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/lib/libthr.so.2...done.
Loaded symbols for /usr/lib/libthr.so.2
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from
/usr/local/jdk1.5.0/jre/lib/i386/client/libjvm_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/i386/client/libjvm_g.so
Reading symbols from /lib/libm.so.4...done.
Loaded symbols for /lib/libm.so.4
Reading symbols from
/usr/local/jdk1.5.0/jre/lib/i386/native_threads/libhpi_g.so...done.
Loaded symbols for
/usr/local/jdk1.5.0/jre/lib/i386/native_threads/libhpi_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/i386/libverify_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/i386/libverify_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/i386/libjava_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/i386/libjava_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/i386/libzip_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/i386/libzip_g.so
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x280dc8cb in thr_kill () from /lib/libc.so.6
[New Thread 0x82d8200 (LWP 100167)]
[New Thread 0x816fb00 (LWP 100211)]
[New Thread 0x816fa00 (LWP 100210)]
[New Thread 0x816f700 (LWP 100209)]
[New Thread 0x816f500 (LWP 100190)]
[New Thread 0x8165f00 (LWP 100183)]
[New Thread 0x8165e00 (LWP 100178)]
[New Thread 0x8165500 (LWP 100168)]
[New Thread 0x805a000 (LWP 100203)]
(gdb) bt
#0 0x280dc8cb in thr_kill () from /lib/libc.so.6
#1 0x28097779 in pthread_mutex_unlock () from /usr/lib/libthr.so.2
#2 0x280919db in pthread_kill () from /usr/lib/libthr.so.2
#3 0x280908be in raise () from /usr/lib/libthr.so.2
#4 0x2814c6a0 in abort () from /lib/libc.so.6
#5 0x28746f5a in os::abort (dump_core=1) at
/usr/ports/java/jdk15/work/hotspot/src/os/bsd/vm/os_bsd.cpp:1330
#6 0x2883c455 in VMError::report_and_die (this=0xbf7b5ec4)
at /usr/ports/java/jdk15/work/hotspot/src/share/vm/utilities/vmError.cpp:697
#7 0x284614c5 in report_assertion_failure (
file_name=0x288f22b4
"/usr/ports/java/jdk15/work/hotspot/src/os/bsd/vm/os_bsd.cpp", line_no=614,
message=0x288f2040 "assert(osthr->get_state() == RUNNABLE,\"invalid os
thread state\")")
at /usr/ports/java/jdk15/work/hotspot/src/share/vm/utilities/debug.cpp:210
#8 0x287469af in _start (data=0x821dc18) at
/usr/ports/java/jdk15/work/hotspot/src/os/bsd/vm/os_bsd.cpp:614
#9 0x28098e19 in pthread_create () from /usr/lib/libthr.so.2
#10 0x2809b650 in _thread_off_key_allocated () from /usr/lib/libthr.so.2
(gdb) up 8
#8 0x287469af in _start (data=0x81ae418) at
/usr/ports/java/jdk15/work/hotspot/src/os/bsd/vm/os_bsd.cpp:614
warning: Source file is more recent than executable.

614 //assert(osthr->get_state() == RUNNABLE, "invalid os thread state");
Current language: auto; currently c++
(gdb) list
609 Thread* thread = (Thread*)data;
610 OSThread* osthr = thread->osthread();
611
612 // XXXBSD: libc_r update required check was here
613
614 //assert(osthr->get_state() == RUNNABLE, "invalid os thread state");
615
616 // initialize signal mask for this thread
617 os::Bsd::hotspot_sigmask(thread);
618


# cat hs_err_pid33807.log
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# Internal Error
(/usr/ports/java/jdk15/work/hotspot/src/os/bsd/vm/os_bsd.cpp, 614),
pid=33807, tid=0x82d8200
#
# Java VM: Java HotSpot(TM) Client VM
(1.5.0-p2-hwh_08_oct_2005_14_04-debug mixed mode)
#
# Error: assert(osthr->get_state() == RUNNABLE,"invalid os thread state")

--------------- T H R E A D ---------------

Current thread is native thread

Stack: [0xbf776000,0xbf7b6000), sp=0xbf7b5e04, free space=255k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
V [libjvm_g.so+0x6c92d4]
V [libjvm_g.so+0x2ee4c5]
V [libjvm_g.so+0x5d39af]
C [libthr.so.2+0xde19] _pthread_create+0x5f9


--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x0821dc18 JavaThread "Thread-1967" [_thread_new, id=137200128]
0x0817e818 JavaThread "Low Memory Detector" daemon [_thread_blocked,
id=135723520]
0x0817e418 JavaThread "CompilerThread0" daemon [_thread_blocked,
id=135722752]
0x0817e018 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=135722240]
0x08104c18 JavaThread "Finalizer" daemon [_thread_blocked, id=135683840]
0x08104818 JavaThread "Reference Handler" daemon [_thread_blocked,
id=135683584]
0x08078818 JavaThread "main" [_thread_blocked, id=134586368]

Other Threads:
0x08165418 VMThread [id=135681280]
0x08102118 WatcherThread [id=135723776]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation total 576K, used 316K [0x2d920000, 0x2d9c0000,
0x2de00000)
eden space 512K, 49% used [0x2d920000, 0x2d95f028, 0x2d9a0000)
from space 64K, 100% used [0x2d9b0000, 0x2d9c0000, 0x2d9c0000)
to space 64K, 0% used [0x2d9a0000, 0x2d9a0000, 0x2d9b0000)
tenured generation total 1408K, used 204K [0x2de00000, 0x2df60000,
0x31920000)
the space 1408K, 14% used [0x2de00000, 0x2de333e8, 0x2de33400, 0x2df60000)
compacting perm gen total 8192K, used 1425K [0x31920000, 0x32120000,
0x35920000)
the space 8192K, 17% used [0x31920000, 0x31a846d8, 0x31a84800, 0x32120000)
No shared spaces configured.

Dynamic libraries:
0x08048000 /usr/local/jdk1.5.0/bin/java_g
0x2808b000 /usr/lib/libthr.so.2
0x2809d000 /lib/libc.so.6
0x28173000 /usr/local/jdk1.5.0/jre/lib/i386/client/libjvm_g.so
0x289a5000 /lib/libm.so.4
0x289bc000 /usr/local/jdk1.5.0/jre/lib/i386/native_threads/libhpi_g.so
0x289ce000 /usr/local/jdk1.5.0/jre/lib/i386/libverify_g.so
0x289dc000 /usr/local/jdk1.5.0/jre/lib/i386/libjava_g.so
0x289fd000 /usr/local/jdk1.5.0/jre/lib/i386/libzip_g.so
0x28057000 /libexec/ld-elf.so.1

VM Arguments:
java_command: TestThread

Environment Variables:
JAVA_HOME=/usr/local/jdk1.5.0
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
LD_LIBRARY_PATH=/usr/local/jdk1.5.0/jre/lib/i386/client:/usr/local/jdk1.5.0/jre/lib/i386:/usr/local/jdk1.5.0/jre/../lib/i386SHELL=/bin/csh
HOSTTYPE=FreeBSD
OSTYPE=FreeBSD
MACHTYPE=i386


--------------- S Y S T E M ---------------

OS:FreeBSD
uname:FreeBSD 7.0-CURRENT FreeBSD 7.0-CURRENT #87: Sun Oct 9 08:18:53
CST 2005 hwh@tp.gddsn.org.cn:/usr/obj/usr/src/sys/IBM01 i386
rlimit: STACK 65536k, CORE infinity, NOFILE 11095
CPU:total 1 family 6, cmov, cx8, fxsr, mmx

Memory: 4k page, physical 1909116k

vm_info: Java HotSpot(TM) Client VM (1.5.0-p2-hwh_08_oct_2005_14_04) for
freebsd-x86, built on Oct 8 2005 15:25:45 by root with gcc 3.4.4
[FreeBSD] 20050518





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4349E56E.6060300>