HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problems with unloading a dynamically loaded libra...
Operating System - HP-UX
1830624
Members
2375
Online
110015
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
03-09-2005 10:15 AM
03-09-2005 10:15 AM
I am writing a program on HP-UX 11.11 which does the following:
a) dynamically load the library, and get the various function pointers
b) invoke some of the functions
c) unload the library
Somehow i can run throught this once, but the second time the program coredumps. At the time of coredump, one of the functions in the dynamically loaded library got into a recursion loop and out-ran the program stack size.
Another developer who had experience with dynamic loading says that some unix do not like the unload part.
Furthermore, the unload would unload the whole library, no matter how many 'load' was done, or whether the library was loaded dynamically or not.
The program is written in C++ but calls into a C library by dynamically loading it.
For timebeing, i commented out the unload part, but that is not a permanent solution. Are there any issues like this known on HP-UX?
a) dynamically load the library, and get the various function pointers
b) invoke some of the functions
c) unload the library
Somehow i can run throught this once, but the second time the program coredumps. At the time of coredump, one of the functions in the dynamically loaded library got into a recursion loop and out-ran the program stack size.
Another developer who had experience with dynamic loading says that some unix do not like the unload part.
Furthermore, the unload would unload the whole library, no matter how many 'load' was done, or whether the library was loaded dynamically or not.
The program is written in C++ but calls into a C library by dynamically loading it.
For timebeing, i commented out the unload part, but that is not a permanent solution. Are there any issues like this known on HP-UX?
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2005 08:29 PM
03-09-2005 08:29 PM
Solution
Are you using dlopen/dlclose or shl_load/shl_unload?
Are you compiling 32-bit or 64-bit?
The same shared library can be opened multiple times.
On PA32, shl_unload unloads the shared library regardless of whether there are other references to it through other load invocations or through implicit references from other shared libraries. No reference count is kept.
On PA64, a reference counter is kept for each loaded shared library, like the behavior of dlopen(3c) and dlclose(3c). shl_unload does not remove the shared library from the address space until all references to that shared library have been removed.
Are you compiling 32-bit or 64-bit?
The same shared library can be opened multiple times.
On PA32, shl_unload unloads the shared library regardless of whether there are other references to it through other load invocations or through implicit references from other shared libraries. No reference count is kept.
On PA64, a reference counter is kept for each loaded shared library, like the behavior of dlopen(3c) and dlclose(3c). shl_unload does not remove the shared library from the address space until all references to that shared library have been removed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2005 08:08 AM
03-10-2005 08:08 AM
Re: Problems with unloading a dynamically loaded library
It looks like this 32-bit behaviour is the reason for our issue. We have avoided the unloading and the program works fine now.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP