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

Robert Joseph Evans commented on STORM-120:
-------------------------------------------

We have been running topologies similar to yours for a long time now and have 
never seen this happen, but it sounds like this is very simple for you to 
reproduce this, which is great for us to try and fix it.  The trick is that we 
need to understand why multiple threads are calling that code at the same time 
for the same counter, and just reading through the code I don't see anything 
obvious about how that is happening.

If you could create a small topology that reproduces this issue reliably that 
you are willing to share with the community then we can dig into it and see 
what is happening.  If would rather I can try and walk you through some 
debugging of your existing topology, but that is going to be more difficult.  
My biggest question is if the stack traces are all the same when this happens?  
If you can capture as many of these stack traces as possible, it would be very 
helpful.

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

Reply via email to