[Ace-users] Re: [ace-bugs] [ACE_TP_Reactor]: [Event_Handler suspension not honored for handle_close]

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Thu Jul 26 13:11:58 CDT 2007

Hi Hal,

   Thanks for using the PRF.

>     ACE VERSION: 5.5

I believe this problem has been fixed in a more recent version of ACE.
Please upgrade to ACE+TAO+CIAO x.5.9 (i.e., ACE 5.5.9, TAO 1.5.9, and
CIAO 0.5.9), which you can download from


under the heading: "Latest Beta Kit".

The DOC groups at Washington University, UC Irvine, and Vanderbilt
University only provide "best effort" support for non-sponsors for the
latest release, as described in


Thus, if you need more "predictable" help for earlier versions of
ACE+TAO, I recommend that you check out


for a list of companies that will provide you with ACE+TAO commercial



>     HOST MACHINE and OPERATING SYSTEM: RedHat ES 3, gcc-4.1.1
>         EXECUTION? Yes
>     SYNOPSIS: Event_Handler suspension not honored for handle_close
> handle_close on an event handler is getting called by two threads in the same thread pool using the same ACE_TP_Reactor. 
> One call is from a -1 return from an the default handle_exception event (which was triggered earlier via reactor->notify)
> and the other is a -1 return from a handle_input.
> The problem is intermittent and doesn't happen every time.
> The sequence of events is this
> handle_close is called with mask of 4 (but doesn't exit)
> handle_close is called again by another thread with mask of 1
> handle_close with mask of 1 exits
> segfault before handle_close with mask of 4 exits.
> The stack trace is usually corrupted, but sometimes reports reactor->remove_handler()
> handle_close does call remove_handler, purge_pending_notifications and all of the usual, with ALL_EVENTS_MASK | DONT_CALL
> and then super::handle_close(). ACE_Svc_Handler::handle_close I believe calls delete on the object, which is good.  The bad
> thing is, there is a another thread using that object that shouldn't be.
> The threads calling handle_close are the correct threads that are associated with that thread pool.  They're not doing
> anything fancy, just calling handle_events.
> As I understand it, the ACE_TP_Reactor is supposed to suspend events on an event handler that is being called by another
> thread until that call returns.  So what's going on here?  Is this a mistaken interpretation by me?  Is there a known bug
> in this version?  Or is something else entirely going on?
>     REPEAT BY:
>     Happens intermittently.  Call reactor->notify(event_handler).
>     SAMPLE FIX/WORKAROUND: Haven't found one
> _______________________________________________
> ace-bugs mailing list
> ace-bugs at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-bugs

More information about the Ace-users mailing list