This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
JNI: printStackTrace() hangs in read()
- From: Andrew Haley <aph at redhat dot com>
- To: Jost Boekemeier <JBoekemeier at inetsoftware dot de>
- Cc: "'java at gcc dot gnu dot org'" <java at gcc dot gnu dot org>
- Date: Tue, 4 Feb 2003 10:49:27 +0000 (GMT)
- Subject: JNI: printStackTrace() hangs in read()
- References: <91B8EADC2C6ED611A36C00A0246A00AA6E17@st3.intern.de>
Jost Boekemeier writes:
> Hi,
>
> this may be a known problem on linux (kernel 2.4.18; RH8; gcc3.2.1, no
> special options)
>
> I have run a simple java test program which simply calls
> ex.printStackTrace().
It's a bug in Red Hat 8.0's Java installation.
This is the patch you need:
--- /usr/lib/gcc-lib/i386-redhat-linux/3.2/libgcj.spec~ 2002-09-04 04:03:39.000000000 +0100
+++ /usr/lib/gcc-lib/i386-redhat-linux/3.2/libgcj.spec 2002-12-10 15:59:39.000000000 +0000
@@ -4,6 +4,6 @@
# to link with libgcj.
#
%rename lib liborig
-*lib: -lgcj -lm -lz -ldl %(libgcc) %(liborig)
+*lib: -lgcj -lm -lpthread -lz -ldl %(libgcc) %(liborig)
*jc1: -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions
> On linux, is is possible to fork/exec when threads are being used (there are
> two other threads probably belonging to the gc and finalizer)? How can I
> determine if a procid is a thread?
>From Linux's point of view, there is really very little difference
between a process and a thread -- they're just processes that share
memory.
Andrew.