[
https://issues.apache.org/jira/browse/STORM-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14549239#comment-14549239
]
ASF GitHub Bot commented on STORM-737:
--------------------------------------
GitHub user HeartSaVioR opened a pull request:
https://github.com/apache/storm/pull/557
[STORM-737] Check task->node+port with read lock to prevent sending to
closed connection
* we can ensure task->node+port is safe within read lock
** refer write lock inside of mk-refresh-connections
* don't group messages from transfer-fn cause we'll match task->node+port
later
* Let TransferDrainer groups message to node+port by referring task id
** So then we can still enjoy optimization of sending logic
Actually it's another approach from #521, but this changeset is cleaner so
I'd like to move on this PR.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HeartSaVioR/storm STORM-737-2nd-appraoch
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/557.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 #557
----
commit 6ef2f11e9eade772c8ae67a6410d537871739938
Author: Jungtaek Lim <[email protected]>
Date: 2015-05-13T22:50:45Z
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
* don't group messages from transfer-fn cause we'll match task->node+port
later
* Let TransferDrainer groups message to node+port by referring task id
** 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)