debugging threads vs processes
jpolsonaz@mac.com
jpolsonaz@mac.com
Fri Jul 13 08:40:00 GMT 2001
Has anybody tried using IBM's new Linux threading library with GCJ?
My personal experience with the currently released LinuxThreads is that
multi-threaded applications are almost undebuggable. LinuxThreads
currently has a bug that causes all threads to wakeup from semaphores
the first time you connect a debugger to the process. This, of course, immediately
crashes most multi-threaded applications since they don't expect to wake
up until the semaphore actually gets signaled.
Sure would be nice if IBMs threading library actually fixed linux's threads.
For now, I do most multi-threaded debugging on Mach.
On Friday, July 13, 2001, at 08:45 AM, Tom Tromey wrote:
>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:
Per> Thanks to everybody who responded!ÃÂ I still have no idea why the
Per> server is crashing (possibly some weird interaction between
Per> Apache's use of threads and Java's use of threads?), but my
Per> confusion is now at a higher plane of enlightenment!
Jeff> Hmm... are you loading libgcj.so dynamically?ÃÂ The GC may not
Jeff> track threads properly unless it is loaded at startup.
It might be worse than that.ÃÂ boehm-gc overrides various pthread_*
functions so that it can keep track of what is going on.ÃÂ Apache might
need to be recompiled so that it calls these functions.ÃÂ At least, if
Apache uses threads and if it can create new threads that use libgcj
without notifying the GC.ÃÂ This is all platform dependent.ÃÂ Offhand I
don't know which platforms use overrides and which use other methods.
Tom
More information about the Java
mailing list