[ace-users] ACE_TP_Reactor:random crash sometimes
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Tue Jun 12 04:47:33 CDT 2007
Hi Mihai,
> First of all thanks for this great tool called ACE. It
> really makes my life much easier.
Great!
> Now here is the problem I have:
>
> ACE_TP_Reactor:random crash sometimes
Thanks very much for using the PRF.
> ACE VERSION: 5.5
ACE 5.5 is rather old, so could you please try upgrading to ACE+TAO+CIAO
x.5.8 (i.e., ACE 5.5.8, TAO 1.5.8, and CIAO 0.5.8), which you can
download from
http://download.dre.vanderbilt.edu
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
http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html
Thus, if you need more "predictable" help for earlier versions of
ACE+TAO, I recommend that you check out
http://www.dre.vanderbilt.edu/support.html
for a list of companies that will provide you with ACE+TAO commercial
support.
Thanks,
Doug
> HOST MACHINE and OPERATING SYSTEM:
> AMD Turion 64 & Windows XP Pro 32
>
> COMPILER NAME AND VERSION (AND PATCHLEVEL):
> Microsoft Visual C++ .NET 2003
>
> THE $ACE_ROOT/ace/config.h FILE :
> #include "ace/config-win32.h"
>
> AREA/CLASS/EXAMPLE AFFECTED:
> ACE_TP_Reactor & Acceptor
>
> DOES THE PROBLEM AFFECT:
> EXECUTION
>
> SYNOPSIS:
> sometimes one thread from ACE_TP_Reactor' pool
> is trying to access a recently removed handle
>
> DESCRIPTION:
> I'm trying to build a server starting from
> examples/APG/TreadPools/TP_Reactor project and I've
> performed the following small modifications:
> I've added a 'ACE_Reactor_Notification_Strategy
> _notifier' to our Request_Handler class and also done
> the proper initialization stuff:
>
> Request_Handler: notifier_ (0, this,
> ACE_Event_Handler::WRITE_MASK)
> Request_Handler::open -> this->notifier_.reactor
> (this->reactor ());
> this->msg_queue
> ()->notification_strategy (&this->notifier_);
>
> I'm also doing a strange thing in handle_input()
>
> int Request_Handler::handle_input() {
> ..............
> ACE_Message_Block *mb = new
> ACE_Message_Block(sizeof(buffer)+1);
> mb->copy(buffer,sizeof(buffer));
> this->putq(mb);
>
> return -1;
> }
>
> int Request_Handler::handle_close (ACE_HANDLE
> fd, ACE_Reactor_Mask)
> {
> ACE_DEBUG ((LM_DEBUG,
> ACE_TEXT ("(%t) svr close; fd: 0x%x\n"),
> fd));
>
> return super::handle_close();
> }
>
> This will cause the program to crash
> sometimes.The 'handle' is removed from reactor and
> deleted but another thread from the thread pool will
> try to output our ACE_Message_Block object from the
> event handler internal queue.
> (5200) handling events ....
> (3672) handling events ....
> (5676) handling events ....
> Request_Handler::open
> (3672) handling events ....
> (5676) handling events ....
> (5200) handling events ....
> (3672) svr input; fd: 0x6d8; input: e
> (3672) svr close; fd: 0x6d8
> (3672) ~Request_Handler()
> (3672) handling events ....
> (5200) handling events .... !!! HERE IT CRASHES
> because the thread 5200 is trying to access the
> previous deleted Request_Handler() object because it
> tries to output our ACE_Message_Block object from the
> event handler internal queue !!!!
>
> Thanks,
> Mihai
>
>
>
>
> ____________________________________________________________________________________
> Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
> http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
>
> _______________________________________________
> ace-users mailing list
> ace-users at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
More information about the Ace-users
mailing list