[
https://issues.apache.org/jira/browse/STORM-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942381#comment-13942381
]
Patrick Lucas commented on STORM-120:
-------------------------------------
We are also affected by this, seemingly every time we increase the number of
tasks of an intensive bolt above the number of executors. It's not clear to me
why there would be a threadsafety issue here—aren't executors single-threaded
by definition? And wouldn't there be one {{shuffle-grouper}} per executor per
downstream component?
I would appreciate an increase of the priority of this ticket, as we seem to be
wholly unable to increase our task/executor-level parallelism.
Here's an example of the traceback we see:
{code}
java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.IndexOutOfBoundsException: Index: 10, Size: 10
at
backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:107)
at
backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:78)
at
backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:77)
at
backtype.storm.daemon.executor$eval3918$fn__3919$fn__3931$fn__3978.invoke(executor.clj:745)
at backtype.storm.util$async_loop$fn__384.invoke(util.clj:433)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: java.lang.IndexOutOfBoundsException:
Index: 10, Size: 10
at backtype.storm.task.ShellBolt.execute(ShellBolt.java:164)
at
backtype.storm.daemon.executor$eval3918$fn__3919$tuple_action_fn__3921.invoke(executor.clj:630)
at
backtype.storm.daemon.executor$mk_task_receiver$fn__3839.invoke(executor.clj:398)
at
backtype.storm.disruptor$clojure_handler$reify__1560.onEvent(disruptor.clj:58)
at
backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:104)
... 6 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 10, Size: 10
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at backtype.storm.util$acquire_random_range_id.invoke(util.clj:641)
at
backtype.storm.daemon.executor$mk_shuffle_grouper$fn__3601.invoke(executor.clj:44)
at backtype.storm.daemon.task$mk_tasks_fn$fn__3372.invoke(task.clj:158)
at
backtype.storm.daemon.executor$eval3918$fn__3919$fn__3931$bolt_emit__3958.invoke(executor.clj:660)
at
backtype.storm.daemon.executor$eval3918$fn__3919$fn$reify__3964.emit(executor.clj:695)
at backtype.storm.task.OutputCollector.emit(OutputCollector.java:203)
at backtype.storm.task.ShellBolt.handleEmit(ShellBolt.java:232)
at backtype.storm.task.ShellBolt.access$500(ShellBolt.java:66)
at backtype.storm.task.ShellBolt$1.run(ShellBolt.java:129)
... 1 more
{code}
> util/acquire-random-range-id is not thread-safe
> -----------------------------------------------
>
> Key: STORM-120
> URL: https://issues.apache.org/jira/browse/STORM-120
> Project: Apache Storm (Incubating)
> Issue Type: Bug
> Reporter: James Xu
> Priority: Minor
>
> https://github.com/nathanmarz/storm/issues/724
> Concurrent calls to util/acquire-random-range-id with the same parameters can
> result in an IndexOutOfBoundsException, as an increment in one thread may
> occur after the bounds check in another. The resulting curr value can be >=
> the size of the List state.
> https://github.com/nathanmarz/storm/blob/fc5fbb8b352cf91050cdde4a9f9e77e673ab7f48/storm-core/src/clj/backtype/storm/util.clj#L606
--
This message was sent by Atlassian JIRA
(v6.2#6252)