This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Serious problem with multithreaded I/O on Linux
- To: Bryce McKinlay <bryce@albatross.co.nz>
- Subject: Re: Serious problem with multithreaded I/O on Linux
- From: Tom Tromey <tromey@cygnus.com>
- Date: Wed, 14 Jul 1999 21:39:47 -0700
- Cc: java-discuss@sourceware.cygnus.com
- References: <378D3999.9B9652BB@albatross.co.nz>
>>>>> "Bryce" == Bryce McKinlay <bryce@albatross.co.nz> writes:
Bryce> On Linux (using Redhat 6.0/glibc 2.1.1-6), Calling a blocking
Bryce> I/O method [eg: anything that eventually calls
Bryce> FileDescriptor.read()] causes many calls from all other threads
Bryce> to block also. This makes multithreaded I/O (ie: reading from
Bryce> two sockets simultaneously) completely
Bryce> unreliable/impossible. Other things, like starting a new
Bryce> thread, do not work while the read() method is blocking.
Bryce> At a guess, the problem has something to do with the way in
Bryce> which gcj is interacting with LinuxThreads
Actually, my guess is that we aren't compiling
natFileDescriptorPosix.cc with _REENTRANT defined.
This is just a piece of configure lossage; I think we ought to define
this when using pthreads.
Could you try rebuilding libgcj with -D_REENTRANT? If that works,
I'll write a fix tomorrow.
T