You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Stas Levin (JIRA)" <ji...@apache.org> on 2015/04/12 13:49:12 UTC

[jira] [Commented] (STORM-737) Workers may try to send to closed connections

    [ https://issues.apache.org/jira/browse/STORM-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14491436#comment-14491436 ] 

Stas Levin commented on STORM-737:
----------------------------------

We got the following exception, and I was wondering if it might be related. 
Looks like 'task' in 'mk-transfer-fn' is null, making '(.add remote (TaskMessage. task (.serialize serializer tuple)))' fail (worker.clj:128, storm-core-0.9.2-incubating.jar)

java.lang.RuntimeException: java.lang.NullPointerException
	at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:128) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
	at backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:99) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
	at backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:80) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
	at backtype.storm.disruptor$consume_loop_STAR_$fn__758.invoke(disruptor.clj:94) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
	at backtype.storm.util$async_loop$fn__457.invoke(util.clj:431) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
	at clojure.lang.AFn.run(AFn.java:24) [clojure-1.5.1.jar:na]
	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_72]
Caused by: java.lang.NullPointerException: null
	at clojure.lang.RT.intCast(RT.java:1087) ~[clojure-1.5.1.jar:na]
	at backtype.storm.daemon.worker$mk_transfer_fn$fn__5748.invoke(worker.clj:128) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
	at backtype.storm.daemon.executor$start_batch_transfer__GT_worker_handler_BANG_$fn__5483.invoke(executor.clj:256) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
	at backtype.storm.disruptor$clojure_handler$reify__745.onEvent(disruptor.clj:58) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
	at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:125) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
	... 6 common frames omitted,java.lang.RuntimeException: java.lang.NullPointerException

Any ideas?

> 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)