The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
.
google unix.com



HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
shared library on QNX ReeV UNIX for Advanced & Expert Users 1 05-06-2009 05:30 AM
Shared memory for shared library otheus High Level Programming 0 09-03-2008 03:55 AM
Shared memory in shared library DreamWarrior High Level Programming 12 05-30-2007 04:33 PM
shared library areef4u UNIX for Advanced & Expert Users 1 08-01-2006 02:14 AM
Shared Library rajashekaran High Level Programming 2 08-03-2002 01:59 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-07-2009
sambarusty sambarusty is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 3
Shared Library Issue HP UX

I have never seen this issue before, but here is what is happening. I link an executable against two dynamic mlib libraries veclib and lapack. We place a newer version of these libraries in a write only directory and point the shlib_path at that directory. When the executable runs, it gets a page I/O modification error. The odd thing is we tracked it down to the executable modifying the two shared libraries. If the directory is writable the executable succeeds and the modification times on the shared libraries change. I don't have any idea why an executable would do anything to change a shared library at runtime or fail when it can't. Does anyone have any idea why this would occur. Is it that it is not the same library linked against. I didn't think this mattered for shared libraries as long as the calling convention is the same. So I am looking to try and figure out what weird behind the scenes thing is going on here. Thanks for any insight.
  #2 (permalink)  
Old 08-07-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
I would question what odd thing dld has been asked to do.... it sounds like running code is attempting to write read-only memory.

what does the output of ldd show for one of the libraries?
  #3 (permalink)  
Old 08-08-2009
sambarusty sambarusty is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 3
not ldd

I have already done an ldd and chatr, it depends on the libraries, the code hasn't changed in a long time, just a different setup it is being linked in. So are there any other thoughts out there?

---------- Post updated 08-08-09 at 08:11 AM ---------- Previous update was 08-07-09 at 07:06 PM ----------

Just wanted to see if anyone new out there had any thoughts on this issue.
  #4 (permalink)  
Old 08-11-2009
sambarusty sambarusty is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 3
More information

I have tracked this issue to being something about memory locking over NFS. As soon as the process goes to mlockall, we update the modification time on the shared library. And if the shared library is read only, we get a Page I/O modification error. If I put the libraries local to the machine, it doesn't happen. So it seems to be some sort of NFS conflict. Has anyone seen this type of thing before?

---------- Post updated at 05:51 PM ---------- Previous update was at 06:35 AM ----------

found I was able to reproduce the symptom with just a hello world type of app.
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>

void main()
{
mlockall(CTL_CURRENT)
printf("hello world\n");
}

linked by the following
cc hello_world.c -o hello_world -L/opt/mlib/lib/pa2.0 -lveclib -llapack -Wl,s+

our home directories are NFS mounted so if I copy pa2.0 to /home/mine/pa2.0 and check the timestamp then
change my SHLIB_PATH EV to point to /home/mine/pa2.0
the timestamps change from the original copy after I run hello_world.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0