Operating System - Linux
1752767 Members
5316 Online
108789 Solutions
New Discussion юеВ

HP-UX11.11: coredump when using lib pthread

 
Jose Ribeiro_2
New Member

HP-UX11.11: coredump when using lib pthread

Hi,

i'm using a program compiled wit aCC A.03.65 with the option -AA, but when it is linked with library pthread (/usr/lib/libpthread.1), the execution aborts with coredump.

The core analysis:
#0 0xc003de84 in pthread_mutex_lock+0x68 () from /usr/lib/libpthread.1
#1 0xc021c438 in __thread_mutex_lock+0x70 () from /usr/lib/libc.2
#2 0xc2f394c4 in _HPMutexWrapper::lock+0x30 () from /usr/lib/libstd_v2.2
#3 0xc2f04b5c in std::locale::_C_install_facet+0x244 () from /usr/lib/libstd_v2.2
#4 0xc2f047b8 in std::locale::_C_make_facet+0x528 () from /usr/lib/libstd_v2.2
#5 0x99048 in std::basic_filebuf>::overflow (this=0x7b01d190, __c=-1)
at /opt/aCC/include_std/fstream.cc:339
#6 0x998b0 in std::basic_filebuf>::sync (this=0x7b01d190) at /opt/aCC/include_std/fstream.cc:572

My question is, it's possible to C++ v2 iostream use (libs CSup_v2 and std_v2) and libpthread.1?

Thanks,
Jos├й Ribeiro

7 REPLIES 7
Alberto Rocha
Advisor

Re: HP-UX11.11: coredump when using lib pthread

Verify if the following patches are applied:

├в ┬в PHNE_29887 s/b PHNE_33159 s/b PHNE_33628 (28/10/2005)
s700_800 11.11 cumulative ARPA Transport patch (resolve alguns hangs provocados por problemas nos sockets)
├в ┬в PHCO_29960 s/b PHCO_30544
Pthread enhancements and fixes

# swlist -l fileset | grep thread

Hope it helps, AR
Dennis Handly
Acclaimed Contributor

Re: HP-UX11.11: coredump when using lib pthread

>My question is, it's possible to C++ v2 iostream use (libs CSup_v2 and std_v2) and libpthread.1?

Only if you consistently compile with -mt.
Jose Ribeiro_2
New Member

Re: HP-UX11.11: coredump when using lib pthread

It must be possible to use libpthread.1, i think, because it's the only one available, don't exist a libpthread_v2...

But Thanks
Jose Ribeiro_2
New Member

Re: HP-UX11.11: coredump when using lib pthread

The following patches are applied:
PHNE_29887
PHCO_29960
Alberto Rocha
Advisor

Re: HP-UX11.11: coredump when using lib pthread

Note those patches have been superseed by

PHNE_29887 --> PHNE_33628
PHCO_29960 --> PHCO_30544

AR
Dennis Handly
Acclaimed Contributor

Re: HP-UX11.11: coredump when using lib pthread

>It must be possible to use libpthread.1, i think, because it's the only one

My comment wasn't about the version of libpthead but the fact that to use libpthread with aC++ requires compiling with -mt:
http://www.docs.hp.com/en/7762/5991-4874/threads.htm
Jose Ribeiro_2
New Member

Re: HP-UX11.11: coredump when using lib pthread


Recompiling all the code with the -mt option resolved the coredump.

Thanks for the help, it solved my problem.