You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jeffrey <je...@hotmail.com> on 2013/01/11 16:02:41 UTC

ActiveMQ cpp 3.5.0 not working on HPUX 11.31

I have a sort of driver test program written with ActiveMQ cpp.  I started
with 3.4.4 and upgraded to 3.4.5 and over time I have gotten it to work
pretty well, but I just upgraded to 3.5.0 and rebuilt the library and
compiled my program again, but now it core dumps where it did not before.

I now get these compile warnings for my program which I dont think are
important:

amqcpp/include/activemq-cpp-3.5.0/activemq/commands/ActiveMQTempDestination.h",
line 83: warning #2997-D: 
          function "decaf::lang::Comparable<T>::equals(const T &) const
[with
          T=activemq::commands::ActiveMQDestination]" is hidden by
          "activemq::commands::ActiveMQTempDestination::equals" -- virtual
          function override intended?
          virtual bool equals(const DataStructure* value) const {
amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
line 76: warning #2997-D: 
          function "decaf::lang::Comparable<T>::equals(const T &) const
[with
          T=activemq::commands::TransactionId]" is hidden by
          "activemq::commands::LocalTransactionId::equals" -- virtual
function
          override intended?
          virtual bool equals( const DataStructure* value ) const;
amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
line 91: warning #2997-D: 
          function "decaf::lang::Comparable<T>::equals(const T &) const
[with
          T=activemq::commands::TransactionId]" is hidden by
          "activemq::commands::LocalTransactionId::equals" -- virtual
function
          override intended?
          virtual bool equals( const LocalTransactionId& value ) const;
amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
line 89: warning #2997-D: 
          function "decaf::lang::Comparable<T>::compareTo(const T &) const
          [with T=activemq::commands::TransactionId]" is hidden by
          "activemq::commands::LocalTransactionId::compareTo" -- virtual
          function override intended?
          virtual int compareTo( const LocalTransactionId& value ) const;
amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
line 93: warning #2997-D: 
          function "decaf::lang::Comparable<T>::operator==(const T &) const
          [with T=activemq::commands::TransactionId]" is hidden by
          "activemq::commands::LocalTransactionId::operator==" -- virtual
          function override intended?
          virtual bool operator==( const LocalTransactionId& value ) const;
amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
line 95: warning #2997-D: 
          function "decaf::lang::Comparable<T>::operator<(const T &) const
          [with T=activemq::commands::TransactionId]" is hidden by
          "activemq::commands::LocalTransactionId::operator<" -- virtual
          function override intended?
          virtual bool operator<( const LocalTransactionId& value ) const;

When I run the program I get:
aCC runtime: Unexpected exception of type
"decaf::lang::exceptions::RuntimeException".
aCC runtime: what(): Failed to Lock OS Mutex
Abort(coredump)

Looking at the back trace of the core dump I get:
#0  0x60000000c01fa1b0:0 in _lwp_kill+0x30 ()
   from /usr/lib/hpux32/libpthread.so.1
#1  0x60000000c0163a10:0 in pthread_kill+0x8d0 ()
   from /usr/lib/hpux32/libpthread.so.1
#2  0x60000000c03005a0:0 in raise+0xe0 () from /usr/lib/hpux32/libc.so.1
#3  0x60000000c0420cd0:0 in abort+0x170 () from /usr/lib/hpux32/libc.so.1
#4  0x60000000c0dd0930:0 in std::terminate()+0x50 ()
   from /usr/lib/hpux32/libCsup.so.1
#5  0x60000000c0dfa590:0 in std::unexpected()+0x50 ()
   from /usr/lib/hpux32/libCsup.so.1
#6  0x60000000c0dd1b60:0 in __cxa_call_unexpected+0x200 ()
   from /usr/lib/hpux32/libCsup.so.1
#7  0x60000000e29016d0:0 in decaf::lang::Exception::~Exception (
    this=0x2000000040089510, _noname=0) at decaf/lang/Exception.cpp:105
#8  0x60000000e290aaa0:0 in decaf::lang::Exception::~Exception()+0x30 ()
    at decaf/lang/Exception.cpp:105
#9  0x60000000e299a770:0 in
decaf::lang::exceptions::RuntimeException::~RuntimeException
(this=0x2000000040089510, _noname=0)
    at decaf/lang/exceptions/RuntimeException.cpp:30
#10 0x60000000c0dfab10:0 in __cxa_end_catch+0x190 ()
   from /usr/lib/hpux32/libCsup.so.1
