You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@slider.apache.org by "Gour Saha (JIRA)" <ji...@apache.org> on 2016/07/15 05:15:21 UTC

[jira] [Comment Edited] (SLIDER-1154) Code issues - 21 concurrent data access violations

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

Gour Saha edited comment on SLIDER-1154 at 7/15/16 5:14 AM:
------------------------------------------------------------

[~billie.rinaldi] your analysis makes sense. I reviewed the patch and ran unit tests on them too. Everything looks great.

+1 for the .1 patch. Please check it in.


was (Author: gsaha):
[~billie.rinaldi] your analysis makes sense. I reviewed the patch and ran tests on them too. Everything looks great.

+1 for the .1 patch. Please check it in.

> Code issues - 21 concurrent data access violations
> --------------------------------------------------
>
>                 Key: SLIDER-1154
>                 URL: https://issues.apache.org/jira/browse/SLIDER-1154
>             Project: Slider
>          Issue Type: Bug
>          Components: other
>    Affects Versions: Slider 0.91
>            Reporter: Gour Saha
>            Assignee: Billie Rinaldi
>             Fix For: Slider 1.0.0
>
>         Attachments: SLIDER-1154.1.patch
>
>
> Following 21 possible concurrent data access violations needs to be evaluated and fixed.
> h6. slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
> {code}
> 1594    if (amRegistrationData == null) {
> {code}
> missing_lock: Accessing amRegistrationData without holding lock SliderAppMaster.appState. Elsewhere, "org.apache.slider.server.appmaster.SliderAppMaster.amRegistrationData" is accessed with SliderAppMaster.appState held 5 out of 6 times.
> {code}
> 1614      asyncRMClient.unregisterApplicationMaster(appStatus, appMessage, null);
> {code}
> missing_lock: Accessing asyncRMClient without holding lock SliderAppMaster.appState. Elsewhere, "org.apache.slider.server.appmaster.SliderAppMaster.asyncRMClient" is accessed with SliderAppMaster.appState held 5 out of 7 times.
> {code}
> 1258    agentOpsUrl =
> 1259        "https://" + appMasterHostname + ":" + agentWebApp.getSecuredPort();
> 1260    agentStatusUrl =
> 1261        "https://" + appMasterHostname + ":" + agentWebApp.getPort();
> {code}
> missing_lock: Accessing appMasterHostname without holding lock SliderAppMaster.appState. Elsewhere, "org.apache.slider.server.appmaster.SliderAppMaster.appMasterHostname" is accessed with SliderAppMaster.appState held 8 out of 10 times.
> h6. slider-core/src/main/java/org/apache/slider/server/appmaster/state/AppState.java
> {code}
> 496    return instanceDefinitionSnapshot;
> {code}
> missing_lock: Accessing instanceDefinitionSnapshot without holding lock AppState.this. Elsewhere, "org.apache.slider.server.appmaster.state.AppState.instanceDefinitionSnapshot" is accessed with AppState.this held 2 out of 3 times.
> {code}
> 480    return appConfSnapshot;
> {code}
> missing_lock: Accessing appConfSnapshot without holding lock AppState.this. Elsewhere, "org.apache.slider.server.appmaster.state.AppState.appConfSnapshot" is accessed with AppState.this held 2 out of 3 times.
> {code}
> 484    return internalsSnapshot;
> {code}
> missing_lock: Accessing internalsSnapshot without holding lock AppState.this. Elsewhere, "org.apache.slider.server.appmaster.state.AppState.internalsSnapshot" is accessed with AppState.this held 2 out of 3 times.
> {code}
> 476    return resourcesSnapshot;
> {code}
> missing_lock: Accessing resourcesSnapshot without holding lock AppState.this. Elsewhere, "org.apache.slider.server.appmaster.state.AppState.resourcesSnapshot" is accessed with AppState.this held 2 out of 3 times.
> {code}
> 500    return unresolvedInstanceDefinition;
> {code}
> missing_lock: Accessing unresolvedInstanceDefinition without holding lock AppState.this. Elsewhere, "org.apache.slider.server.appmaster.state.AppState.unresolvedInstanceDefinition" is accessed with AppState.this held 2 out of 3 times.
> {code}
> 387    return failedContainers;
> {code}
> missing_lock: Accessing failedContainers without holding lock AppState.this. Elsewhere, "org.apache.slider.server.appmaster.state.AppState.failedContainers" is accessed with AppState.this held 2 out of 3 times.
> h6. slider-core/src/main/java/org/apache/slider/server/appmaster/state/NodeEntry.java
> {code}
> 283    failedRecently = 0;
> {code}
> missing_lock: Accessing failedRecently without holding lock NodeEntry.this. Elsewhere, "org.apache.slider.server.appmaster.state.NodeEntry.failedRecently" is accessed with NodeEntry.this held 4 out of 5 times.
> h6. slider-core/src/main/java/org/apache/slider/server/appmaster/state/NodeInstance.java
> {code}
> 255    for (NodeEntry entry : nodeEntries) {
> {code}
> missing_lock: Accessing nodeEntries without holding lock NodeInstance.this. Elsewhere, "org.apache.slider.server.appmaster.state.NodeInstance.nodeEntries" is accessed with NodeInstance.this held 8 out of 9 times.
> {code}
> 180    return !nodeState.isUnusable();
> {code}
> missing_lock: Accessing nodeState without holding lock NodeInstance.this. Elsewhere, "org.apache.slider.server.appmaster.state.NodeInstance.nodeState" is accessed with NodeInstance.this held 4 out of 5 times.
> h6. slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java
> {code}
> 168    return escalated;
> {code}
> missing_lock: Accessing escalated without holding lock OutstandingRequest.this. Elsewhere, "org.apache.slider.server.appmaster.state.OutstandingRequest.escalated" is accessed with OutstandingRequest.this held 5 out of 6 times.
> {code}
> 172    return mayEscalate;
> {code}
> missing_lock: Accessing mayEscalate without holding lock OutstandingRequest.this. Elsewhere, "org.apache.slider.server.appmaster.state.OutstandingRequest.mayEscalate" is accessed with OutstandingRequest.this held 4 out of 5 times.
> {code}
> 164    return escalationTimeoutMillis;
> {code}
> missing_lock: Accessing escalationTimeoutMillis without holding lock OutstandingRequest.this. Elsewhere, "org.apache.slider.server.appmaster.state.OutstandingRequest.escalationTimeoutMillis" is accessed with OutstandingRequest.this held 2 out of 3 times.
> h6. slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java
> {code}
>  991    return outstandingRequests.listPlacedRequests();
> {code}
> missing_lock: Accessing outstandingRequests without holding lock RoleHistory.this. Elsewhere, "org.apache.slider.server.appmaster.state.RoleHistory.outstandingRequests" is accessed with RoleHistory.this held 10 out of 14 times.
> {code}
> 1000    return outstandingRequests.listOpenRequests();
> {code}
> missing_lock: Accessing outstandingRequests without holding lock RoleHistory.this. Elsewhere, "org.apache.slider.server.appmaster.state.RoleHistory.outstandingRequests" is accessed with RoleHistory.this held 10 out of 14 times.
> {code}
> 210    if (roleCountInSource != roleSize) {
> {code}
> missing_lock: Accessing roleSize without holding lock RoleHistory.this. Elsewhere, "org.apache.slider.server.appmaster.state.RoleHistory.roleSize" is accessed with RoleHistory.this held 5 out of 7 times.
> {code}
> 1008    return outstandingRequests.escalateOutstandingRequests(now());
> {code}
> missing_lock: Accessing outstandingRequests without holding lock RoleHistory.this. Elsewhere, "org.apache.slider.server.appmaster.state.RoleHistory.outstandingRequests" is accessed with RoleHistory.this held 10 out of 14 times.
> {code}
> 333    NodeInstance nodeInstance = nodemap.get(hostname);
> {code}
> missing_lock: Accessing nodemap without holding lock RoleHistory.this. Elsewhere, "org.apache.slider.server.appmaster.state.RoleHistory.nodemap" is accessed with RoleHistory.this held 16 out of 17 times.
> {code}
> 1015    return outstandingRequests.cancelOutstandingAARequests();
> {code}
> missing_lock: Accessing outstandingRequests without holding lock RoleHistory.this. Elsewhere, "org.apache.slider.server.appmaster.state.RoleHistory.outstandingRequests" is accessed with RoleHistory.this held 10 out of 14 times.



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