Operating System - HP-UX
1752587 Members
3882 Online
108788 Solutions
New Discussion юеВ

Re: Can't open shared library

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: Can't open shared library

>It gives out a huge file which i cannot paste here.

Have you tried gzip on it?

>Can you please tell me what parts of the file I need to paste.

Basically only the process with the error. And only the parts where the error occurs and enough history to see what's going on.
bivian
Advisor

Re: Can't open shared library

Thanks.
I did not realize that we can attach files. I have zipped and attached the output file.

Btw, please ignore the error messages that i mentioned above...The following is the error logged in error logs of application:

Could not load library '/home/prash/newdb/lib32/libnmcfsga.sl' for reason 'Can't open shared library: libnmemso.sl'


Dennis Handly
Acclaimed Contributor

Re: Can't open shared library

>The following is the error logged in error logs of application:
>Could not load library '/home/prash/newdb/lib32/libnmcfsga.sl' for reason 'Can't open shared library: libnmemso.sl'

I see that several times. libnmemso.sl must be a dependent shlib with no particular path??

Please provide the output of "chatr /home/prash/newdb/lib32/libnmcfsga.sl".

The processes 28914, 28929, 28954 & 28958 are using libjvm.sl. Which dlopens(?) /home/prash/newdb/lib32//libnmemso.sl.

Is this the one you want?
Also, it would be helpful if you also included the exec system call:
-s open,read,close,mmap,munmap,stat,fstat,exec
bivian
Advisor

Re: Can't open shared library

Chatr output of libnmcfsga.sl:
libnmcfsga.sl:
shared library
shared library dynamic path search:
SHLIB_PATH enabled first
embedded path disabled second Not Defined
shared library list:
dynamic libnmemso.sl
dynamic libjava.sl
dynamic libjvm.sl
dynamic /usr/lib/libcl.2
dynamic /usr/lib/librt.2
dynamic /usr/lib/libpthread.1
dynamic /usr/lib/libnss_dns.1
dynamic /usr/lib/libdld.2
dynamic /usr/lib/libnsl.1
dynamic /usr/lib/libm.2
shared vtable support disabled
explicit unloading enabled
runtime checks disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
shared library private mapping disabled


Yes, libnmemso.so belongs to the directory /home/prash/newdb/lib32/. This is the one that is not loading.

Please see the attached tusc1.out which contains exec system call also.

Dennis Handly
Acclaimed Contributor

Re: Can't open shared library

>SHLIB_PATH enabled first
>shared library list: dynamic libnmemso.sl

This says that if SHLIB_PATH contains m/home/prash/newdb/lib32, it should work.

What is the tusc command you are using? Why do we see other processes besides 25326, emagent? Can we start tusc on emagent and not attach after it starts?
Is emagent a SETUID process?
Why does 25326 keep going after the error? (We only need to see the error once.)
Is SHLIB_PATH before emagent starts?

>tusc1.out which contains exec system call also.

Please also include fork & exit.

bivian
Advisor

Re: Can't open shared library

I was using the command - tusc -s open,read,close,mmap,munmap,stat,fstat,exec -ea -o tusc.out" on the process id.

No, it is not SETUID process.

I have use the following command now:
tusc -fp -ea -o tusc.out
Please see the uploaded output in tusc2.out.
Horia Chirculescu
Honored Contributor

Re: Can't open shared library

Hello,

stat("/usr/lib/libnmemso.sl", 0x778410d0) ........ ERR#2 ENOENT


You could make a soft link of the library in the /usr/lib directory

ln -sf /home/prash/newdb/lib32/libnmemso.sl /usr/lib/libnmemso.sl


Or... maybe you have some problem with SHLIB_PATHS ? (the path to the libnmemso.sl library is listed three times, should be only one).

SHLIB_PATH=/home/prash/newdb/jdk/jre/lib/PA_RISC2.0/hotspot:/home/prash/newdb/jdk/jre/lib/PA_RISC2.0:/home/prash/newdb/lib32:/home/prash/newdb/network/lib32:/home/prash/newdb/perl/lib:/home/prash/newdb/lib32:/home/prash/newdb/oui/lib/HP-UX:/home/prash/newdb/lib32

Horia.
Best regards from Romania,
Horia.
Dennis Handly
Acclaimed Contributor

Re: Can't open shared library

>Please see the uploaded output in tusc2.out.

Unless you can get your /home/prash/newdb/bin/emagent process to print out its SHLIB_PATH, we can only assume it doesn't have /home/prash/newdb/lib32?

Note: SHLIB_PATH must be set before emagent starts, not just before the dlopen/shl_load.

What linker/dld patches do you have?
bivian
Advisor

Re: Can't open shared library

I will investigate whether the SHLIB_PATH is being set or not.

The linker patch i am using is phss_39821.
Dennis Handly
Acclaimed Contributor

Re: Can't open shared library

>The linker patch I am using is PHSS_39821.

That is the recommended patch, there is a later one: PHSS_40537