Operating System - HP-UX
1834228 Members
2588 Online
110066 Solutions
New Discussion

Re: testing HPUX 11.0 on HPUX 11.11 dynamic librayr loading problem

 
Laurent Laperrousaz
Regular Advisor

testing HPUX 11.0 on HPUX 11.11 dynamic librayr loading problem

Hi everybody,

I am currently testing an application generated on a HPUX 11.0 system on a new HPUX 11.11 system.
We intend to use the binaries directly without any recompiling.
It globally works but sometimes starting a process cores while trying to dynamically load a .sl module.
It happens erratically and this is the core dump we get:

Program terminated with signal 10, Bus error.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.

(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
0xb2374 in $$dyncall_external_20+0 ()
(gdb) bt
#0 0xb2374 in $$dyncall_external_20+0 ()
#1 0x1d1a74 in TG_MODULES::buildCLI+0x1f4 ()
#2 0xd7088 in TG_BUILDER::build+0x110 ()
#3 0x19e7a4 in TG_GROUP::createAppCli+0x59c ()
#4 0x198730 in TG_GROUP_CLI::analyseComEvent+0x310 ()
#5 0x1bd1b8 in TG_MAIN::processEvent+0x2a8 ()
#6 0x1bcdd4 in TG_MAIN::startMainLoop+0xfc ()
#7 0x1bf84c in tango_main+0x604 ()
#8 0xb4538 in main+0x434 ()

Any idea or information regarding this king of problem ?

Thanks

Laurent
7 REPLIES 7
Stephen Keane
Honored Contributor

Re: testing HPUX 11.0 on HPUX 11.11 dynamic librayr loading problem

What does ldd on your executable give you?
Laurent Laperrousaz
Regular Advisor

Re: testing HPUX 11.0 on HPUX 11.11 dynamic librayr loading problem

it gives:

/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libcl.2 => /usr/lib/libcl.2
/usr/lib/libisamstub.1 => /usr/lib/libisamstub.1
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libCsup_v2.2 => /usr/lib/libCsup_v2.2
/usr/lib/libstd_v2.2 => /usr/lib/libstd_v2.2
//ora/ora9i/lib32/libclntsh.sl.9.0 => /SOFT/oracle/app/oracle/product/8.1.7/lib/libclntsh.sl.9.0
/usr/lib/libcl.2 => /usr/lib/libcl.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libnss_dns.1 => /usr/lib/libnss_dns.1
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/librt.2 => /usr/lib/librt.2
/SOFT/oracle/app/oracle/product/8.1.7/lib/libwtc8.sl => /SOFT/oracle/app/oracle/product/8.1.7/lib/libwtc8.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libexpat.sl.3 => /usr/local/lib/libexpat.sl.3
/usr/lib/libc.2 => /usr/lib/libc.2
/home/TANGO/STLport/lib/libstlport_aCC.sl => lib/libstlport_aCC.sl
/usr/local/lib/libcrypto.sl.0.9.7 => /usr/local/lib/libcrypto.sl.0.9.7
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
Stephen Keane
Honored Contributor

Re: testing HPUX 11.0 on HPUX 11.11 dynamic librayr loading problem

When you say you dynamically load an .sl module, do you use dlopen() or shl_load() ?

Laurent Laperrousaz
Regular Advisor

Re: testing HPUX 11.0 on HPUX 11.11 dynamic librayr loading problem

We use shl_load()
Vibhor Kumar Agarwal
Esteemed Contributor

Re: testing HPUX 11.0 on HPUX 11.11 dynamic librayr loading problem

Try the man page of chatr

I think

chatr -/+ s enable/disable
might help you
Vibhor Kumar Agarwal
Stephen Keane
Honored Contributor

Re: testing HPUX 11.0 on HPUX 11.11 dynamic librayr loading problem

Which library are you trying to load? Where is it? Do you look for an error from the shl_load() call? If so, do you report it?

you could try

# chatr +s enable your_exe

and

# export SHLIB_PATH=path_to_your_lib_dir

But shl_load() shouldn't core dump just because it can't find a library, unless you are ignoring the return code from shl_load() and then trying to use a null pointer.
Laurent Laperrousaz
Regular Advisor

Re: testing HPUX 11.0 on HPUX 11.11 dynamic librayr loading problem

We currently already use SHLIB_PATH.

We are aware of shl_load() and the libraries we try to load are listed in a file the loader class(TG_BUILDER) reads on start (TG_MODULES).

My problem is that it works fine on 11.0 and it works 90% on 11i.
So the question is: why this unstability?

Are there some differences reported on the 2 systems?