Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DF3F11C4C for ; Mon, 16 Jun 2014 15:30:39 +0000 (UTC) Received: (qmail 58265 invoked by uid 500); 16 Jun 2014 15:30:39 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 58232 invoked by uid 500); 16 Jun 2014 15:30:39 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 58219 invoked by uid 99); 16 Jun 2014 15:30:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2014 15:30:38 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [212.23.1.7] (HELO smarthost01d.mail.zen.net.uk) (212.23.1.7) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2014 15:30:30 +0000 Received: from [82.68.189.22] (helo=Clive-Lilleys-MacBook-Pro.local) by smarthost01d.mail.zen.net.uk with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WwYrI-0000wa-1B for users@qpid.apache.org; Mon, 16 Jun 2014 15:30:08 +0000 Message-ID: <539F0D7F.604@ckjltd.co.uk> Date: Mon, 16 Jun 2014 16:30:07 +0100 From: CLIVE Reply-To: users@qpid.apache.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: qpid::messaging::Sender::getUnsettled causes segmentation fault References: <539EDA3F.3050903@ckjltd.co.uk> In-Reply-To: <539EDA3F.3050903@ckjltd.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Originating-smarthost01d-IP: [82.68.189.22] X-Virus-Checked: Checked by ClamAV on apache.org I have associated this, and several other messaging API issues with QPID-5828. On 16/06/2014 12:51, CLIVE wrote: > Hi, > > Encountered a condition that causes a certain usage of the > qpid::messaging API to segmentation fault. > > The following code will cause the failure (QpidBroker is just a class > that starts and stops a QPID broker) > > QpidBroker broker; > broker.start(5); > > qpid::messaging::Connection connection("localhost",""); > connection.open(); > > qpid::messaging::Session session = connection.createSession(); > qpid::messaging::Sender sender = > session.createSender("amq.topic/fred"); > > sender.setCapacity(100); > > // Stop the broker to simulate a broker/network failure, > broker.stop(2); > > // Send messages, but do not send more than > // capacity/4 as this causes a flush in the > // sender implementation. > for(uint32_t x=0; x < 10; ++x){ > qpid::messaging::Message message; > message.setContent(content + " : " + > boost::lexical_cast(x)); > try { > sender.send(message,false); > } > catch(const qpid::types::Exception& qme){ > // EACH 'send' INVOCATION WILL CAUSE AN EXCEPTION REPORTING > // NO CONNECTION. BUT MESSAGE WILL BE STORED IN THE SENDERS > // OUTGOING QUEUE (ASSUMING THE SENDERS FLUSH MECHANISM > // HASN'T BEEN ACTIVATED). > // > // IF THE OUTGOING QUEUE OF THE SENDER IMPLEMENTATION > // IS NON-ZERO A CALL TO 'getUnsettled' WILL CAUSE A > SEGMENTATION > // FAULT. > sender.getUnsettled(); > } > } > > Stack trace is: > > #0 0x00007f7051c2dcc6 in > boost::shared_ptr::operator*() const () > from libqpidclient.so.2 > #1 0x00007f7051c2dbc0 in qpid::client::CompletionImpl::isComplete() > () from libqpidclient.so.2 > #2 0x00007f7051c2d91d in qpid::client::Completion::isComplete() () > from libqpidclient.so.2 > #3 0x00007f70521a551f in > qpid::client::amqp0_10::SenderImpl::checkPendingSends(bool, > qpid::sys::ScopedLock const&) () from > libqpidmessaging.so.2 > #4 0x00007f70521a544b in > qpid::client::amqp0_10::SenderImpl::checkPendingSends(bool) () from > /libqpidmessaging.so.2 > #5 0x00007f70521a5a8c in > qpid::client::amqp0_10::SenderImpl::CheckPendingSends::operator()() () > from libqpidmessaging.so.2 > #6 0x00007f70521a6bbd in bool > qpid::client::amqp0_10::SessionImpl::execute (qpid::client::amqp0_10::SenderImpl::CheckPendingSends&) () from > libqpidmessaging.so.2 > #7 0x00007f70521a4d05 in > qpid::client::amqp0_10::SenderImpl::getUnsettled() () from > libqpidmessaging.so.2 > #8 0x00007f70521b9347 in qpid::messaging::Sender::getUnsettled() () > from/libqpidmessaging.so.2 > > Should I create a JIRA? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org > For additional commands, e-mail: users-help@qpid.apache.org > > . > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org