<?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: Dynamic loading of DCE-RPC client library problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030476#M542904</link>
    <description>Yes, this would be a solution, but then I have to maintain special versions of libdcekt and distribute it to customers.  &lt;BR /&gt;Because I found no equal problem report like I had in web, I assume that loading libdcekt-bounded modules dynamically is not common, but to make live easier HP should take out this atexit registration and perform clanup-tasks by recogizing the unload like you described.</description>
    <pubDate>Fri, 02 Mar 2007 02:24:30 GMT</pubDate>
    <dc:creator>Grischa</dc:creator>
    <dc:date>2007-03-02T02:24:30Z</dc:date>
    <item>
      <title>Dynamic loading of DCE-RPC client library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030468#M542896</link>
      <description>Hello all,&lt;BR /&gt;I have problems performing dynamic loading of a DCE-RPC client-library on hp-ux 11.11 and 11.23, using dlopen/dlcolse functions. If the library is unloaded by dlclose, an error creating a core-dump occurs at program exit. &lt;BR /&gt;Problem seems that rpc-client-library must be linked to thread library libdcekt.so, and this seems to be not 100% compatibel to other program modules which are not linked to libdcekt.so, or which are linked just to libpthread.so. &lt;BR /&gt;If the rpc-client-library is not unloaded, or if the loading modules are also linked to libdcekt.so, no error occurs.&lt;BR /&gt;Please see attached file for more information got from core file and used compile/linker flags.&lt;BR /&gt;Thank you.</description>
      <pubDate>Mon, 26 Feb 2007 05:14:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030468#M542896</guid>
      <dc:creator>Grischa</dc:creator>
      <dc:date>2007-02-26T05:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading of DCE-RPC client library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030469#M542897</link>
      <description>core file information and used compile/linker flags:&lt;BR /&gt;&lt;BR /&gt;hp-ux 11.23 error message:&lt;BR /&gt;&lt;BR /&gt;plabel copyin failed. 0x200000007ef6e160&lt;BR /&gt;Pid 7934 was killed due to failure in writing the signal context - possible stack overflow.&lt;BR /&gt;&lt;BR /&gt;hp-ux 11.23 core information:&lt;BR /&gt;&lt;BR /&gt;Program terminated with signal 4, Illegal instruction.&lt;BR /&gt;ILL_ILLOPC - Illegal Op-Code&lt;BR /&gt;#0  0x60000000c0877040:0 in __cxa_finalize+0x280 ()&lt;BR /&gt;   from /usr/lib/hpux32/libCsup.so.1&lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0  0x60000000c0877040:0 in __cxa_finalize+0x280 ()&lt;BR /&gt;   from /usr/lib/hpux32/libCsup.so.1&lt;BR /&gt;#1  0x60000000c0876d70:0 in __cxxTerm_body()+0x30 ()&lt;BR /&gt;   from /usr/lib/hpux32/libCsup.so.1&lt;BR /&gt;#2  0x60000000c0876c40:0 in __cxxTerm+0x20 () from /usr/lib/hpux32/libCsup.so.1&lt;BR /&gt;#3  0x60000000c01ef840:0 in __exit_handler+0xa0 ()&lt;BR /&gt;   from /usr/lib/hpux32/libc.so.1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hp-ux 11.23 compile and link flags of rpc-client library:&lt;BR /&gt;&lt;BR /&gt;aCC ... -D_REENTRANT -mt -D_HPUX_SOURCE +z -b -ldcekt &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hp-ux 11.23 compile and link flags of loading executable:&lt;BR /&gt;&lt;BR /&gt;aCC ... -mt -D_REENTRANT -D_HPUX_SOURCE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hp-ux 11.11 error message:&lt;BR /&gt;&lt;BR /&gt;Pid 8040 was killed due to failure in writing the signal context.&lt;BR /&gt;./rundyn.sh: line 1:  8040 Illegal instruction     (core dumped)&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;hp-ux 11.11 core information:&lt;BR /&gt;&lt;BR /&gt;Program terminated with signal 4, Illegal instruction.&lt;BR /&gt;ILL_UNKNOWN - Unknown Error&lt;BR /&gt;(no debugging symbols found)...(no debugging symbols found)...#0  0xc0137b30 in $$dyncall_external+0 () from /usr/lib/libc.2&lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0  0xc0137b30 in $$dyncall_external+0 () from /usr/lib/libc.2&lt;BR /&gt;#1  0xc01849ec in exit+0x74 () from /usr/lib/libc.2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hp-ux 11.11 compile and link flags of rpc-client library:&lt;BR /&gt;&lt;BR /&gt;gcc ... -D_POSIX_D10_THREADS -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -D_THREAD_SAFE -fPIC -ldcekt -lpthread&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hp-ux 11.11 compile and link flags of loading executable:&lt;BR /&gt;&lt;BR /&gt;gcc ... -D_POSIX_D10_THREADS -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -D_THREAD_SAFE -lpthread -lstdc++&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Feb 2007 06:08:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030469#M542897</guid>
      <dc:creator>Grischa</dc:creator>
      <dc:date>2007-02-26T06:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading of DCE-RPC client library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030470#M542898</link>
      <description>Attached you will find some test app for hpux 11.23.</description>
      <pubDate>Mon, 26 Feb 2007 10:29:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030470#M542898</guid>
      <dc:creator>Grischa</dc:creator>
      <dc:date>2007-02-26T10:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading of DCE-RPC client library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030471#M542899</link>
      <description>&amp;gt;Problem seems that rpc-client-library must be linked to thread library libdcekt.so, and this seems to be not 100% compatible to other program modules which are not linked to libdcekt.so&lt;BR /&gt;&lt;BR /&gt;(Note a corefile is useless without copies of ALL shared libs.  You should look at gdb's packcore command to capture this.)&lt;BR /&gt;&lt;BR /&gt;When your application aborts, info shared shows that the address in question is in your unloaded libdcekt.so, called from the aC++ runtime to handle dtors and atexit.&lt;BR /&gt;&lt;BR /&gt;Yes, libdcekt.so calls atexit.  This calls the libCsup version.  I thought this would be an issue but it turns out it isn't.  libCsup has this same issue but it tells dld to never unload itself.&lt;BR /&gt;&lt;BR /&gt;So you either need to get libdcekt.so "fixed", or you must link your application and not your plugin with libdcekt.so so it is never unloaded.&lt;BR /&gt;aCC ... -o main ... -ldcekt&lt;BR /&gt;&lt;BR /&gt;Breakpoint 1, 0x2000000076dcadc0:0 in __cxa_atexit+0x30 libCsup.so.1&lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0  0x2000000076dcadc0:0 in __cxa_atexit+0x30 libCsup.so.1&lt;BR /&gt;#1  0x2000000076dcad30:0 in atexit+0x30 libCsup.so.1&lt;BR /&gt;#2  0x20000000760bc7c0:0 in init_once+0x1570 libdcekt.so.1&lt;BR /&gt;#3  0x2000000076d1b5e0:0 in pthread_once+0x350 libpthread.so.1&lt;BR /&gt;#4  0x20000000763943a0:0 in ptdexc_once+0x50 libdcekt.so.1&lt;BR /&gt;#5  0x20000000760bb230:0 in rpc__init+0x150  libdcekt.so.1&lt;BR /&gt;#6  0x20000000760a9e80:0 in rpc_string_binding_compose+0x70 /usr/lib/hpux32/libdcekt.so.1&lt;BR /&gt;&lt;BR /&gt;info shared, after abort:&lt;BR /&gt;./librpcclient.so  (shared library unloaded)&lt;BR /&gt; 0x200000007688d000 0x200000007688dea0 0x200000007688c000 0x200000007688c0e0&lt;BR /&gt;/usr/lib/hpux32/libdcekt.so.1  (shared library unloaded)&lt;BR /&gt; 0x2000000075f26000 0x2000000076885020 0x2000000075eb0000 0x2000000075f17338&lt;BR /&gt;&lt;BR /&gt;(gdb) disas $pc-16*1 $pc+16*1&lt;BR /&gt;Dump of assembler code from 0x2000000076dc4f60:0 to 0x2000000076dc4f80:0:&lt;BR /&gt;0x2000000076dc4f60:0:   (p1)  ld8.s            r8=[r9]&lt;BR /&gt;(gdb) p /x $r9&lt;BR /&gt;$1 = 0x2000000075ede1d8&lt;BR /&gt;&lt;BR /&gt;If this answers your question you should see:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;</description>
      <pubDate>Tue, 27 Feb 2007 06:14:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030471#M542899</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-27T06:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading of DCE-RPC client library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030472#M542900</link>
      <description>Thank you for you detailed answer. &lt;BR /&gt;HP-Support supposed to use linker flag -B nodelete to avoid that libdcekt is unloaded and the function registered in atexit becomes invalid. This is the solution for me, bacause I cannot force each module linking the rpc-client-library dynamically to link to libdcekt.</description>
      <pubDate>Wed, 28 Feb 2007 04:11:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030472#M542900</guid>
      <dc:creator>Grischa</dc:creator>
      <dc:date>2007-02-28T04:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading of DCE-RPC client library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030473#M542901</link>
      <description>&amp;gt;HP-Support supposed to use linker flag -B nodelete&lt;BR /&gt;&lt;BR /&gt;Yes, that option was added for libCsup.</description>
      <pubDate>Wed, 28 Feb 2007 04:28:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030473#M542901</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-28T04:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading of DCE-RPC client library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030474#M542902</link>
      <description>Thank you again for help. I close this thread now.</description>
      <pubDate>Wed, 28 Feb 2007 04:40:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030474#M542902</guid>
      <dc:creator>Grischa</dc:creator>
      <dc:date>2007-02-28T04:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading of DCE-RPC client library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030475#M542903</link>
      <description>Of course if you have access to the source to libdcekt, you should probably remove the call to atexit and change it to have a fini function.  That function can look at a flag to see if that pthread_once was done, then do what atexit would have done.&lt;BR /&gt;&lt;BR /&gt;That way it gets done when the lib is unloaded and at exit time.  The only issue I see is that the ordering may not be in the strict atexit order.</description>
      <pubDate>Thu, 01 Mar 2007 18:54:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030475#M542903</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-03-01T18:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic loading of DCE-RPC client library problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030476#M542904</link>
      <description>Yes, this would be a solution, but then I have to maintain special versions of libdcekt and distribute it to customers.  &lt;BR /&gt;Because I found no equal problem report like I had in web, I assume that loading libdcekt-bounded modules dynamically is not common, but to make live easier HP should take out this atexit registration and perform clanup-tasks by recogizing the unload like you described.</description>
      <pubDate>Fri, 02 Mar 2007 02:24:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dynamic-loading-of-dce-rpc-client-library-problem/m-p/5030476#M542904</guid>
      <dc:creator>Grischa</dc:creator>
      <dc:date>2007-03-02T02:24:30Z</dc:date>
    </item>
  </channel>
</rss>

