Red Hat Bugzilla – Bug 607748
Crash on exit in store cluster tests.
Last modified: 2013-02-24 11:38:04 EST
Description of problem:
Running the store cluster tests frequently leaves a core dump from a crash during exit
Version-Release number of selected component (if applicable):
store rev 4046
qpid rev 957640
How reproducible: easy
Steps to Reproduce:
In store tree
look for core files, repeat as needed. I'm seeing cores almost every time.
Actual results: crashes during exit
Expected results: no crashes.
I'm reproducing this on MRG5, it doesn't reproduce for me on on Fedora 12.
This is an order-of-static-destructors problem. The static_lock defined in JournalImpl.cpp can be destroyed before the broker destructor runs, which destroys JournalImpl which tries to take the static_lock.
Created attachment 426683 [details]
Have the store use the broker's timer.
Attached patch has the store use the broker's timer. This ensures orderly shut down as the brokers destructor will destroy the store first and then the timer. Its also slightly more efficient as there is now a single timer thread in the broker rather than separate threads for broker and store events.