Operating System - HP-UX
1838407 Members
3215 Online
110125 Solutions
New Discussion

libc problem - reinit libc failed

 
Klaus Crusius
Trusted Contributor

libc problem - reinit libc failed

Hi,

we suffer a problem when linking 2 3rd party libriaries in one application. One of them is the well known Oracle, the other is Setcim from AspenTech. The error message appears, before the execution of main is starting.

The following happens on HPUX11.0 with Oracle 9.2.0.4 and setcim version 4.9:

# cat main.c
int main() {
exit(0);
}

# cc main.c -L$ORACLE_LIB -L$SETCIMLIB -lsetcim -lclntsh -o main
# main

Pthread internal error: message: __libc_reinit() failed, file: /ux/core/kern/pth
reads/pthread.c, line: 1093
Return Pointer is 0xc0b69273
Quit

It is not possible to start up any application, which uses both libraries. We
found, that setcim refers to libc.1, while oracle uses libc.2.
If that is the reason for the error,
is there a version of libsetcim.a available, which uses libc.2 ?

I add the output of odump

odump -sllibloadlist main

Shared Library Load List for main:

Order Name

0 main
1 ^ /oracle1/app/oracle/product/9.2.0.1.0/lib32/libclntsh.sl.9.0
2 ^ ^ /oracle1/app/oracle/product/9.2.0.1.0/lib32/libwtc9.sl
3 ^ ^ /usr/lib/librt.2
4 ^ ^ /usr/lib/libpthread.1
5 ^ ^ /usr/lib/libnss_dns.1
6 ^ ^ ^ /usr/lib/libc.2
7 ^ ^ ^ ^ /usr/lib/libdld.2
8 ^ ^ ^ /usr/lib/libdld.2
9 ^ ^ /usr/lib/libdld.2
10 ^ ^ /usr/lib/libm.2
11 ^ ^ /usr/lib/libc.2
12 ^ ^ ^ /usr/lib/libdld.2
13 ^ ^ /usr/lib/libcl.2
14 ^ ^ ^ /usr/lib/libdld.2
15 ^ ^ ^ /usr/lib/libisamstub.1
16 ^ /cocain/setcim49/lib/libsetcim.a
17 ^ ^ /usr/lib/libM.1
18 ^ ^ /usr/lib/libc.1
19 ^ ^ ^ /usr/lib/libdld.1
20 ^ /usr/lib/libc.2
21 ^ ^ /usr/lib/libdld.2

Is there any idea out there that helps us to make the beasts cooperate?

Klaus



There is a live before death!
6 REPLIES 6
Steve Steel
Honored Contributor

Re: libc problem - reinit libc failed

Hi

Do not use libc.1 and libc.2

libc.2 should be enough


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Klaus Crusius
Trusted Contributor

Re: libc problem - reinit libc failed

the problem is, I can not control that, because the dependencies are buried in the external libraries.
I am also not sure, if the two versions of libc really matter.

Klaus
There is a live before death!
Steve Steel
Honored Contributor

Re: libc problem - reinit libc failed

Hi

Go back to your supplier

Pthread internal error:
message:_libc_reinit() failed,
file: /ux/core/kern/pthreads/pthread.c, line: 1093
This error suggest *a program is compiled with Kernel Threads
(libpthread), which cannot be intermixed with Posix/DCE threads."


NOTE : The info shared shows you linked with both libc.1 and libc.2 and libdld.1 and libdld.2

this is not supported since it is an unacceptable mix..

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Steve Steel
Honored Contributor

Re: libc problem - reinit libc failed

Hi


run chatr main

Post result

Also after a fault try

chatr +s disable main

Try it again

Is there a difference

Steve Steel

If you want truly to understand something, try to change it. (Kurt Lewin)
Klaus Crusius
Trusted Contributor

Re: libc problem - reinit libc failed

before modification:

$chatr main
main:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /oracle1/app/oracle/product/9.2.0.1.0/lib32/libclntsh.sl.
9.0
dynamic /cocain/setcim49/lib/libsetcim.a
dynamic /usr/lib/libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support 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
shared library text merging disabled


$chatr +s disable main
main:
current values:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /oracle1/app/oracle/product/9.2.0.1.0/lib32/libclntsh.sl.
9.0
dynamic /cocain/setcim49/lib/libsetcim.a
dynamic /usr/lib/libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support 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
shared library text merging disabled
new values:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /oracle1/app/oracle/product/9.2.0.1.0/lib32/libclntsh.sl.
9.0
dynamic /cocain/setcim49/lib/libsetcim.a
dynamic /usr/lib/libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support 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
shared library text merging disabled
rueh03.plain:amc/src $main

Pthread internal error: message: __libc_reinit() failed, file: /ux/core/kern/pth
reads/pthread.c, line: 1093
Return Pointer is 0xc0b69273
Quit

Shortly speaking, it had no effect.

K
There is a live before death!
ranganath ramachandra
Esteemed Contributor

Re: libc problem - reinit libc failed


16 ^ /cocain/setcim49/lib/libsetcim.a
17 ^ ^ /usr/lib/libM.1
18 ^ ^ /usr/lib/libc.1
19 ^ ^ ^ /usr/lib/libdld.1

this seems weird, a '.a' being listed in the shared library list.

how about checking if an archive is available and linking with it if possible ?
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo