Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 91581 invoked from network); 28 Aug 2009 18:09:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Aug 2009 18:09:07 -0000 Received: (qmail 90101 invoked by uid 500); 28 Aug 2009 14:09:06 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 90056 invoked by uid 500); 28 Aug 2009 14:09:06 -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 90039 invoked by uid 99); 28 Aug 2009 14:09:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Aug 2009 14:09:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tabish121@gmail.com designates 74.125.92.145 as permitted sender) Received: from [74.125.92.145] (HELO qw-out-1920.google.com) (74.125.92.145) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Aug 2009 14:08:55 +0000 Received: by qw-out-1920.google.com with SMTP id 14so435193qwa.26 for ; Fri, 28 Aug 2009 07:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=re66S9U25+crlW0L+ZIfigoqK27KfyFZ/B2B98mUTMM=; b=UowL3BlB8N0kZXVKxEVFiF0T3Eqf4eL6TBLv7NSSK8xMvbqTbSrGKnRAi5k3nN6Vj/ 54xyHFsO5Wgifl2G2dRzXBTfd2CtUUR1Qnz2LAKQ32u5diWcHC+YXGELlmhft7xkyuiK CwGGrDFwtmXBBeUiKMGEehQ0tyTuaSl0nxFUg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=jdYW3gcVSTZeGNWCk7okC90lg10YFWBH2CwXaBFI4CdpsIaR+CsLcQCqAzahjSbVdb c3naUMgI+mbZJ+87oiE7QF95j7E5AdcBd95mSxYlKz1KzgEWp7Owoj+14BenAxtTruNn 7a4qqr4HjY8AW/hMMhRNTqWP+RKkBSAi8MWY0= Received: by 10.224.52.221 with SMTP id j29mr1008298qag.347.1251468514124; Fri, 28 Aug 2009 07:08:34 -0700 (PDT) Received: from ?192.168.2.150? (c-69-138-183-90.hsd1.va.comcast.net [69.138.183.90]) by mx.google.com with ESMTPS id 22sm512201qyk.10.2009.08.28.07.08.32 (version=SSLv3 cipher=RC4-MD5); Fri, 28 Aug 2009 07:08:33 -0700 (PDT) Subject: Re: ActiveMQ CPP -- program crashes From: Timothy Bish To: dev@activemq.apache.org In-Reply-To: <25158290.post@talk.nabble.com> References: <25158290.post@talk.nabble.com> Content-Type: text/plain Date: Fri, 28 Aug 2009 10:08:31 -0400 Message-Id: <1251468511.19274.10.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Wed, 2009-08-26 at 14:11 -0700, A_MAJUM wrote: > 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 > I haven't been able to reproduce the error. If you continue to have problems then I'd recommend you open a new Issue in Jira and attach any code samples that would be of use in reproducing the problem so it doesn't get lost. Regards Tim. > > 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 -- Tim Bish http://fusesource.com http://timbish.blogspot.com/