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

Johnny Willemsen jwillemsen at remedy.nl
Thu Jul 26 13:17:40 CDT 2007


Hi,
 
Thanks for using the PRF form. Several problems have been fixed in the
TP_Reactor after the release of 5.5. Please upgrade to 5.5.9
 
Regards,
 
Johnny Willemsen
Remedy IT
Postbus 101
2650 AC  Berkel en Rodenrijs
The Netherlands
www.theaceorb.nl / www.remedy.nl 

*** Integrated compile and test statistics see
http://scoreboard.theaceorb.nl <http://scoreboard.theaceorb.nl/>  ***
*** Commercial service and support for ACE/TAO/CIAO             ***
*** See http://www.theaceorb.nl/en/support.html                 *** 


________________________________

	From: ace-bugs-bounces at cse.wustl.edu
[mailto:ace-bugs-bounces at cse.wustl.edu] On Behalf Of Hal Black
	Sent: Thursday, July 26, 2007 7:52 PM
	To: ace-bugs at cse.wustl.edu
	Subject: [ace-bugs] [ACE_TP_Reactor]: [Event_Handler suspension not
honoredfor handle_close]
	
	
	    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: 
	        EXECUTION? Yes
	
	    SYNOPSIS: Event_Handler suspension not honored for handle_close
	
	    DESCRIPTION:
	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
	
	




More information about the Ace-users mailing list