Uploaded image for project: 'Slider'
  1. Slider
  2. SLIDER-1154

Code issues - 21 concurrent data access violations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Slider 0.91
    • Slider 0.92
    • other
    • None

    Description

      Following 21 possible concurrent data access violations needs to be evaluated and fixed.

      slider-core/src/main/java/org/apache/slider/server/appmaster/SliderAppMaster.java
      1594    if (amRegistrationData == null) {
      

      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.

      1614      asyncRMClient.unregisterApplicationMaster(appStatus, appMessage, null);
      

      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.

      1258    agentOpsUrl =
      1259        "https://" + appMasterHostname + ":" + agentWebApp.getSecuredPort();
      1260    agentStatusUrl =
      1261        "https://" + appMasterHostname + ":" + agentWebApp.getPort();
      

      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.

      slider-core/src/main/java/org/apache/slider/server/appmaster/state/AppState.java
      496    return instanceDefinitionSnapshot;
      

      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.

      480    return appConfSnapshot;
      

      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.

      484    return internalsSnapshot;
      

      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.

      476    return resourcesSnapshot;
      

      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.

      500    return unresolvedInstanceDefinition;
      

      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.

      387    return failedContainers;
      

      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.

      slider-core/src/main/java/org/apache/slider/server/appmaster/state/NodeEntry.java
      283    failedRecently = 0;
      

      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.

      slider-core/src/main/java/org/apache/slider/server/appmaster/state/NodeInstance.java
      255    for (NodeEntry entry : nodeEntries) {
      

      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.

      180    return !nodeState.isUnusable();
      

      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.

      slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java
      168    return escalated;
      

      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.

      172    return mayEscalate;
      

      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.

      164    return escalationTimeoutMillis;
      

      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.

      slider-core/src/main/java/org/apache/slider/server/appmaster/state/RoleHistory.java
       991    return outstandingRequests.listPlacedRequests();
      

      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.

      1000    return outstandingRequests.listOpenRequests();
      

      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.

      210    if (roleCountInSource != roleSize) {
      

      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.

      1008    return outstandingRequests.escalateOutstandingRequests(now());
      

      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.

      333    NodeInstance nodeInstance = nodemap.get(hostname);
      

      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.

      1015    return outstandingRequests.cancelOutstandingAARequests();
      

      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.

      Attachments

        1. SLIDER-1154.1.patch
          3 kB
          Billie Rinaldi

        Activity

          People

            billie Billie Rinaldi
            gsaha Gour Saha
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: