[
https://issues.apache.org/jira/browse/STORM-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14493198#comment-14493198
]
ASF GitHub Bot commented on STORM-737:
--------------------------------------
GitHub user HeartSaVioR opened a pull request:
https://github.com/apache/storm/pull/521
[STORM-737] Check task->node+port with read lock to prevent sending to
closed connection
It's based on Nathan's comment, please refer to
https://github.com/apache/storm/pull/349#issuecomment-87778672
https://github.com/apache/storm/commit/861a92eab8740cfc0f83ac4d7ade9a2ab04a8b9b
seems to make a regression.
But it also introduces optimizations of sending, it shouldn't be discarded.
I changed send logic to let TransferDrainer matches task to node+port so
then we can still enjoy optimization of sending logic.
I'm still not familiar with clojure so please review and comment if it can
be optimized.
Thanks!
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HeartSaVioR/storm STORM-737
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/521.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #521
----
commit a1d7b3eb343f304565fe24fb7e0151bfbcb3824e
Author: Jungtaek Lim <[email protected]>
Date: 2015-04-13T22:16:37Z
While sending tuple, check task->node+port with read lock
* we can ensure task->node+port is safe within read lock
** refer write lock inside of mk-refresh-connections
* Let TransferDrainer matches task to node+port
** So then we can still enjoy optimization of sending logic
----
> Workers may try to send to closed connections
> ---------------------------------------------
>
> Key: STORM-737
> URL: https://issues.apache.org/jira/browse/STORM-737
> Project: Apache Storm
> Issue Type: Bug
> Affects Versions: 0.9.2-incubating
> Reporter: Derek Dagit
>
> There is a race condition in the worker code that can allow for a send() to
> be called on a closed connection.
> [Discussion|https://github.com/apache/storm/pull/349#issuecomment-87778672]
> The assignment mapping from task -> node+port needs to be read and used in
> the read lock when sending, so that an accurate mapping is used that does not
> include any connections that are closed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)