<?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: Threaded local storage ? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611685#M104396</link>
    <description>Leif &lt;BR /&gt;&lt;BR /&gt;from HP doc Part Number: B2355-90730 &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-90730/B2355-90730.html" target="_blank"&gt;http://docs.hp.com/en/B2355-90730/B2355-90730.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Use caution when building shared libraries with external library dependencies. Any library that contains Thread Local Storage (TLS) should not be used as a dependency. If a dependent library contains TLS, and it is loaded during program startup (that is, not linked against the executable), the dynamic loader fails to perform the operation&lt;BR /&gt;&lt;BR /&gt;You can use the LD_PRELOAD environment variable to load a shared library that contains thread-local storage to avoid the following error when loading the library dynamically: &lt;BR /&gt;&lt;BR /&gt; /usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libpthread.1&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Jean-Luc</description>
    <pubDate>Thu, 25 Aug 2005 07:27:05 GMT</pubDate>
    <dc:creator>Jean-Luc Oudart</dc:creator>
    <dc:date>2005-08-25T07:27:05Z</dc:date>
    <item>
      <title>Threaded local storage ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611682#M104393</link>
      <description>&lt;BR /&gt;Hi,&lt;BR /&gt;One of our customers got a problem with an application, the error message (part of it) is below:&lt;BR /&gt;/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /u10/test/testcomn/util/jre/1.1.8/bin/../lib/PA_RISC/native_threads/libjava.sl&lt;BR /&gt;&lt;BR /&gt;From an Oracle metalink document I found that it is a known problem, "HP-UX do not allow dynamic loading of shared librarys which uses threaded local storage".&lt;BR /&gt;&lt;BR /&gt;As I understand, this behaviour is made intentionally by HP. Is HP-UX different from other Unix here ?&lt;BR /&gt;&lt;BR /&gt;Is there anyone who know more about this ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Aug 2005 06:59:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611682#M104393</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2005-08-25T06:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Threaded local storage ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611683#M104394</link>
      <description>Leif,&lt;BR /&gt;I read something similar in a past posted forum:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=929331" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=929331&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I found this answer to this argument:&lt;BR /&gt;The problem is that any shared library that contains Thread Local Storage (TLS) cannot be used as a dependency of another shared library. There are at least two ways around this problem. First, you can link each incomplete executable against each of the dependent library that use TLS. Second, you can use the LD_PRELOAD environment variable to load the dependent shared libraries at startup. You can specify multiple shared libraries by separating each library name with a colon. You can specify the full path the the library, or leave the path off the library name to cause the loader to use the standard search path.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Check this link:&lt;BR /&gt;&lt;A href="http://web.gat.com/comp/analysis/mdsplus/textfilebusy.html" target="_blank"&gt;http://web.gat.com/comp/analysis/mdsplus/textfilebusy.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this could be a minimal help,&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Alessandro</description>
      <pubDate>Thu, 25 Aug 2005 07:16:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611683#M104394</guid>
      <dc:creator>Alessandro Pilati</dc:creator>
      <dc:date>2005-08-25T07:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Threaded local storage ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611684#M104395</link>
      <description>Is this the Oracle Application Server? If so, what version? Oracle has some workarounds for this issue at metalink.oracle.com&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 25 Aug 2005 07:17:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611684#M104395</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-08-25T07:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Threaded local storage ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611685#M104396</link>
      <description>Leif &lt;BR /&gt;&lt;BR /&gt;from HP doc Part Number: B2355-90730 &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-90730/B2355-90730.html" target="_blank"&gt;http://docs.hp.com/en/B2355-90730/B2355-90730.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Use caution when building shared libraries with external library dependencies. Any library that contains Thread Local Storage (TLS) should not be used as a dependency. If a dependent library contains TLS, and it is loaded during program startup (that is, not linked against the executable), the dynamic loader fails to perform the operation&lt;BR /&gt;&lt;BR /&gt;You can use the LD_PRELOAD environment variable to load a shared library that contains thread-local storage to avoid the following error when loading the library dynamically: &lt;BR /&gt;&lt;BR /&gt; /usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libpthread.1&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Thu, 25 Aug 2005 07:27:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611685#M104396</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2005-08-25T07:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Threaded local storage ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611686#M104397</link>
      <description>This is a quite common problem that pops up in one form or the other, but the basic problem is  with libraries that contain thread local storage (TLS): libpthread and libcl.&lt;BR /&gt;&lt;BR /&gt;Normally, shared libraries are linked directly with a program. Sometimes programmers decide that instead of linking a library directly to a program, they load a library when it's needed (with shl_load()) and unload it when it's no longer needed (shl_unload()).&lt;BR /&gt;&lt;BR /&gt;In this case, library that is shl_loaded is libjava.sl. libjava.sl is linked with libpthread and/or libcl. libpthread and libcl are libraries that contain TLS.&lt;BR /&gt;&lt;BR /&gt;Check with ldd&lt;BR /&gt;&lt;BR /&gt;$ ldd /u10/test/testcomn/util/jre/1.1.8/bin/../lib/PA_RISC/native_threads/libjava.sl&lt;BR /&gt;&lt;BR /&gt;The solution is to use environment variable LD_PRELOAD to load libraries in question (libjava.sl). The effect of using LD_PRELOADing the library is almost the same as linking it directly to the program.&lt;BR /&gt;&lt;BR /&gt;$ LD_PRELOAD=/u10/test/testcomn/util/jre/1.1.8/bin/../lib/PA_RISC/native_threads/libjava.sl &lt;YOUR_APPLICATION&gt;&lt;/YOUR_APPLICATION&gt;</description>
      <pubDate>Thu, 25 Aug 2005 07:31:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611686#M104397</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-08-25T07:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Threaded local storage ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611687#M104398</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Steven,&lt;BR /&gt;Yes, it is an Oracle application server but I am not sure about the version (I have not been in contact with the customer before). The only thing I know is that it is not the latest version and the customer is very negative to upgrading.&lt;BR /&gt;&lt;BR /&gt;To All,&lt;BR /&gt;&lt;BR /&gt;After some consulting we have decided that the problem is not ours, It should be solved by the Application developer. Many thanks for the hint about "LD_PRELOAD" , I will forward it.</description>
      <pubDate>Thu, 25 Aug 2005 07:58:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/threaded-local-storage/m-p/3611687#M104398</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2005-08-25T07:58:11Z</dc:date>
    </item>
  </channel>
</rss>

