  | | | pthreads and RHEL AS | pthreads and RHEL AS 2006-09-28 - By Aggarwal, Vineet
Back 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=@(protected)) at FNMThread.cc:1226
#9 0x00b1371f in destr_detour71 () at FNMThread.cc:409
#10 0x00b10b12 in FNMThread::matchNames (this=0x8a659f4,
candidates=@(protected), results=@(protected)) 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
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas -microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} @(protected) Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {page:Section1;} --> </style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Hi,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>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.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>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.<o:p></o :p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>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.<o:p></o:p ></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>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:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#0 0x00b55eff in raise () from /lib/tls/libc.so.6<o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>(gdb) where<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#0 0x00b55eff in raise () from /lib/tls/libc.so.6<o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#1 0x00b57705 in abort () from /lib/tls/libc.so.6<o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#2 0x06f657c5 in os::abort ()<o:p></o:p></span></font> </p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> from /kds/i686-intel-linux2.4.21/pkg/jdk1.5.0_05/jre/lib/i386/libjvm.so<o:p></o:p>< /span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#3 0x06ff42d4 in VMError::report_and_die ()<o:p></o:p> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> from /kds/i686-intel-linux2.4.21/pkg/jdk1.5.0_05/jre/lib/i386/libjvm.so<o:p></o:p>< /span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#4 0x06f6a1c4 in JVM_handle_linux_signal ()<o:p></o:p> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> from /kds/i686-intel-linux2.4.21/pkg/jdk1.5.0_05/jre/lib/i386/libjvm.so<o:p></o:p>< /span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#5 0x06f676e4 in signalHandler ()<o:p></o:p></span>< /font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> from /kds/i686-intel-linux2.4.21/pkg/jdk1.5.0_05/jre/lib/i386/libjvm.so<o:p></o:p>< /span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#6 <signal handler called><o:p></o:p></span>< /font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#7 0x00b149e1 in FNMThread::checkFirstLetters (this=0x8a659f4, <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> firstLetters=0x60 <Address 0x60 out of bounds>, tokenCount1=2 '\002', <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> testnameFirstLetters=0x8a658c0 "TATB\024Y¦\b\204]\232", <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> tokenCount2=4 '\004') at FNMThread.cc :1300<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#8 0x00b14769 in FNMThread::compare (this=0x8a659f4, firstLetters=0xb45de950, <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> firstLetterPairs=0xb45debd8, tripletSet =0xb45280f8, <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> tripletSetMeta=0xb45e10e0, tripletSetMeta2=0xb45e35e8 "", <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> testnameFirstLetters=0x8a658c0 "TATB\024Y¦\b\204]\232", <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> testnameFirstLetterPairs=0x8a65858, testnameTripletSet=0x8a64ba4, <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> testnameTripletSetMeta=0x8a65880, testnameTokenCount=4 '\004', <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> watchListCounter=23, matchIdScorePairs= @(protected)) at FNMThread.cc:1226<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#9 0x00b1371f in destr_detour71 () at FNMThread.cc:409 <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#10 0x00b10b12 in FNMThread::matchNames (this=0x8a659f4, <o :p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'> candidates=@(protected), results=@(protected) ) at FNMThread.cc:312<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#11 0x00b0220e in destr_detour44 () at FNMController.cc:218 <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#12 0x009e9dd8 in start_thread () from /lib/tls/libpthread.so.0<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>#13 0x00c0ad1a in clone () from /lib/tls/libc.so.6<o:p></o:p ></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>(gdb) <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>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.<o:p></o:p>< /span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Thanks,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Vineet<o:p></o:p></span></font></p>
</div>
</body>
</html>
-- Taroon-list mailing list Taroon-list@(protected) https://www.redhat.com/mailman/listinfo/taroon-list
|
|
 |