<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with -lpthread in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273070#M715674</link>
    <description>There is no -lc before -lpthread.&lt;BR /&gt;&lt;BR /&gt;For the C client the LDLIBS are:&lt;BR /&gt;-lstd -lstream -lCsup -lm -lcl -l: libdld.sl -lpthread&lt;BR /&gt;&lt;BR /&gt;The C++ client does not link to libc.sl ...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 25 May 2004 03:48:28 GMT</pubDate>
    <dc:creator>Madhuwati_1</dc:creator>
    <dc:date>2004-05-25T03:48:28Z</dc:date>
    <item>
      <title>Problem with -lpthread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273067#M715671</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I am facing a weird problem on HP 11.23 PI PA debug OS. A C client dumps core as follows:&lt;BR /&gt;&lt;BR /&gt;assertion failed: hdr.priv_valid == PRIVATE_VALID,&lt;BR /&gt;file: /ux/core/libs/threadslibs/src/common/pthreads/tls_supp.c, line: 108&lt;BR /&gt;Return Pointer is 0xc032691b&lt;BR /&gt;Process ID is 9491&lt;BR /&gt;Asserting Thread is 0x0&lt;BR /&gt;Segmentation fault (core dumped)&lt;BR /&gt;&lt;BR /&gt;What does this signify?&lt;BR /&gt;&lt;BR /&gt;On tracing through gdb the error is emitted when dlopen() is called. The C client is loading a shared C++ library.&lt;BR /&gt;&lt;BR /&gt;The o/p of trace thru gdb:&lt;BR /&gt;gdb) n&lt;BR /&gt;51              handle = (void *) dlopen(VX_REMOTEINFO_LIBNAME, RTLD_LAZY);&lt;BR /&gt;(gdb) s&lt;BR /&gt;assertion failed: hdr.priv_valid == PRIVATE_VALID, file:&lt;BR /&gt;/ux/core/libs/threadslibs/src/common/pthreads/tls_supp.c, line: 108&lt;BR /&gt;Return Pointer is 0x7ae9391b&lt;BR /&gt;Process ID is 13557&lt;BR /&gt;Asserting Thread is 0x0&lt;BR /&gt;&lt;BR /&gt;Program received signal SIGSEGV, Segmentation fault.&lt;BR /&gt;0x7ae77098 in __pth_vassert (a=0x7ae01420 "hdr.priv_valid == PRIVATE_VALID",&lt;BR /&gt;f=0x7ae01358 "/ux/core/libs/threadslibs/src/common/pthreads/tls_supp.c",&lt;BR /&gt;l=108, rp=0x7ae9391b "\3017\227", self=0x0,&lt;BR /&gt;lck_msg=0x0, real_rp=0x0) at&lt;BR /&gt;/ux/core/libs/threadslibs/src/common/pthreads/debug.c:559&lt;BR /&gt;559     /ux/core/libs/threadslibs/src/common/pthreads/debug.c: No such&lt;BR /&gt;file or directory.&lt;BR /&gt;&lt;BR /&gt;(gdb) where&lt;BR /&gt;#0  0xc030a098 in __pth_vassert (a=0xc0294420 "hdr.priv_valid == PRIVATE_VALID", f=0xc0294358&lt;BR /&gt;"/ux/core/libs/threadslibs/src/common/pthreads/tls_supp.c", l=108, rp=0xc032691b "\3017\227",&lt;BR /&gt;self=0x0, lck_msg=0x0, real_rp=0x0) at /ux/core/libs/threadslibs/src/common/pthreads/debug.c:559&lt;BR /&gt;#1  0xc032695c in __PTHREAD_SELF_D (real_self=0x7af8ac00, real_id=1)&lt;BR /&gt;at /ux/core/libs/threadslibs/src/common/pthreads/tls_supp.c:108&lt;BR /&gt;#2  0xc02cc8d0 in ENTER_PTHREAD_LIBRARY_FUNC () at /ux/core/libs/threadslibs/src/common/pthreads/pthread.c:8685&lt;BR /&gt;#3  0xc030f9ac in __pthread_dump_lib ( msg=0x7b022918 "assertion failed: hdr.priv_valid == PRIVATE_VALID, file:&lt;BR /&gt;/ux/core/libs/threadslibs/src/common/pthreads/tls_supp.c, line: 108\nReturn Pointer is 0xc032691b\nProcess ID is 9322\nAsserting Thread is 0x0\n",&lt;BR /&gt;self=0x0) from /usr/lib/libpthread.1&lt;BR /&gt;#4  0xc030a740 in __pth_vassert (a=0xc0294420 "hdr.priv_valid == PRIVATE_VALID", f=0xc0294358&lt;BR /&gt;"/ux/core/libs/threadslibs/src/common/pthreads/tls_supp.c", l=108, rp=0xc032691b "\3017\227", self=0x0, lck_msg=0x0, real_rp=0x0) at&lt;BR /&gt;/ux/core/libs/threadslibs/src/common/pthreads/debug.c:644&lt;BR /&gt;#5  0xc032695c in __PTHREAD_SELF_D (real_self=0x7af8ac00, real_id=1)&lt;BR /&gt;at /ux/core/libs/threadslibs/src/common/pthreads/tls_supp.c:108&lt;BR /&gt;#6  0xc02ef0a0 in __owns_NO_spinlock () at /ux/core/libs/threadslibs/src/common/pthreads/spin.c:913&lt;BR /&gt;#7  0xc02e2f6c in __pthread_mutex_lock (mutex=0x7b044398) at /ux/core/libs/threadslibs/src/common/pthreads/mutex.c:3906&lt;BR /&gt;#8  0xc0221ee0 in __thread_mutex_lock+0x70 () from /usr/lib/libc.2&lt;BR /&gt;#9  0xc01998c4 in real_malloc+0x94 () from /usr/lib/libc.2&lt;BR /&gt;#10 0xc019787c in _malloc+0x654 () from /usr/lib/libc.2&lt;BR /&gt;#11 0xc019d67c in malloc+0x18c () from /usr/lib/libc.2&lt;BR /&gt;#12 0xc04a5658 in operator new+0x40 () from /usr/lib/libCsup.2&lt;BR /&gt;#13 0xc2f7cb6c in __sinit_Args_C+0x5d4 () from /usr/lib/libvrascmd.sl&lt;BR /&gt;#14 0xc04a5550 in __shlInit+0x88 () from /usr/lib/libCsup.2&lt;BR /&gt;#15 0xc2f685c8 in _shlInit+0x20 () from /usr/lib/libvrascmd.sl&lt;BR /&gt;#16 0xc04a4e88 in __shlinit+0xac () from /usr/lib/libCsup.2&lt;BR /&gt;#17 0xc0030da0 in ?? ()&lt;BR /&gt;#18 0xc030a088 in __pth_vassert (a=0x4 "", f=0x7f7f0a34 "VFEN\177\177\n4", l=4, rp=0x7f7f0a34 "VFEN\177\177\n4", self=0x5646454e, lck_msg=0x384&lt;BR /&gt;&lt;ADDRESS 0x384="" out="" of="" bounds=""&gt;, real_rp=0x384 &lt;ADDRESS 0x384="" out="" of="" bounds=""&gt;) at /ux/core/libs/threadslibs/src/common/pthreads/debug.c:558&lt;BR /&gt;&lt;BR /&gt;Shared library links to:&lt;BR /&gt;dynamic   /usr/lib/libstd.2&lt;BR /&gt;dynamic   /usr/lib/libstream.2&lt;BR /&gt;dynamic   /usr/lib/libCsup.2&lt;BR /&gt;dynamic   /usr/lib/libm.2&lt;BR /&gt;dynamic   /usr/lib/libcl.2&lt;BR /&gt;dynamic   /usr/lib/libdld.2&lt;BR /&gt;dynamic   /usr/lib/libpthread.1&lt;BR /&gt;&lt;BR /&gt;C client links to:&lt;BR /&gt;dynamic   /usr/lib/libstd.2&lt;BR /&gt;dynamic   /usr/lib/libstream.2&lt;BR /&gt;dynamic   /usr/lib/libCsup.2&lt;BR /&gt;dynamic   /usr/lib/libm.2&lt;BR /&gt;dynamic   /usr/lib/libcl.2&lt;BR /&gt;dynamic   /usr/lib/libdld.2&lt;BR /&gt;dynamic   /usr/lib/libpthread.1&lt;BR /&gt;dynamic   /usr/lib/libc.2&lt;BR /&gt;&lt;BR /&gt;By trial and error I found a workaround for this as to remove -lpthread from the C client. &lt;BR /&gt;But this does not seem like a clean solution. Has anyone come across such a problem? What is the reason for the coredump and what would be a correct solution for the same ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;- Madhu&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/ADDRESS&gt;&lt;/ADDRESS&gt;</description>
      <pubDate>Tue, 11 May 2004 07:14:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273067#M715671</guid>
      <dc:creator>Madhuwati</dc:creator>
      <dc:date>2004-05-11T07:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with -lpthread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273068#M715672</link>
      <description>Don't put -lc ahead of -lpthread on the link line.&lt;BR /&gt;    (Also, when you use -mt option, aCC takes care of automatically adding  the -lpthread at the right place).&lt;BR /&gt;&lt;BR /&gt;HP-UX 11.23 only.</description>
      <pubDate>Tue, 25 May 2004 03:16:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273068#M715672</guid>
      <dc:creator>kim_43</dc:creator>
      <dc:date>2004-05-25T03:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with -lpthread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273069#M715673</link>
      <description>pls remove -lc from the makefile and try it.&lt;BR /&gt;Maybe it works...</description>
      <pubDate>Tue, 25 May 2004 03:19:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273069#M715673</guid>
      <dc:creator>kim_43</dc:creator>
      <dc:date>2004-05-25T03:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with -lpthread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273070#M715674</link>
      <description>There is no -lc before -lpthread.&lt;BR /&gt;&lt;BR /&gt;For the C client the LDLIBS are:&lt;BR /&gt;-lstd -lstream -lCsup -lm -lcl -l: libdld.sl -lpthread&lt;BR /&gt;&lt;BR /&gt;The C++ client does not link to libc.sl ...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 May 2004 03:48:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273070#M715674</guid>
      <dc:creator>Madhuwati_1</dc:creator>
      <dc:date>2004-05-25T03:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with -lpthread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273071#M715675</link>
      <description>Have you used -mt option?&lt;BR /&gt;&lt;BR /&gt;If you not use -mt option, compiler use libc automatically.&lt;BR /&gt;this causes several SIGBUS.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Jun 2004 04:07:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273071#M715675</guid>
      <dc:creator>kim_43</dc:creator>
      <dc:date>2004-06-01T04:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with -lpthread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273072#M715676</link>
      <description>Hello, &lt;BR /&gt;&lt;BR /&gt;Which IC version you are using ? &lt;BR /&gt;&lt;BR /&gt;Arun</description>
      <pubDate>Thu, 03 Jun 2004 05:04:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273072#M715676</guid>
      <dc:creator>Arunvijai.S</dc:creator>
      <dc:date>2004-06-03T05:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with -lpthread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273073#M715677</link>
      <description>I tried using IC versions ... 11.23-i80_LR and 11.23-ic71l,VM</description>
      <pubDate>Thu, 03 Jun 2004 05:20:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273073#M715677</guid>
      <dc:creator>Madhu_14</dc:creator>
      <dc:date>2004-06-03T05:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with -lpthread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273074#M715678</link>
      <description>You can get this error only if there is a memory corruption. Error mesg means that the TLS list is corrupted and has been accidently overwritten by the applcation. Please check your application to see for the overflows or memory corruption.</description>
      <pubDate>Thu, 03 Jun 2004 05:51:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-with-lpthread/m-p/3273074#M715678</guid>
      <dc:creator>Manish_21</dc:creator>
      <dc:date>2004-06-03T05:51:35Z</dc:date>
    </item>
  </channel>
</rss>

