summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2014-02-14 16:46:09 +0000
committerSteve Huston <shuston@riverace.com>2014-02-14 16:46:09 +0000
commit0b7ec8532dc74dd526d1c70e40e524707a9a2f88 (patch)
treeb961aa35a88e1fa0a1c523f2342d75ca06fda67b
parentc0ddfb4a504a07d6b820acb1e8e556a109ff0afd (diff)
downloadATCD-0b7ec8532dc74dd526d1c70e40e524707a9a2f88.tar.gz
ChangeLogTag:Fri Feb 14 16:34:46 UTC 2014 Steve Huston <shuston@riverace.com>
-rw-r--r--ACE/ChangeLog9
-rw-r--r--ACE/ace/Dev_Poll_Reactor.cpp6
2 files changed, 15 insertions, 0 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index ee9628c898d..dd9586090de 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,12 @@
+Fri Feb 14 16:34:46 UTC 2014 Steve Huston <shuston@riverace.com>
+
+ * ace/Dev_Poll_Reactor.cpp (dispatch_io_event): Do not dispatch to
+ a handler that is suspended. Prevents multiple callbacks to the
+ same handler at the same time when multiple threads are dispatching
+ and changing registrations at the same time. Fixes Bugzilla 4129.
+ Thank you to Alexey Zubko and Howard Finer for both coming up with
+ the same answer independently!
+
Wed Feb 5 19:07:37 UTC 2014 Steve Huston <shuston@riverace.com>
* rpmbuild/ace-tao.spec: Added support for --without tao (and
diff --git a/ACE/ace/Dev_Poll_Reactor.cpp b/ACE/ace/Dev_Poll_Reactor.cpp
index ec0817a070b..81bc9091626 100644
--- a/ACE/ace/Dev_Poll_Reactor.cpp
+++ b/ACE/ace/Dev_Poll_Reactor.cpp
@@ -1176,6 +1176,12 @@ ACE_Dev_Poll_Reactor::dispatch_io_event (Token_Guard &guard)
info = this->handler_rep_.find (handle);
if (info == 0) // No registered handler any longer
return 0;
+ // It is possible another thread has changed (and possibly re-armed)
+ // this handle mask before current thread obtained the repo lock.
+ // If that did happen and this handler is still suspended, don't
+ // dispatch on top of another callback. See Bugzilla 4129.
+ if (info->suspended)
+ return 0;
// Figure out what to do first in order to make it easier to manage
// the bit twiddling and possible pfds increment before releasing