1753561 Members
5719 Online
108796 Solutions
New Discussion юеВ

program hangs in dld

 
SOLVED
Go to solution
Dusan Onofer
Occasional Contributor

program hangs in dld


we have custom program written in c,
which is linked with oracle 10.2.0 libs.
Program is 32bit, running on
"HP-UX devd3 B.11.11 U 9000/800"
Program should use SHLIB_PATH to locate oracle libraries (located in $ORACLE_HOME/lib32) -> so it's linked with "+s" specified to ld.

When I run program it hangs in:
"bind_symbol" which is in dld -> output is from gdb:
(gdb) info threads
* 4 system thread 3404991 Priority:154 0x76821be8 in __ksleep+0x10 ()
from /usr/lib/libc.2
3 system thread 3404989 Priority:154 0x76821be8 in __ksleep+0x10 ()
from /usr/lib/libc.2
2 system thread 3404990 Priority:179 0xc00207f4 in bind_symbol+0x34 ()
from /usr/lib/dld.sl
1 system thread 3404985 Priority:154 0x7660c720 in ___lwp_wait_sys+0x10 ()
from /usr/lib/libpthread.1
(gdb) thread 2
[Switching to thread 2 (system thread 3404990)]
#0 0xc00207f4 in bind_symbol+0x34 () from /usr/lib/dld.sl
(gdb) bt
#0 0xc00207f4 in bind_symbol+0x34 () from /usr/lib/dld.sl
#1 0xc0025bd0 in bind_module_symbols+0x174 () from /usr/lib/dld.sl
#2 0xc001f45c in dosmartbind+0x80 () from /usr/lib/dld.sl
#3 0xc00251ac in findlibsym+0x70c () from /usr/lib/dld.sl
#4 0xc003e0ec in findexportsym#HLO_CL_#i9_0x0#ib_0x0+0x430 ()
from /usr/lib/dld.sl
#5 0xc00208a8 in bind_symbol+0xe8 () from /usr/lib/dld.sl
#6 0xc0025bd0 in bind_module_symbols+0x174 () from /usr/lib/dld.sl
#7 0xc001f45c in dosmartbind+0x80 () from /usr/lib/dld.sl
#8 0xc00251ac in findlibsym+0x70c () from /usr/lib/dld.sl
#9 0xc003e0ec in findexportsym#HLO_CL_#i9_0x0#ib_0x0+0x430 ()
from /usr/lib/dld.sl
#10 0xc00208a8 in bind_symbol+0xe8 () from /usr/lib/dld.sl
#11 0xc0025bd0 in bind_module_symbols+0x174 () from /usr/lib/dld.sl
#12 0xc001f45c in dosmartbind+0x80 () from /usr/lib/dld.sl
#13 0xc00251ac in findlibsym+0x70c () from /usr/lib/dld.sl
#14 0xc003e0ec in findexportsym#HLO_CL_#i9_0x0#ib_0x0+0x430 ()
from /usr/lib/dld.sl
#15 0xc00208a8 in bind_symbol+0xe8 () from /usr/lib/dld.sl
#16 0xc0025bd0 in bind_module_symbols+0x174 () from /usr/lib/dld.sl
#17 0xc001f45c in dosmartbind+0x80 () from /usr/lib/dld.sl
#18 0xc00251ac in findlibsym+0x70c () from /usr/lib/dld.sl
#19 0xc003e0ec in findexportsym#HLO_CL_#i9_0x0#ib_0x0+0x430 ()
from /usr/lib/dld.sl
.... cut ... this repeats more than 100times ...
#292 0xc001f45c in dosmartbind+0x80 () from /usr/lib/dld.sl
#293 0xc00251ac in findlibsym+0x70c () from /usr/lib/dld.sl
#294 0xc003e0ec in findexportsym#HLO_CL_#i9_0x0#ib_0x0+0x430 ()
from /usr/lib/dld.sl
#295 0xc00208a8 in bind_symbol+0xe8 () from /usr/lib/dld.sl
#296 0xc00260d0 in bind_symbols+0x138 () from /usr/lib/dld.sl
#297 0xc0036b1c in dlopen_override_now+0xb4 () from /usr/lib/dld.sl
#298 0xc0036eec in __dlopen+0x2e4 () from /usr/lib/dld.sl
#299 0x76861e3c in _dlopen+0xcc () from /usr/lib/libdld.2
#300 0x77c33dbc in slpmloclfv+0x60 ()
from /ccbdevd3_oracle10/product/10.2.0/lib32/libclntsh.sl.10.1
#301 0x77c34190 in slpmloc+0x1cc ()


Behavior of program "slightly" changes when I unset SHLIB_PATH. In that case program works fine. I think it's using "last resort" absolute path which is same as specified in SHLIB_PATH to locate oracle's libraries.

It's problem, when I move compiled program to another environment, where "last resort" paths are not valid and SHLIB_PATH doesn't help -- program hangs.

Any ideas what's happening there?

Thanks,

Dusan
4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: program hangs in dld

Do you have the latest dld patch installed? PHSS_39077

If this doesn't fix it, you'll have to contact the Response Center.
Dusan Onofer
Occasional Contributor

Re: program hangs in dld


Thanks, but id didn't help. But I've noticed when I link objects with -B immediate program works as expected. I'll contact Response Center.
ranganath ramachandra
Esteemed Contributor
Solution

Re: program hangs in dld

can you try increasing the thread stack size ?
 
--
ranga
[i work for hpe]

Accept or Kudo

Dusan Onofer
Occasional Contributor

Re: program hangs in dld

Bingo!

increasing thread stack size works. I've tryed this also before, but it was not enough. Now I enlarged it even more and it's fine.
Thank you.