#11 0x60000000e2985310:0 in decaf::lang::Thread::~Thread (
    this=0x2000000040019870, _noname=0) at decaf/lang/Thread.cpp:133
#12 0x60000000e2985610:0 in decaf::lang::Thread::~Thread()+0x40 ()
    at decaf/lang/Thread.cpp:128
#13 0x60000000e28617b0:0 in
decaf::internal::util::concurrent::Threading::shutdown () at
decaf/internal/util/concurrent/Threading.cpp:843
#14 0x60000000e2713180:0 in decaf::lang::Runtime::shutdownRuntime ()
    at decaf/internal/DecafRuntime.cpp:109
#15 0x60000000e1c19b30:0 in activemq::library::ActiveMQCPP::shutdownLibrary
()
    at activemq/library/ActiveMQCPP.cpp:84
#16 0x400dc30:0 in main () at amqdriver.cpp:438

line 438 in my program is activemq::library::ActiveMQCPP::shutdownLibrary();

If I change it back to the 3.4.5.library it works fine, and I dont see
anything in the release notes that changed with regard to this, so does
anyone have any ideas?

Thanks



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-cpp-3-5-0-not-working-on-HPUX-11-31-tp4661659.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ cpp 3.5.0 not working on HPUX 11.31

Posted by jeffrey <je...@hotmail.com>.
I made a jira bug report  https://issues.apache.org/jira/browse/AMQCPP-449
<https://issues.apache.org/jira/browse/AMQCPP-449>  and attached my program
source.  



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-cpp-3-5-0-not-working-on-HPUX-11-31-tp4661659p4661831.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ cpp 3.5.0 not working on HPUX 11.31

Posted by Timothy Bish <ta...@gmail.com>.
On Tue, 2013-01-15 at 13:59 -0800, jeffrey wrote: 
> sorry, from my first post in the thread: it is during the shutdownLibrary
> call at the end of my program that has any problem.
> 
> The program is a simple driver, it creates some number of messages and send
> them all on the same queue to the same place.  It creates 1 thread to be the
> producer, like so:
> 
> SimpleProducer *producer = new SimpleProducer( brokerURI, destURI,
> messageType, recordInterval, instances, loops, loopTime, recordIntervalTime,
> timeout);
>     Thread producerThread(producer);
>     producerThread.start();
>     producerThread.join();
>     delete producer;
> 
> the destructor for SimpleProducer is expanded from the sample code to
> include new things in my class.
> This all worked just fine with 3.4.4, and 3.4.5, and it still works fine if
> I take out activemq::library::ActiveMQCPP::shutdownLibrary();
> at the bottom of the file.  But with it in, which im guessing is a good
> idea, it crashes.
> It provides no stack trace on its own, because the exception is not printed
> or rethrown,  but i did get out the error number and its meaning.
> 
> 
> I also have a simple receiver with two threads to receive two different
> queues, works mostly the same way, it also now crashed on the shutdown
> library call.

Recommend you create a test app and attach it to a Jira issue so the
complete app can be seen and tested.  

> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-cpp-3-5-0-not-working-on-HPUX-11-31-tp4661659p4661795.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com 
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: ActiveMQ cpp 3.5.0 not working on HPUX 11.31

Posted by jeffrey <je...@hotmail.com>.
sorry, from my first post in the thread: it is during the shutdownLibrary
call at the end of my program that has any problem.

The program is a simple driver, it creates some number of messages and send
them all on the same queue to the same place.  It creates 1 thread to be the
producer, like so:

SimpleProducer *producer = new SimpleProducer( brokerURI, destURI,
messageType, recordInterval, instances, loops, loopTime, recordIntervalTime,
timeout);
    Thread producerThread(producer);
    producerThread.start();
    producerThread.join();
    delete producer;

the destructor for SimpleProducer is expanded from the sample code to
include new things in my class.
This all worked just fine with 3.4.4, and 3.4.5, and it still works fine if
I take out activemq::library::ActiveMQCPP::shutdownLibrary();
at the bottom of the file.  But with it in, which im guessing is a good
idea, it crashes.
It provides no stack trace on its own, because the exception is not printed
or rethrown,  but i did get out the error number and its meaning.


I also have a simple receiver with two threads to receive two different
queues, works mostly the same way, it also now crashed on the shutdown
library call.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-cpp-3-5-0-not-working-on-HPUX-11-31-tp4661659p4661795.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ cpp 3.5.0 not working on HPUX 11.31

