Bug 431928 - Clean shutdown of broker.
Summary: Clean shutdown of broker.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: beta
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: Kim van der Riet
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-07 21:04 UTC by Alan Conway
Modified: 2009-05-07 20:09 UTC (History)
1 user (show)

Fixed In Version: qpidd-0.2-24.el5, qpidc-0.2-24.el5, and rhm-0.2-18.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-29 16:46:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alan Conway 2008-02-07 21:04:43 UTC
Description of problem:

src/qpidd.cpp defines a signal handler to shut down the broker, however
calling Broker::shutdown() directly from the handler is not async-signal safe.

The handler should push a shutdown event into the             
epoll poller (making sure to use only async-safe functions!)             
and let a poller thread actually do the shutdown.   

Requires extension of the Poller to allow polling for non-socket events,
e.g. allow arbitrary file descriptors.

Comment 1 Alan Conway 2008-02-07 21:31:36 UTC
Better solution from astitcher: stopping the poller is async-signal safe, and
causes main() to return so the Broker dtor is called. Move all other shutdown
code (logging, management shutdown) to the broker dtor or to main() after
Broker::run()  

Comment 2 Mike Bonnet 2008-02-29 16:46:55 UTC
Fixed in qpidd-0.2-24.el5, qpidc-0.2-24.el5, and rhm-0.2-18.el5


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