This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: printStackTrace() hangs in read()
- From: Jost Boekemeier <JBoekemeier at inetsoftware dot de>
- To: 'Andrew Haley' <aph at redhat dot com>
- Cc: "'java at gcc dot gnu dot org'" <java at gcc dot gnu dot org>
- Date: Wed, 5 Feb 2003 10:41:31 +0100
- Subject: RE: printStackTrace() hangs in read()
> -lpthread
Thanks, that was helpful! If I link with the pthread library, then the jni
example also works.
> It's a bug in Red Hat 8.0's Java installation.
Then I am not the only one who made this mistake. -- It doesn't seem a good
idea to load pthreads dynamically. :)
Jost
-----Original Message-----
From: Andrew Haley [mailto:aph@redhat.com]
Sent: Dienstag, 4. Februar 2003 11:49
To: Jost Boekemeier
Cc: 'java@gcc.gnu.org'
Subject: JNI: printStackTrace() hangs in read()
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.