Posted by Timothy Bish <ta...@gmail.com>.
On Tue, 2013-01-15 at 13:16 -0800, jeffrey wrote: 
> so trying to solve this, I finally got some information from looking it the
> core dump back traces.  And in the file decaf/lang/Thread.cpp about line 133
> there is a CATCHALL_NOTHROW that was catching the runtime exception in the
> destructor for Thread.
> 
> So I went deeper and in
> decaf/internal/util/concurrent/unix/PlatformThread.cpp about line 76 there
> is a call to pthread_mutex_lock, and the return code is not check, a runtime
> exception is simply thrown if it isnt 0, so i added in to get the number.  
> The number was 22, that is for EINVAL: mutex is not an initalized mutex.
> 
> I am still looking, but I do not know the full flow of the program so it
> takes quite some time, I can see that the whole way threads and mutexes are
> done changed drastically from 3.4.5 to 3.5.0.
> 
> I am just looking for some insight to the changes so I can resolve this on
> my platform.
> 
> Thanks.
> 

Not sure what the application is doing or when its failing so more
context and insight into how things work would be helpful.  Best bet is
to post stack traces and if possible provide a same app that
demonstrates the issue. 

> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-cpp-3-5-0-not-working-on-HPUX-11-31-tp4661659p4661783.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com 
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: ActiveMQ cpp 3.5.0 not working on HPUX 11.31

Posted by jeffrey <je...@hotmail.com>.
so trying to solve this, I finally got some information from looking it the
core dump back traces.  And in the file decaf/lang/Thread.cpp about line 133
there is a CATCHALL_NOTHROW that was catching the runtime exception in the
destructor for Thread.

So I went deeper and in
decaf/internal/util/concurrent/unix/PlatformThread.cpp about line 76 there
is a call to pthread_mutex_lock, and the return code is not check, a runtime
exception is simply thrown if it isnt 0, so i added in to get the number.  
The number was 22, that is for EINVAL: mutex is not an initalized mutex.

I am still looking, but I do not know the full flow of the program so it
takes quite some time, I can see that the whole way threads and mutexes are
done changed drastically from 3.4.5 to 3.5.0.

I am just looking for some insight to the changes so I can resolve this on
my platform.

Thanks.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-cpp-3-5-0-not-working-on-HPUX-11-31-tp4661659p4661783.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ cpp 3.5.0 not working on HPUX 11.31

Posted by Timothy Bish <ta...@gmail.com>.
On Fri, 2013-01-11 at 07:02 -0800, jeffrey wrote: 
> I have a sort of driver test program written with ActiveMQ cpp.  I started
> with 3.4.4 and upgraded to 3.4.5 and over time I have gotten it to work
> pretty well, but I just upgraded to 3.5.0 and rebuilt the library and
> compiled my program again, but now it core dumps where it did not before.
> 
> I now get these compile warnings for my program which I dont think are
> important:

There's no testing done on that platform so hard to say whether its
going to work or not.  From the stack my only guess is that you aren't
destroying all your CMS object prior to shutting down the library
runtime.  Otherwise running the unit tests and debugging might help you
see where things are going wrong. 

