[ https://issues.apache.org/activemq/browse/AMQCPP-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39610 ]
Timothy Bish commented on AMQCPP-128: ------------------------------------- I spent some time looking at this again yesterday. Looks like there may be an issue with the Windows code for the Mutex class, not sure what it is yet though. This never happens on Nix systems. I'm trying to create a Mutex class unit test to replicate this in hopes of making it a little easier to see what's going on. > Transacted session crashes or loses messages > -------------------------------------------- > > Key: AMQCPP-128 > URL: https://issues.apache.org/activemq/browse/AMQCPP-128 > Project: ActiveMQ C++ Client > Issue Type: Bug > Affects Versions: 2.1 > Reporter: Albert Strasheim > Assignee: Timothy Bish > Fix For: 2.1 > > Attachments: main.cpp > > > Attached is some code that does a few things with transacted sessions, in a > loop. This sometimes reproduces the crash I mentioned in one of my latest > comments in AMQCPP-122. > I'm testing on Windows XP SP2 with Visual Studio 8 on Core 2 Duo machine. > I've also seen all of the following happen in subsequent runs of the code: > - Where I expect to receive a message, nothing turns up (even with a long > timeout period). Cleanup goes fine. > - Where I expect to receive a message, nothing turns up. Cleanup hangs. > - Sometimes it prints: > Mutex::unlock - Failed, not Lock Owner! > FILE: ..\src\main\activemq\concurrent\Mutex.cpp, LINE: 83 > FILE: activemq-cpp\src\main\activemq/concurrent/Lock.h, LINE: 110 > FILE: ..\src\main\activemq\core\ActiveMQConsumer.cpp, LINE: 443 > FILE: ..\src\main\activemq\core\ActiveMQSessionExecutor.cpp, LINE: 192 > and keeps on going > - Sometimes it crashes with the following when running a Debug build on > Windows: > --------------------------- > Microsoft Visual C++ Debug Library > --------------------------- > Debug Assertion Failed! > Program: ... > File: C:\Program Files\Microsoft Visual Studio 8\VC\include\list > Line: 776 > Expression: list erase iterator outside range > For information on how your program can cause an assertion > failure, see the Visual C++ documentation on asserts. > (Press Retry to debug the application) > --------------------------- > Abort Retry Ignore > --------------------------- > - Sometimes it crashes with something along these lines: > --------------------------- > vs2005-activemq-example.exe - Application Error > --------------------------- > The instruction at "0x0053dd80" referenced memory at "0xdddddddd". The memory > could not be "read". > Click on OK to terminate the program > Click on CANCEL to debug the program > --------------------------- > OK Cancel > --------------------------- > The relevant thread's stack trace looks like this: > > vs2005-activemq-example.exe!activemq::core::ActiveMQSession::close() > > Line 110 + 0x8 bytes C++ > > vs2005-activemq-example.exe!activemq::core::ActiveMQSession::~ActiveMQSession() > Line 74 + 0x8 bytes C++ > vs2005-activemq-example.exe!activemq::core::ActiveMQSession::`scalar > deleting destructor'() + 0xf bytes C++ > vs2005-activemq-example.exe!test_transaction(const > std::basic_string<char,std::char_traits<char>,std::allocator<char> > & > url="tcp://localhost:61613?wireFormat=stomp") Line 78 + 0x37 bytes C++ > vs2005-activemq-example.exe!main(int argc=1, char * * argv=0x003558c8) > Line 85 + 0x30 bytes C++ > vs2005-activemq-example.exe!__tmainCRTStartup() Line 597 + 0x19 bytes > C > vs2005-activemq-example.exe!mainCRTStartup() Line 414 C > It crashes where it's doing resource->close() because resource points to > garbage. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.