&nbsp;&nbsp;&nbsp; ACE VERSION: 5.5<br><br>&nbsp;&nbsp;&nbsp; HOST MACHINE and OPERATING SYSTEM: RedHat ES 3, gcc-4.1.1<br>&nbsp;&nbsp;&nbsp;&nbsp; ACE_HAS_NOTIFICATION_QUEUE is defined<br><br>&nbsp;&nbsp;&nbsp; AREA/CLASS/EXAMPLE AFFECTED: ACE_TP_Reactor<br><br>&nbsp;&nbsp;&nbsp; DOES THE PROBLEM AFFECT:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXECUTION? Yes<br><br>&nbsp;&nbsp;&nbsp; SYNOPSIS: Event_Handler suspension not honored for handle_close<br><br>&nbsp;&nbsp;&nbsp; DESCRIPTION:<br>handle_close on an event handler is getting called by two threads in the same thread pool using the same ACE_TP_Reactor.&nbsp; One call is from a -1 return from an the default handle_exception event (which was triggered earlier via reactor-&gt;notify) and the other is a -1 return from a handle_input.
<br><br>The problem is intermittent and doesn&#39;t happen every time.<br><br>The sequence of events is this<br><br>handle_close is called with mask of 4 (but doesn&#39;t exit)<br>handle_close is called again by another thread with mask of 1
<br>handle_close with mask of 1 exits<br>segfault before handle_close with mask of 4 exits.<br>The stack trace is usually corrupted, but sometimes reports reactor-&gt;remove_handler()<br><br>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.&nbsp; The bad thing is, there is a another thread using that object that shouldn&#39;t be. 
<br><br>The threads calling handle_close are the correct threads that are associated with that thread pool.&nbsp; They&#39;re not doing anything fancy, just calling handle_events.<br><br>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.&nbsp; So what&#39;s going on here?&nbsp; Is this a mistaken interpretation by me?&nbsp; Is there a known bug in this version?&nbsp; Or is something else entirely going on?
<br><br>&nbsp;&nbsp;&nbsp; REPEAT BY:<br>&nbsp;&nbsp;&nbsp; Happens intermittently.&nbsp; Call reactor-&gt;notify(event_handler).<br><br>&nbsp;&nbsp;&nbsp; SAMPLE FIX/WORKAROUND: Haven&#39;t found one<br><br>