From a4c64259aadf6b6f0b20bba3229a71d7ebbd4b98 Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Wed, 12 Jan 2005 06:42:48 +0000 Subject: ChangeLogTag:Tue Jan 11 22:32:47 2005 Ossama Othman --- ChangeLog | 14 ++++++++++++-- ace/Dev_Poll_Reactor.cpp | 11 ++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index bcbb496d1c5..008060e38ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Tue Jan 11 22:32:47 2005 Ossama Othman + + * ace/Dev_Poll_Reactor.cpp (remove_handler_i): + + Release the lock during the "close" upcall. Fixes a deadlock + that occurred when cancelling a timer during removal of an event + handler from the reactor. Thanks to gxc for + reporting the problem and confirming that this change fixes the + problem. + Wed Jan 12 00:12:03 2005 Balachandran Natarajan * ace/OS_NS_signal.inl: @@ -5,7 +15,7 @@ Wed Jan 12 00:12:03 2005 Balachandran Natarajan Fixed a compile error with the following checkin "Tue Jan 11 18:14:22 2005 Steve Huston ". Not sure whether this is going to break aCC. The existing code broke - atleast g++ 3.3.4. Need to sync with Steve on this. + atleast g++ 3.3.4. Need to sync with Steve on this. Tue Jan 11 18:14:22 2005 Steve Huston @@ -14,7 +24,7 @@ Tue Jan 11 18:14:22 2005 Steve Huston of ACE_OS::sigaction() vs. sigaction(). Added "::" to the sigaction type specifiers in the signature to resolve the confusion between the sigaction type and ACE_OS::sigaction. - + Mon Jan 10 12:41:23 2005 Steve Huston * tests/Test_Output.cpp (close): If the output_file_ pointer is diff --git a/ace/Dev_Poll_Reactor.cpp b/ace/Dev_Poll_Reactor.cpp index ef5b287046d..da74933376f 100644 --- a/ace/Dev_Poll_Reactor.cpp +++ b/ace/Dev_Poll_Reactor.cpp @@ -1723,7 +1723,16 @@ ACE_Dev_Poll_Reactor::remove_handler_i (ACE_HANDLE handle, return -1; if (ACE_BIT_DISABLED (mask, ACE_Event_Handler::DONT_CALL)) - (void) eh->handle_close (handle, mask); + { + // Release the lock during the "close" upcall. + ACE_Reverse_Lock reverse_lock (this->lock_); + ACE_GUARD_RETURN (ACE_Reverse_Lock, + reverse_guard, + reverse_lock, + -1); + + (void) eh->handle_close (handle, mask); + } // Note the fact that we've changed the state of the wait_set, // i.e. the "interest set," which is used by the dispatching loop to -- cgit v1.2.1