Bug 672388 - Broker Seg Faults on Client Disconnect
Summary: Broker Seg Faults on Client Disconnect
Keywords:
Status: CLOSED DUPLICATE of bug 883469
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Andrew Stitcher
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-25 01:14 UTC by Chris Pitman
Modified: 2013-05-02 20:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-02 20:29:37 UTC
Target Upstream Version:


Attachments (Terms of Use)
Core Dump of qpidd (482.58 KB, application/x-gzip)
2011-01-25 01:31 UTC, Chris Pitman
no flags Details
Backtraces for all threads and rpm versions of source machine (9.15 KB, text/plain)
2011-01-25 17:34 UTC, Chris Pitman
no flags Details

Description Chris Pitman 2011-01-25 01:14:56 UTC
Description of problem:
This fault happens during an automated system test, soon after a client attempts to connect to the faulting broker.  Attached is the core dump from qpidd.  The dump shows the seg fault being triggered by calling Connection::Close, which is pure virtual when called.

Version-Release number of selected component (if applicable):
Amentra Hotfix 4, but the same behavior was seen in Hotfix 3

How reproducible:
Very intermittent, only happens a couple of times a week.

Additional info:

Comment 1 Chris Pitman 2011-01-25 01:31:50 UTC
Created attachment 475096 [details]
Core Dump of qpidd

Comment 2 Gordon Sim 2011-01-25 11:10:51 UTC
I can't get backtraces from that core file on RHEL5.5 using the packages from https://brewweb.devel.redhat.com/buildinfo?buildID=154041. Can you confirm the rpms and platform details?

Even better, can you attach the backtrace for all threads please?

Comment 3 Chris Pitman 2011-01-25 17:34:21 UTC
Created attachment 475223 [details]
Backtraces for all threads and rpm versions of source machine

Comment 4 Gordon Sim 2011-01-25 17:56:25 UTC
Packages specifically for the rpms this core was generated with are available here: https://brewweb.devel.redhat.com/buildinfo?buildID=154016

However this issue will most likely also impact 1.3 general packages as none of the extra fixes are likely to cause this segfault.

Comment 5 Andrew Stitcher 2011-01-28 03:24:32 UTC
Is this broker running clustered or standalone?

Comment 6 Chris Pitman 2011-01-28 04:20:01 UTC
This broker is running standalone.  I believe that the sum of all configuration applied to this broker is in the path reported by the core dump, the configuration file is not used for these tests.

Comment 7 Andrew Stitcher 2011-02-03 16:11:43 UTC
Could you give some more details about what the test is doing? It looks like the crash happens when the client disconnects from a broker, but the original report says it happens shortly after _connecting_. Is the test a one where clients connect and disconnect repeatedly? If so are the disconnects abrupt or orderly?

Comment 8 Chris Pitman 2011-02-07 16:51:29 UTC
This is a test where the client connects after a previous abrupt disconnect.

Comment 9 Andrew Stitcher 2011-02-08 22:38:36 UTC
The crash happens in these lines of code in qpid::broker::Connection::closed()
 in qpid/broker/Connection.cpp:

 294             while (!channels.empty())
>295                 ptr_map_ptr(channels.begin())->handleDetach();

I think the intent here is to iterate over every channel and detach it, presumably a side effect of handleDetach() is to actually remove the channel from the channels map else the map would never end up empty.

In the crashing case what happens is that the Session which is called into here seems to only be partially constructed and so not all of its virtual functions are there yet this causes the call of a non existent pure virtual function.

Generally this happens if the object has already been deleted or in the process of being deleted in another thread when this code runs or even in the process of being created.

Looking at then other threads the Session doesn't seem to be in the process of deletion.

Comment 11 Andrew Stitcher 2012-11-07 20:23:10 UTC
If we are running the same automated test and we're not seeing this behaviour we should close the bug.

Comment 12 Chris Pitman 2012-11-07 21:22:31 UTC
Multithreaded segmentation faults can be highly intermittent. We have not noticed a core recently that duplicates the issue. I would feel better about this defect being closed if there was some change since then that may have fixed it.

Comment 13 Andrew Stitcher 2012-11-08 15:54:37 UTC
I agree with Chris.

Comment 14 Andrew Stitcher 2013-05-02 20:29:37 UTC
This bug seems related to/or a duplicate of Bug 883469.

Since we have not seen it for a long while I'm going to close it as a duplicate.

*** This bug has been marked as a duplicate of bug 883469 ***


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