Red Hat Bugzilla – Bug 506285
qpid::sys::Mutex throws exception in destructor
Last modified: 2011-08-12 12:21:15 EDT
If this ever occurs when already handling an exception the process will be terminated, thus it is fundamentally unsafe.
Created attachment 348133 [details]
This replaces the exception with an abort, hopefully making the error more visible and easier to identify.
Created attachment 348148 [details]
This extends the same treatment to the destructor of the Condition class also.
Created attachment 348321 [details]
Prints an error statement before the abort.
Created attachment 348322 [details]
The following test if built against the fixed library should result in an abort. Built against an earlier revision (with NDEBUG), it should throw an exception that is caught, and then exit 'normally' i.e. with 0 exit code - this is the _wrong_ behaviour.
 g++ -DNDEBUG -lqpidcommon test.cpp -o test
Fix is in -18 and -19.
Below is the link to the current hotfix that we've made available to (primarily) address the issues with the server heartbeat functionality:
This has both the RHEL4 and RHEL5 versions. Packages for hotfix have version 0.5.752581-20 for qpidc package set and rhm-0.5.3206-4.el4 or rhm-0.5.3206-5.el5 for the store (just a different revision number for RHEL4 and RHEL5).
Note that upgrading the store is a *must* and will not unfortunately be picked up if you simply install the qpid packages (but qpidd will then core on starting if the store module is loaded).
Reproduced and verified on RHEL5 i386
== on qpidc-devel 0.5.752581-17 ==
rhel5:~# ./test; echo $?
Failure on main thread: Device or resource busy (/usr/include/qpid/sys/posix/Mutex.h:112)
== on qpidc-devel 0.5.752581-22 ==
rhel5:~# ./test; echo $?
Device or resource busy
Verified on RHEL5 x86_64, qpidc-devel 0.5.752581-22
I am unable to reproduce/verify it on RHEL4 the same way
I did it on RHEL5. Any hints?
It did not complain when compiling without -I... but despite that
it is vital.
g++ -DNDEBUG -I/usr/include/qpid-boost -lqpidcommon test.cpp -o test
Verified also on qpidc-devel-0.5.752581-21.el4, RHEL4, both archs
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.