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
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.
RHTS test qpid_test_qmf_agent_bz470167 validates that this issue has been fixed. ->VERIFIED
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