You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/02/28 18:11:18 UTC

[jira] [Commented] (APEXCORE-362) NPE in StreamingContainerManager

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

ASF GitHub Bot commented on APEXCORE-362:
-----------------------------------------

GitHub user vrozov opened a pull request:

    https://github.com/apache/incubator-apex-core/pull/246

    APEXCORE-362 - NPE in StreamingContainerManager. 

    Fixed race condition between the thread that insert into endWindowStatsOperatorMap and the thread that removes entries when  endWindowStatsOperatorMap exceeds 1000 entries.
    
    @davidyan74 Please cherry pick into all affected releases.

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

    $ git pull https://github.com/vrozov/incubator-apex-core APEXCORE-362

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

    https://github.com/apache/incubator-apex-core/pull/246.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 #246
    
----
commit 0649255ac69ca368e58d42d14de1602c2c13e674
Author: Vlad Rozov <v....@datatorrent.com>
Date:   2016-02-28T17:07:29Z

    APEXCORE-362 - NPE in StreamingContainerManager. Fixed race condition between the thread that insert into endWindowStatsOperatorMap and the thread that removes entries when  endWindowStatsOperatorMap exceeds 1000 entries.

----


> NPE in StreamingContainerManager
> --------------------------------
>
>                 Key: APEXCORE-362
>                 URL: https://issues.apache.org/jira/browse/APEXCORE-362
>             Project: Apache Apex Core
>          Issue Type: Bug
>    Affects Versions: 3.2.0, 3.3.0, 3.2.1, 3.4.0, 3.3.1
>            Reporter: Vlad Rozov
>            Assignee: Vlad Rozov
>
> There is a possible race condition while end window statistics is calculated by application master. While putIfAbsent() and get() are atomic and thread-safe by itself, there is a possibility of thread switch in between, so that entry inserted by putIfAbasent will be removed and get may return null.
> {noformat}
> java.io.IOException: java.lang.NullPointerException
>         at com.datatorrent.stram.StreamingContainerManager.processHeartbeat(StreamingContainerManager.java:1690)
>         at com.datatorrent.stram.StreamingContainerParent$2.run(StreamingContainerParent.java:197)
>         at com.datatorrent.stram.StreamingContainerParent$2.run(StreamingContainerParent.java:193)
>         at com.datatorrent.stram.util.SecureExecutor$1.run(SecureExecutor.java:38)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:356)
>         at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1651)
>         at com.datatorrent.stram.util.SecureExecutor.execute(SecureExecutor.java:35)
>         at com.datatorrent.stram.StreamingContainerParent.processHeartbeat(StreamingContainerParent.java:193)
>         at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.hadoop.ipc.WritableRpcEngine$Server$WritableRpcInvoker.call(WritableRpcEngine.java:514)
>         at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1060)
>         at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2044)
>         at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2040)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:415)
>         at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)
>         at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2038)
> {noformat} 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)