> 
> amqcpp/include/activemq-cpp-3.5.0/activemq/commands/ActiveMQTempDestination.h",
> line 83: warning #2997-D: 
>           function "decaf::lang::Comparable<T>::equals(const T &) const
> [with
>           T=activemq::commands::ActiveMQDestination]" is hidden by
>           "activemq::commands::ActiveMQTempDestination::equals" -- virtual
>           function override intended?
>           virtual bool equals(const DataStructure* value) const {
> amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
> line 76: warning #2997-D: 
>           function "decaf::lang::Comparable<T>::equals(const T &) const
> [with
>           T=activemq::commands::TransactionId]" is hidden by
>           "activemq::commands::LocalTransactionId::equals" -- virtual
> function
>           override intended?
>           virtual bool equals( const DataStructure* value ) const;
> amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
> line 91: warning #2997-D: 
>           function "decaf::lang::Comparable<T>::equals(const T &) const
> [with
>           T=activemq::commands::TransactionId]" is hidden by
>           "activemq::commands::LocalTransactionId::equals" -- virtual
> function
>           override intended?
>           virtual bool equals( const LocalTransactionId& value ) const;
> amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
> line 89: warning #2997-D: 
>           function "decaf::lang::Comparable<T>::compareTo(const T &) const
>           [with T=activemq::commands::TransactionId]" is hidden by
>           "activemq::commands::LocalTransactionId::compareTo" -- virtual
>           function override intended?
>           virtual int compareTo( const LocalTransactionId& value ) const;
> amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
> line 93: warning #2997-D: 
>           function "decaf::lang::Comparable<T>::operator==(const T &) const
>           [with T=activemq::commands::TransactionId]" is hidden by
>           "activemq::commands::LocalTransactionId::operator==" -- virtual
>           function override intended?
>           virtual bool operator==( const LocalTransactionId& value ) const;
> amqcpp/include/activemq-cpp-3.5.0/activemq/commands/LocalTransactionId.h",
> line 95: warning #2997-D: 
>           function "decaf::lang::Comparable<T>::operator<(const T &) const
>           [with T=activemq::commands::TransactionId]" is hidden by
>           "activemq::commands::LocalTransactionId::operator<" -- virtual
>           function override intended?
>           virtual bool operator<( const LocalTransactionId& value ) const;
> 
> When I run the program I get:
> aCC runtime: Unexpected exception of type
> "decaf::lang::exceptions::RuntimeException".
> aCC runtime: what(): Failed to Lock OS Mutex
> Abort(coredump)
> 
> Looking at the back trace of the core dump I get:
> #0  0x60000000c01fa1b0:0 in _lwp_kill+0x30 ()
>    from /usr/lib/hpux32/libpthread.so.1
> #1  0x60000000c0163a10:0 in pthread_kill+0x8d0 ()
>    from /usr/lib/hpux32/libpthread.so.1
> #2  0x60000000c03005a0:0 in raise+0xe0 () from /usr/lib/hpux32/libc.so.1
> #3  0x60000000c0420cd0:0 in abort+0x170 () from /usr/lib/hpux32/libc.so.1
> #4  0x60000000c0dd0930:0 in std::terminate()+0x50 ()
>    from /usr/lib/hpux32/libCsup.so.1
> #5  0x60000000c0dfa590:0 in std::unexpected()+0x50 ()
>    from /usr/lib/hpux32/libCsup.so.1
> #6  0x60000000c0dd1b60:0 in __cxa_call_unexpected+0x200 ()
>    from /usr/lib/hpux32/libCsup.so.1
> #7  0x60000000e29016d0:0 in decaf::lang::Exception::~Exception (
>     this=0x2000000040089510, _noname=0) at decaf/lang/Exception.cpp:105
> #8  0x60000000e290aaa0:0 in decaf::lang::Exception::~Exception()+0x30 ()
>     at decaf/lang/Exception.cpp:105
> #9  0x60000000e299a770:0 in
> decaf::lang::exceptions::RuntimeException::~RuntimeException
> (this=0x2000000040089510, _noname=0)
>     at decaf/lang/exceptions/RuntimeException.cpp:30
> #10 0x60000000c0dfab10:0 in __cxa_end_catch+0x190 ()
>    from /usr/lib/hpux32/libCsup.so.1
> #11 0x60000000e2985310:0 in decaf::lang::Thread::~Thread (
>     this=0x2000000040019870, _noname=0) at decaf/lang/Thread.cpp:133
> #12 0x60000000e2985610:0 in decaf::lang::Thread::~Thread()+0x40 ()
>     at decaf/lang/Thread.cpp:128
> #13 0x60000000e28617b0:0 in
> decaf::internal::util::concurrent::Threading::shutdown () at
> decaf/internal/util/concurrent/Threading.cpp:843
> #14 0x60000000e2713180:0 in decaf::lang::Runtime::shutdownRuntime ()
>     at decaf/internal/DecafRuntime.cpp:109
> #15 0x60000000e1c19b30:0 in activemq::library::ActiveMQCPP::shutdownLibrary
> ()
>     at activemq/library/ActiveMQCPP.cpp:84
> #16 0x400dc30:0 in main () at amqdriver.cpp:438
> 
> line 438 in my program is activemq::library::ActiveMQCPP::shutdownLibrary();
> 
> If I change it back to the 3.4.5.library it works fine, and I dont see
> anything in the release notes that changed with regard to this, so does
> anyone have any ideas?
> 
> Thanks
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-cpp-3-5-0-not-working-on-HPUX-11-31-tp4661659.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com 
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/