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

ASF GitHub Bot commented on STORM-260:
--------------------------------------

GitHub user apetresc opened a pull request:

    https://github.com/apache/incubator-storm/pull/50

    Fix race condition in Time.java

    Some of my test runs were occasionally failing with a NullPointerException 
on `backtype.storm.utils.Time.java:64`.
    
    After a bit of investigation, it seems there's a race condition here; if we 
disable simulating mode while a thread is currently sleeping, then when it 
wakes up it won't re-check if it's still in "simulating" mode, it'll try to 
remove the sleep time, and get the NPE.
    
    Refs [STORM-260](https://issues.apache.org/jira/browse/STORM-260).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apetresc/incubator-storm patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-storm/pull/50.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 #50
    
----
commit 28e65a82bfcd60f38c93115974f6a8653756f9b5
Author: Adrian Petrescu <[email protected]>
Date:   2014-03-21T21:17:40Z

    Fix race condition in Time.java
    
    Some of my test runs were occasionally failing with a NullPointerException 
on `backtype.storm.utils.Time.java:64`.
    
    After a bit of investigation, it seems there's a race condition here; if we 
disable simulating mode while a thread is currently sleeping, then when it 
wakes up it won't re-check if it's still in "simulating" mode, it'll try to 
remove the sleep time, and get the NPE.
    
    Refs [STORM-260](https://issues.apache.org/jira/browse/STORM-260).

----


> Race condition in backtype.storm.utils.Time
> -------------------------------------------
>
>                 Key: STORM-260
>                 URL: https://issues.apache.org/jira/browse/STORM-260
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>    Affects Versions: 0.9.2-incubating
>            Reporter: Adrian Petrescu
>            Priority: Minor
>              Labels: patch, test
>         Attachments: patch_commit_ae6a0eaf21e1.patch
>
>
> Some of my test runs were occasionally failing with a NullPointerException on 
> [backtype.storm.utils.Time.java:64|https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/backtype/storm/utils/Time.java#L64].
> After a bit of investigation, it seems there's a race condition here; if we 
> disable simulating mode while a thread is currently sleeping, then when it 
> wakes up it won't re-check if it's still in "simulating" mode, it'll try to 
> remove the sleep time, and get the NPE.
> The attached patch is a fairly straightforward fix.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to