activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mahesh.nitte" <>
Subject Activemq-cpp - Exception is thrown at Threading.cpp:274
Date Tue, 11 Jul 2017 15:40:39 GMT
I am using activemq-3.9.3 library for c++ on ubuntu 12.x
It is a complex multi threaded application.
I see there are 3000+ application threads got created!
And when I debugged through gdb, I see those threads are depending on one
core thread.
The dependency looks like this.


where t1 is waiting for mutex held by t2 and which is waiting for the mutex
held by t3. Similary t3 is waiting for t4's resource.

t4's back trace has the following:-

(gdb) bt
#0  0x00007f18126bbd84 in pthread_cond_wait@@GLIBC_2.3.2 () from
#1  0x0000000000e5f226 in (anonymous namespace)::runCallback
(arg=0x7f17990f95d0) at decaf/internal/util/concurrent/Threading.cpp:274
#2  0x0000000000e62ed9 in
(condition=0xe5f243, mutex=0x7f179944e5a0, mills=25303968, nanos=47162608)
at decaf/internal/util/concurrent/unix/PlatformThread.cpp:197
#3  0x0000000000e62efa in
(condition=0x2cf80a0, mutex=0x2cf5c20, mills=<optimized out>,
nanos=<optimized out>)
    at decaf/internal/util/concurrent/unix/PlatformThread.cpp:202

The frame 1 has the below code line:-


I also found some of the threads tries to access memory which is corrupted!
I believe this is due to the fact that lot of threads got created and
waiting... to unlock the above resource and stack space exhausted!

#10 0x0000000000b9dd16 in
>::~clone_impl (this=0xdf334a, __in_chrg=<optimized out>)
    at /usr/include/boost/exception/exception.hpp:406
No locals.
#11 0x0000000000b9d307 in
boost::throw_exception<boost::thread_resource_error> (e=...) at
9  0x0000000000c4260e in TPGAdaEventReceiver::echoAppletEvent (this=0x0,
agentObj=<error reading variable: Cannot access memory at address 0x0>,
agentXmlObj=0x0, status=<error reading variable: Cannot access memory at
address 0x0>

Please help me to understand
1. What went wrong here? Why the exception is thrown at Threading.cpp:274?
2. How can I fix the same?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message