[ 
https://issues.apache.org/jira/browse/AMQCPP-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13233460#comment-13233460
 ] 

Helen Huang commented on AMQCPP-388:
------------------------------------

I tried to turn off the inactivity monitor by using the following url, but it 
did not work. The InActivityMonitor class was still placed on the call stack 
leading to the same crash. Could you please take a look and see if I did it 
wrong. Much thanks for your help!

The new url: (I changed the url on line 58 in main.cpp of the attached 
BrokerMonitor program)

ActiveMQConnectionFactory* connectionFactory=new 
ActiveMQConnectionFactory("tcp://127.0.0.1:61616?connection.sendTimeout=2000&wireFormat.maxInactivityDuration=0");

Note: We use CmsTemplate to send and receiver messages. This connection factory 
is used to create the CmsTemplate instances.

Call stack at crash:

        activemq-cppud.dll!activemq::core::ActiveMQSession::dispose()  Line 357 
+ 0x9 bytes     C++
        activemq-cppud.dll!activemq::core::ActiveMQConnection::cleanup()  Line 
466 + 0x8 bytes  C++
        
activemq-cppud.dll!activemq::core::ActiveMQConnection::onException(const 
decaf::lang::Exception & ex={...})  Line 783   C++
        activemq-cppud.dll!activemq::transport::TransportFilter::fire(const 
decaf::lang::Exception & ex={...})  Line 54 + 0x17 bytes    C++
        
activemq-cppud.dll!activemq::transport::TransportFilter::onException(const 
decaf::lang::Exception & ex={...})  Line 47  C++
        activemq-cppud.dll!activemq::transport::TransportFilter::fire(const 
decaf::lang::Exception & ex={...})  Line 54 + 0x17 bytes    C++
        
activemq-cppud.dll!activemq::transport::TransportFilter::onException(const 
decaf::lang::Exception & ex={...})  Line 47  C++
        activemq-cppud.dll!activemq::transport::TransportFilter::fire(const 
decaf::lang::Exception & ex={...})  Line 54 + 0x17 bytes    C++
        
activemq-cppud.dll!activemq::transport::TransportFilter::onException(const 
decaf::lang::Exception & ex={...})  Line 47  C++
>       
> activemq-cppud.dll!activemq::transport::inactivity::InactivityMonitor::onException(const
>  decaf::lang::Exception & ex={...})  Line 314   C++
        activemq-cppud.dll!activemq::transport::TransportFilter::fire(const 
decaf::lang::Exception & ex={...})  Line 54 + 0x17 bytes    C++
        
activemq-cppud.dll!activemq::transport::TransportFilter::onException(const 
decaf::lang::Exception & ex={...})  Line 47  C++
        
activemq-cppud.dll!activemq::transport::IOTransport::fire(decaf::lang::Exception
 & ex={...})  Line 72 + 0x17 bytes      C++
        activemq-cppud.dll!activemq::transport::IOTransport::run()  Line 245    
C++
        
activemq-cppud.dll!decaf::lang::ThreadProperties::runCallback(decaf::lang::ThreadProperties
 * properties=0x01401000)  Line 137 + 0x13 bytes     C++
        activemq-cppud.dll!`anonymous namespace'::threadWorker(void * 
arg=0x01401000)  Line 210 + 0x9 bytes     C++
        msvcr80d.dll!_callthreadstartex()  Line 348 + 0xf bytes C
        msvcr80d.dll!_threadstartex(void * ptd=0x01400db0)  Line 331    C

                
> AprPool::getAprPool() returns NULL, causing access violation and application 
> crash
> ----------------------------------------------------------------------------------
>
>                 Key: AMQCPP-388
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-388
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Decaf
>    Affects Versions: 3.2.3
>         Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr 
> 1.4.2, apr-util 1.3.9, apr iconv 1.2.1
>            Reporter: Helen Huang
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 3.2.3
>
>         Attachments: BrokerMonitor.zip
>
>
> Our application that uses activemq c++ client lib crashed with the following 
> dump:
> ----------------------------------------------------------------------------------------------------------------------
> Thread 87 - System ID 3780
> Function     Arg 1     Arg 2     Arg 3   Source 
> libapr_1!apr_pvsprintf+8     00000000     0642a188     180eeb94    
> activemq_cppu!decaf::lang::Exception::buildMessage+71     0642a188     
> 180eeb74     180eee2c    
> activemq_cppu!decaf::lang::exceptions::RuntimeException::RuntimeException+4d  
>    180efeec     0642a160     00000097    
> activemq_cppu!decaf::lang::ThreadProperties::runCallback+125     180eee2c     
> 180efee0     00000001    
> msvcr80!CatchIt+5c     00000000     00000000     00000000
> LIBAPR_1!APR_PVSPRINTF+8In scotapp.dmp the assembly instruction at 
> libapr_1!apr_pvsprintf+8 in C:\scot\dll\libapr-1.dll has caused an access 
> violation exception (0xC0000005) when trying to read from memory location 
> 0x0000002c on thread 87
> --------------------------------------------------------------------------------------------------------------------
> On the call stack, we saw that following function from class 
> decaf::lang::Exception was called:
> void Exception::buildMessage( const char* format, va_list& vargs ) {
>     // Allocate buffer with a guess of it's size
>     AprPool pool;
>     // Allocate a buffer of the specified size.
>     char* buffer = apr_pvsprintf( pool.getAprPool(), format, vargs );
>     // Guessed size was enough. Assign the string.
>     message.assign( buffer, strlen( buffer ) );
> }
> The first parameter passed into apr_pvsprintf was NULL, causing the crash. 
> Could you please take a look and see if there is any bug in the activemqcpp 
> code that could cause the problem. Thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to