Serious problem with multithreaded I/O on Linux
Tom Tromey
tromey@cygnus.com
Wed Jul 14 21:40:00 GMT 1999
>>>>> "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
More information about the Java
mailing list