[Ace-users] [ace-bugs] [ACE_TP_Reactor]: [Event_Handler suspension
not honored for handle_close]
hal.black at gmail.com
Thu Jul 26 12:51:52 CDT 2007
ACE VERSION: 5.5
HOST MACHINE and OPERATING SYSTEM: RedHat ES 3, gcc-4.1.1
ACE_HAS_NOTIFICATION_QUEUE is defined
AREA/CLASS/EXAMPLE AFFECTED: ACE_TP_Reactor
DOES THE PROBLEM AFFECT:
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
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
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
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
Happens intermittently. Call reactor->notify(event_handler).
SAMPLE FIX/WORKAROUND: Haven't found one
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ace-users