- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Dynamic loading of DCE-RPC client library problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2007 09:14 PM
02-25-2007 09:14 PM
Dynamic loading of DCE-RPC client library problem
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.
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.
If the rpc-client-library is not unloaded, or if the loading modules are also linked to libdcekt.so, no error occurs.
Please see attached file for more information got from core file and used compile/linker flags.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2007 10:08 PM
02-25-2007 10:08 PM
Re: Dynamic loading of DCE-RPC client library problem
hp-ux 11.23 error message:
plabel copyin failed. 0x200000007ef6e160
Pid 7934 was killed due to failure in writing the signal context - possible stack overflow.
hp-ux 11.23 core information:
Program terminated with signal 4, Illegal instruction.
ILL_ILLOPC - Illegal Op-Code
#0 0x60000000c0877040:0 in __cxa_finalize+0x280 ()
from /usr/lib/hpux32/libCsup.so.1
(gdb) bt
#0 0x60000000c0877040:0 in __cxa_finalize+0x280 ()
from /usr/lib/hpux32/libCsup.so.1
#1 0x60000000c0876d70:0 in __cxxTerm_body()+0x30 ()
from /usr/lib/hpux32/libCsup.so.1
#2 0x60000000c0876c40:0 in __cxxTerm+0x20 () from /usr/lib/hpux32/libCsup.so.1
#3 0x60000000c01ef840:0 in __exit_handler+0xa0 ()
from /usr/lib/hpux32/libc.so.1
hp-ux 11.23 compile and link flags of rpc-client library:
aCC ... -D_REENTRANT -mt -D_HPUX_SOURCE +z -b -ldcekt
hp-ux 11.23 compile and link flags of loading executable:
aCC ... -mt -D_REENTRANT -D_HPUX_SOURCE
hp-ux 11.11 error message:
Pid 8040 was killed due to failure in writing the signal context.
./rundyn.sh: line 1: 8040 Illegal instruction (core dumped)
hp-ux 11.11 core information:
Program terminated with signal 4, Illegal instruction.
ILL_UNKNOWN - Unknown Error
(no debugging symbols found)...(no debugging symbols found)...#0 0xc0137b30 in $$dyncall_external+0 () from /usr/lib/libc.2
(gdb) bt
#0 0xc0137b30 in $$dyncall_external+0 () from /usr/lib/libc.2
#1 0xc01849ec in exit+0x74 () from /usr/lib/libc.2
hp-ux 11.11 compile and link flags of rpc-client library:
gcc ... -D_POSIX_D10_THREADS -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -D_THREAD_SAFE -fPIC -ldcekt -lpthread
hp-ux 11.11 compile and link flags of loading executable:
gcc ... -D_POSIX_D10_THREADS -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -D_THREAD_SAFE -lpthread -lstdc++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2007 02:29 AM
02-26-2007 02:29 AM
Re: Dynamic loading of DCE-RPC client library problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2007 10:14 PM
02-26-2007 10:14 PM
Re: Dynamic loading of DCE-RPC client library problem
(Note a corefile is useless without copies of ALL shared libs. You should look at gdb's packcore command to capture this.)
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.
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.
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.
aCC ... -o main ... -ldcekt
Breakpoint 1, 0x2000000076dcadc0:0 in __cxa_atexit+0x30 libCsup.so.1
(gdb) bt
#0 0x2000000076dcadc0:0 in __cxa_atexit+0x30 libCsup.so.1
#1 0x2000000076dcad30:0 in atexit+0x30 libCsup.so.1
#2 0x20000000760bc7c0:0 in init_once+0x1570 libdcekt.so.1
#3 0x2000000076d1b5e0:0 in pthread_once+0x350 libpthread.so.1
#4 0x20000000763943a0:0 in ptdexc_once+0x50 libdcekt.so.1
#5 0x20000000760bb230:0 in rpc__init+0x150 libdcekt.so.1
#6 0x20000000760a9e80:0 in rpc_string_binding_compose+0x70 /usr/lib/hpux32/libdcekt.so.1
info shared, after abort:
./librpcclient.so (shared library unloaded)
0x200000007688d000 0x200000007688dea0 0x200000007688c000 0x200000007688c0e0
/usr/lib/hpux32/libdcekt.so.1 (shared library unloaded)
0x2000000075f26000 0x2000000076885020 0x2000000075eb0000 0x2000000075f17338
(gdb) disas $pc-16*1 $pc+16*1
Dump of assembler code from 0x2000000076dc4f60:0 to 0x2000000076dc4f80:0:
0x2000000076dc4f60:0: (p1) ld8.s r8=[r9]
(gdb) p /x $r9
$1 = 0x2000000075ede1d8
If this answers your question you should see:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2007 08:11 PM
02-27-2007 08:11 PM
Re: Dynamic loading of DCE-RPC client library problem
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2007 08:28 PM
02-27-2007 08:28 PM
Re: Dynamic loading of DCE-RPC client library problem
Yes, that option was added for libCsup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2007 08:40 PM
02-27-2007 08:40 PM
Re: Dynamic loading of DCE-RPC client library problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 10:54 AM
03-01-2007 10:54 AM
Re: Dynamic loading of DCE-RPC client library problem
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 06:24 PM
03-01-2007 06:24 PM
Re: Dynamic loading of DCE-RPC client library problem
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.