Bug 470167 - ManagementAgent::Singleton destructor aborts
ManagementAgent::Singleton destructor aborts
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf (Show other bugs)
1.0
All Linux
urgent Severity urgent
: 1.1
: ---
Assigned To: Ted Ross
Jeff Needle
:
Depends On:
Blocks: 469388
  Show dependency treegraph
 
Reported: 2008-11-05 23:09 EST by Matthew Farrellee
Modified: 2011-08-12 12:02 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-04 10:35:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:0035 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 1.1 Release 2009-02-04 10:33:44 EST

  None (edit)
Description Matthew Farrellee 2008-11-05 23:09:56 EST
Using qpid trunk from svn, r711740.

This issue was originally reported: https://bugzilla.redhat.com/show_bug.cgi?id=469388

The code failing for BZ469388 did not shutdown the ManagementAgent::Singleton before exiting. The new code does shut it down, by delete'ing it, and still the daemon aborts.


Code in condor_master...

ManagementAgent::Singleton *singleton;

void
initialize()
{
...
   singleton = new ManagementAgent::Singleton();
...
}

void
shutdown()
{
   dprintf(D_ALWAYS, "MgmtMasterPlugin shutting down...\n");
   dprintf(D_ALWAYS, "...%p\n", singleton);
   if (singleton) {
      dprintf(D_ALWAYS, "...deleting ManagementAgent\n");
      delete singleton;
      singleton = NULL;
      dprintf(D_ALWAYS, "...deleted ManagementAgent\n");
   }
}

Log showing the master abort instead of shutting down cleanly...

11/5 21:57:03 All daemons are gone.  Exiting.
11/5 21:57:03 MgmtMasterPlugin shutting down...
11/5 21:57:03 ...0x85bc7a8
11/5 21:57:03 ...deleting ManagementAgent
Invalid argument
condor_master: /usr/local/include/qpid/sys/posix/Mutex.h:116: void qpid::sys::Mutex::lock(): Assertion `0' failed.
Stack dump for process 18099 at timestamp 1225943823 (12 frames)
./release_dir/sbin/condor_master(dprintf_dump_stack+0xa6)[0x80f095c]
./release_dir/sbin/condor_master[0x80f0b56]
[0x110400]
/lib/libc.so.6(abort+0x101)[0x52bf91]
/lib/libc.so.6(__assert_fail+0xee)[0x52393e]
/home/matt/Documents/Condor/Installation/libexec/MgmtMasterPlugin-plugin.so(_ZN4qpid3sys5Mutex4lockEv+0x60)[0x25b62c]
/usr/local/lib/libqpidclient.so.0(_ZN4qpid6client10Dispatcher3runEv+0x92c)[0x2d62ac]
/usr/local/lib/libqpidclient.so.0(_ZN4qpid6client19SubscriptionManager3runEv+0x35)[0x308385]
/usr/local/lib/libqmfagent.so.0(_ZN4qpid10management19ManagementAgentImpl16ConnectionThread3runEv+0x7b5)[0x347975]
/usr/local/lib/libqpidcommon.so.0[0xf58bc1]
/lib/libpthread.so.0[0x69350b]
/lib/libc.so.6(clone+0x5e)[0x5d4b2e]
zsh: abort      ./release_dir/sbin/condor_master -t -f
Comment 1 Ted Ross 2008-11-06 13:32:59 EST
To verify this fix, use the qmf-agent example.  You are looking for a clean shutdown when you ^C the program (no SEGVs or unhandled exceptions).

Run the example with no broker.  Verify shutdown.

Start a broker and run the example.  Verify shutdown.

Run the example on a broker, stop the broker, then verify shutdown.

The shutdown of qmf-agent should be clean in all cases.
Comment 3 Frantisek Reznicek 2008-11-20 03:47:59 EST
RHTS test qpid_test_qmf_agent_bz470167 validates that this issue has been fixed.
->VERIFIED
Comment 5 errata-xmlrpc 2009-02-04 10:35:51 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0035.html

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