Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 18222 invoked from network); 26 Aug 2009 21:11:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 21:11:42 -0000 Received: (qmail 7568 invoked by uid 500); 26 Aug 2009 21:11:42 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 7503 invoked by uid 500); 26 Aug 2009 21:11:41 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 7493 invoked by uid 99); 26 Aug 2009 21:11:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 21:11:41 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 21:11:31 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MgPlu-0000Gn-Of for dev@activemq.apache.org; Wed, 26 Aug 2009 14:11:10 -0700 Message-ID: <25158290.post@talk.nabble.com> Date: Wed, 26 Aug 2009 14:11:10 -0700 (PDT) From: A_MAJUM To: dev@activemq.apache.org Subject: ActiveMQ CPP -- program crashes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: abhijit.majumdar@pivotalsys.com X-Virus-Checked: Checked by ClamAV on apache.org Hi I am trying to use ActiveMQ-CPP in my application. Everything went fine --- but all the hell broke loose when I restarted the ActiveMQ broker. When the broker is stopped my onException function is invoked. I set a flag there and in a different function I close the connection and session objects. It looks like ultimately closing a session or connection will try to flush the socket output stream --- this gives rise to broken pipe error and my application crashes. Please help me!! I cannot proceed without fixing this issue as it makes our product extremely unreliable. If there is any work-around, please let me know. I went through the forum found some similar issues, but not exactly like my case. Those issues are old too. Note that I can reproduce this issue EVERY SINGLE TIME. I am attaching a small program to reproduce it. I cut down the chat example to the bare minimum and tried to recreate the issue in cleanup(). After starting the program I stopped the broker. Although no broken pipe is displayed on the screen it stopped suddenly without going through the entire cleanup() function. The gdb shows there is a broken pipe problem (trace is given below). I am using -- 1. activemq 5.20 2. activemq-CPP 3.0.1 3. apr 1.3.5 4. apr-util 1.3.8 5. Fedora core 9 The backtrace of gdb --- #0 0x00110416 in __kernel_vsyscall () #1 0x0024b00b in write () from /lib/libc.so.6 #2 0x0012a1e8 in apr_socket_send (sock=0x8c16620, buf=0x8c0f830 "", len=0xbf8fde84) at network_io/unix/sendrecv.c:41 #3 0x009b26b0 in decaf::net::SocketOutputStream::write (this=0x8c0f130, buffer=0x8c0f830 "", offset=0, len=50) at decaf/net/SocketOutputStream.cpp:96 #4 0x0099747b in decaf::io::BufferedOutputStream::emptyBuffer (this=0x8c0f778) at decaf/io/BufferedOutputStream.cpp:96 #5 0x00997b7d in decaf::io::BufferedOutputStream::flush (this=0x8c0f778) at decaf/io/BufferedOutputStream.cpp:113 #6 0x00801e90 in decaf::io::FilterOutputStream::flush (this=0x8c0fca8) at ./decaf/io/FilterOutputStream.h:189 #7 0x008327df in activemq::transport::IOTransport::oneway (this=0x8c0efa0, command=@0xbf8fe144) at activemq/transport/IOTransport.cpp:131 #8 0x00833e00 in activemq::transport::TransportFilter::oneway (this=0x8c0eff8, command=@0xbf8fe144) at ./activemq/transport/TransportFilter.h:129 #9 0x0087fde8 in activemq::wireformat::openwire::OpenWireFormatNegotiator::oneway (this=0x8c0fd58, command=@0xbf8fe144) at activemq/wireformat/openwire/OpenWireFormatNegotiator.cpp:76 #10 0x00837195 in activemq::transport::correlator::ResponseCorrelator::oneway (this=0x8c0feb8, command=@0xbf8fe144) at activemq/transport/correlator/ResponseCorrelator.cpp:58 #11 0x007bc657 in activemq::core::ActiveMQConnection::oneway (this=0x8c0ff90, command= { = {counter = 0xbf8fe138}, _vptr.Pointer = 0xbf8fe144, value = 0x13354a}) at activemq/core/ActiveMQConnection.cpp:547 #12 0x007bde96 in activemq::core::ActiveMQConnection::disposeOf (this=0x8c0ff90, objectId=@0xbf8fe1d0) at activemq/core/ActiveMQConnection.cpp:597 #13 0x007ebbc9 in activemq::core::ActiveMQSession::close (this=0x8c3cb68) at activemq/core/ActiveMQSession.cpp:155 #14 0x0804975d in HelloWorldProducer::cleanup () #15 0x08049ce1 in HelloWorldProducer::run () #16 0x080491a8 in main () thanks in advance Abhi http://www.nabble.com/file/p25158290/producer.cpp producer.cpp -- View this message in context: http://www.nabble.com/ActiveMQ-CPP----program-crashes-tp25158290p25158290.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.