pthreads and RHEL AS
"Aggarwal, Vineet" <[email protected]>
| Newsgroups | gmane.linux.redhat.release.taroon.general |
|---|---|
| Message-ID | <D4F1010F1A52F14F90048F1A97BB779702EC3191@MSG-MANTAS-VA.mantas.com> |
Hi,
I am running into a problem with pthreads on Red Hat Enterprise Linux AS
3.0 Update 6 and AS 4.0 Update 3. I know there must be something in the
Red Hat threading model that I need to account for but I am at a loss as
to what it is.
I have a very simple multi-threaded application. It uses POSIX threads.
The same code runs completely fine in Solaris 8, Solaris 10, and SUSE
Linux 9 environments. However, no matter what compiler I use (I have
tried different versions of GCC, and Intel's ICC), no matter what
compiler switches I use, and no matter what hardware I'm running on (I
have tried 32-bit Xeon chips, 64-bit Opteron, and 64-bit EM64T), my
program crashes when I use multiple threads (it runs without error on a
single thread) on Red Hat AS. I have tried compiling with the
-D_REENTRANT and -pthread options, and I have also tried linking in
-lpthread, but this does not help. The code is completely thread-safe,
but as an experiment I have even tried putting a mutex around the
entire block of code that the application runs so that there is no
chance of any sort of thread conflicts, but this does not help either.
The fact that compiler, hardware, etc. does not make a difference, and
the fact that it runs on three other OS's leads me to believe that the
issue is Red Hat-specific. Can somebody please give me a suggestion for
things to look into (e.g. OS patches and such) or any other ideas that
might help me along? When I thought it was isolated to AS 3.0, I
thought maybe I should get the latest update, but the fact that it is
also occuring in AS 4.0 leads me to believe that an extra AS 3.0 patch
isn't going to fix it.
Anyhow, this is a critical issue for us, so I would appreciate any help.
Please let me know if you need any information from me. I don't know
how useful it is, but here is a core dump that gets generated when the
application crashes:
#0 0x00b55eff in raise () from /lib/tls/libc.so.6
(gdb) where
#0 0x00b55eff in raise () from /lib/tls/libc.so.6
#1 0x00b57705 in abort () from /lib/tls/libc.so.6
#2 0x06f657c5 in os::abort ()
from
/kds/i686-intel-linux2.4.21/pkg/jdk1.5.0_05/jre/lib/i386/libjvm.so
#3 0x06ff42d4 in VMError::report_and_die ()
from
/kds/i686-intel-linux2.4.21/pkg/jdk1.5.0_05/jre/lib/i386/libjvm.so
#4 0x06f6a1c4 in JVM_handle_linux_signal ()
from
/kds/i686-intel-linux2.4.21/pkg/jdk1.5.0_05/jre/lib/i386/libjvm.so
#5 0x06f676e4 in signalHandler ()
from
/kds/i686-intel-linux2.4.21/pkg/jdk1.5.0_05/jre/lib/i386/libjvm.so
#6 <signal handler called>
#7 0x00b149e1 in FNMThread::checkFirstLetters (this=0x8a659f4,
firstLetters=0x60 <Address 0x60 out of bounds>, tokenCount1=2
'\002',
testnameFirstLetters=0x8a658c0 "TATB\024Y|\b\204]\232",
tokenCount2=4 '\004') at FNMThread.cc:1300
#8 0x00b14769 in FNMThread::compare (this=0x8a659f4,
firstLetters=0xb45de950,
firstLetterPairs=0xb45debd8, tripletSet=0xb45280f8,
tripletSetMeta=0xb45e10e0, tripletSetMeta2=0xb45e35e8 "",
testnameFirstLetters=0x8a658c0 "TATB\024Y|\b\204]\232",
testnameFirstLetterPairs=0x8a65858, testnameTripletSet=0x8a64ba4,
testnameTripletSetMeta=0x8a65880, testnameTokenCount=4 '\004',
watchListCounter=23, matchIdScorePairs=@0x8a658b4) at
FNMThread.cc:1226
#9 0x00b1371f in destr_detour71 () at FNMThread.cc:409
#10 0x00b10b12 in FNMThread::matchNames (this=0x8a659f4,
candidates=@0x8a65a24, results=@0x8a65a18) at FNMThread.cc:312
#11 0x00b0220e in destr_detour44 () at FNMController.cc:218
#12 0x009e9dd8 in start_thread () from /lib/tls/libpthread.so.0
#13 0x00c0ad1a in clone () from /lib/tls/libc.so.6
(gdb)
BTW, The stuff about the JVM can be ignored. That just traps the signal
thrown by the failing method FNMThread::checkFirstLetters. I get the
crash regardless of whether or not I have the JVM running.
Thanks,
Vineet
--
Taroon-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/taroon-list