Operating System - HP-UX
1828038 Members
2164 Online
109973 Solutions
New Discussion

/usr/lib/dld.sl: Exec format error

 
Al Langen_1
Advisor

/usr/lib/dld.sl: Exec format error

I have two HPUX 11.00 systems loaded with the same java version. On one system, my program connects and executes without error; on the other, I get this program when it starts up:

/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /opt/java1.3/jre/lib/PA_RISC/hotspot/libjvm.sl
/usr/lib/dld.sl: Exec format error

What is the meaning of the "Exec format error"? Do I have a wrong library somewhere?
7 REPLIES 7
Rajeev  Shukla
Honored Contributor

Re: /usr/lib/dld.sl: Exec format error

You'r program needs to be recompiled on the machine on which you run. It could be the case that the program was compiled on first node and you copied the same program to another node.
Suggested, re-compile and give it a go
Adisuria Wangsadinata_1
Honored Contributor

Re: /usr/lib/dld.sl: Exec format error

Hi there,

The HP documentation requires that the JNI (Java Native Interface) layer be linked with libjvm.sl. However, this causes the following error when performing the shl_load on the C shared library:

/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /opt/java1.3/jre/lib/PA_RISC/hotspot/libjvm.sl
/usr/lib/dld.sl: Exec format error

Did you already patch your system with recomended patch(es) ? Please goto this url below for those information :

http://www.hp.com/products1/unix/java/patches/index.html

Hope this information can help you.

Best Regards,
AW


now working, next not working ... that's unix
yogiraj
Advisor

Re: /usr/lib/dld.sl: Exec format error

Hi,
$man shl_load : .............
Use caution when building shared libraries with external library
dependencies. Any library that contains Thread Local Storage (TLS)
should not be used as a dependency. If a dependent library contains
TLS, and it is not loaded during program startup (that is, not linked
against the executable), the dynamic loader fails to perform the
operation.
..................

Hope it is not a usual case fitting above desc.
You can try using LD_PRELOAD with fully qualified path.

regds
Yogi
patilyogi
T G Manikandan
Honored Contributor

Re: /usr/lib/dld.sl: Exec format error

Probably the file is corrupted,check for the sizes.

ranganath ramachandra
Esteemed Contributor

Re: /usr/lib/dld.sl: Exec format error

install PHSS_28869.
export LD_PRELOAD_ONCE=/ opt/java1.3/jre/lib/PA_RISC/hotspot/libjvm.sl in the shell that runs your program.
also check if the env in the 'good' system has LD_PRELOAD or LD_PRELOAD_ONCE set.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Al Langen_1
Advisor

Re: /usr/lib/dld.sl: Exec format error

First of all, I want to thank everybody for their answers.

This is an application distributed to many customers and only one of them is complaining. I consider it fortunate that I found a test server where it fails as well.

We already us LD_PRELOAD in the script that starts java. It appears to be more related to the patch.

I will let you know shortly.

Al Langen_1
Advisor

Re: /usr/lib/dld.sl: Exec format error

I want to apologize to all who have supplied answers to this question. However, the customer's System Administrator "...did a little further investigation and put on (what he called) an obscure patch. This patch was not on the standard patch bundle from HP." I am still trying to get the patch number from him because I have another customer with the same problem.

We have had success with LD_PRELOAD with users who log in with the Korn shell and maybe this will work as well. I will let you guys know and assign points when I know more.

Thank-you for your efforts.

Al