Bug 970668 - qpid segfaults in qpid::ha::BrokerReplicator::disconnected
Summary: qpid segfaults in qpid::ha::BrokerReplicator::disconnected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 2.3
Hardware: All
OS: Linux
high
high
Target Milestone: 3.0
: ---
Assignee: Alan Conway
QA Contact: Irina Boverman
URL:
Whiteboard:
Depends On:
Blocks: 1030608
TreeView+ depends on / blocked
 
Reported: 2013-06-04 14:36 UTC by Pavel Moravec
Modified: 2018-12-09 17:02 UTC (History)
8 users (show)

Fixed In Version: qpid-cpp-0.22-30
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1030608 (view as bug list)
Environment:
Last Closed: 2014-09-24 15:08:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:1296 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.0 Release 2014-09-24 19:00:06 UTC

Description Pavel Moravec 2013-06-04 14:36:47 UTC
Description of problem:
When playing with newHA active-passive cluster (dont recall any details though), my broker segfaulted. Attached is abrt report.


Version-Release number of selected component (if applicable):
qpid-cpp-*-0.18-14


How reproducible:
???


Steps to Reproduce:
???


Actual results:
qpidd segfaults


Expected results:
no segfault


Additional info:

Comment 2 Pavel Moravec 2013-06-07 14:12:52 UTC
Reproducer:
- having usual cluster.conf (as per docs)
- relocating primary service (this can happen automatically after a primary broker failure / stop):

while true; do for i in 1 2 3; do clusvcadm -r service:qpidd-primary-service service:node${i}-qpidd-service; sleep 3; clustat; done; done

Comment 3 Pavel Moravec 2013-06-07 15:01:57 UTC
What's wrong:

(gdb) frame 8
#8  qpid::ha::BrokerReplicator::disconnected (this=0x1dba220) at qpid/ha/BrokerReplicator.cpp:878
878	    QPID_LOG(info, logPrefix << "Disconnected from " << primary);
(gdb) p logPrefix
$11 = "\000\000\000", <incomplete sequence \375>
(gdb) 

i.e. logPrefix is null. Why??

Comment 4 Alan Conway 2013-06-07 15:49:01 UTC
Possibly a race where BrokerReplicator is disconnected after being deleted, it might be fixed on trunk I recall a fix along those lines. Can you reproduce easily?

Comment 5 Pavel Moravec 2013-06-10 11:03:57 UTC
(In reply to Alan Conway from comment #4)
> Possibly a race where BrokerReplicator is disconnected after being deleted,
> it might be fixed on trunk I recall a fix along those lines. Can you
> reproduce easily?

When I generate lots of clients (dis)connections like using below script, then it's almost certainty to get the segfault in 30 minutes on one node:


min=3
while true; do
	for i in 1 2 3; do
		if [ $(ps aux | grep qpid-send | grep -c "node${i}") -lt $min ]; then
			qpid-send -a "amq.fanout" -m 1 -b node${i} --connection-option="{reconnect:true, 'reconnect_limit':'1000', 'reconnect_interval_max':0 }" &
		fi
	done
done

Comment 6 Alan Conway 2013-10-16 21:36:42 UTC
I can't reproduce on the current 0.22-mrg which is at 

6006677 bz1019645: QPID-5239: preserve type of 'annotations' i.e. application properties added by broker

Please confirm if the bug still exists.

Comment 7 Pavel Moravec 2013-10-17 09:54:42 UTC
(In reply to Alan Conway from comment #6)
> I can't reproduce on the current 0.22-mrg which is at 
> 
> 6006677 bz1019645: QPID-5239: preserve type of 'annotations' i.e.
> application properties added by broker
> 
> Please confirm if the bug still exists.

Indeed, I can't replicate it further as well.

Closing it.

Comment 12 errata-xmlrpc 2014-09-24 15:08:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-1296.html


Note You need to log in before you can comment on or make changes to this bug.