1748076 Members
5377 Online
108758 Solutions
New Discussion

multithread coredump

 

multithread coredump

Hi,

i'm experiencing problems running an multithread applicattion built on HP-UX B.11.23 Itanium. The execution aborted (coredump) when some functions of a shared library are invoked, but the coredump it's intermittent.

The stack of the core file is:

#0 0x60000000f6d78ea0:0 in pthread_mutex_lock ()
at /ux/core/libs/threadslibs/src/common/pthreads/mutex.c:3971
3971 /ux/core/libs/threadslibs/src/common/pthreads/mutex.c: No such file or directory.
in /ux/core/libs/threadslibs/src/common/pthreads/mutex.c
Current language: auto; currently c
(gdb) where
#0 0x60000000f6d78ea0:0 in pthread_mutex_lock ()
at /ux/core/libs/threadslibs/src/common/pthreads/mutex.c:3971
#1 0x60000000f6774870:0 in __thread_mutex_lock ()
at ../../../../../core/libs/libc/shared_em_32/../core/threads/wrappers1.c:273
#2 0x60000000f6e9d480:0 in _HPMutexWrapper::lock () at mutexwrpr.cpp:45
warning:
ERROR: Use the "objectdir" command to specify the search
path for objectfile AddonFactory.o.
If NOT specified will behave as a non -g compiled binary.

#3 0xc0020:0 in __rw::__rw_mutex_base::_C_acquire()+0x50 ()
#4 0xc0b40:0 in __rw::__rw_guard::__rw_guard(__rw::__rw_mutex_base&)+0x50 ()
#5 0xac6c0:0 in __rw::__rw_guard::__rw_guard(__rw::__rw_mutex_base&)+0x40 ()
#6 0xaa5c0:0 in __rw::__rw_atomic_preincrement(long&,__rw::__rw_mutex_base&)+0x50 ()
#7 0xa34e0:0 in __rw::__string_ref,std::allocator >::__addReference()+0x70 ()
#8 0xa3800:0 in std::basic_string,std::allocator >::basic_string(std::basic_string,std::allocator > const&)+0xf0 ()
#9 0xa49d0:0 in std::basic_string,std::allocator >::basic_string(std::basic_string,std::allocator > const&)+0x40 ()
warning:
ERROR: Use the "objectdir" command to specify the search
path for objectfile MSA.o.
If NOT specified will behave as a non -g compiled binary.

#10 0x60000000f4716290:0 in msa::MSA::process(bce::Customer*)+0x150 ()
at locinst.cpp:561
warning:
ERROR: Use the "objectdir" command to specify the search
path for objectfile Addon.o.
If NOT specified will behave as a non -g compiled binary.

#11 0x60000000f76aafc0:0 in add::Addon::processCustomer(bce::Customer*)
+0x5a0 () from packcore/modules//libicm.so
warning:
ERROR: Use the "objectdir" command to specify the search
path for objectfile IehThread.o.
If NOT specified will behave as a non -g compiled binary.

---Type to continue, or q to quit---
#12 0x1a2280:0 in iehcore::IehThread::processThread(void*)+0x6c0 ()
#13 0x60000000f6d5d040:0 in __pthread_bound_body ()
at /ux/core/libs/threadslibs/src/common/pthreads/pthread.c:4602

I have seen some people recommended to use another CPPFLAGS, like -mt, -lpthread, etc.

Has any of you had experienced a problem like this? Any suggestions?

Thanks
1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: multithread coredump

>but the coredump it's intermittent.

Do you have heap corruption??

>I have seen some people recommended to use another CPPFLAGS, like -mt

If you are linking against libpthread, you must compile everything with -mt, including all libs and any third party libs.