This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Serious problem with multithreaded I/O on Linux


>>>>> "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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]