Uploaded image for project: 'HERAS-AF XACML Core'
  1. XACMLCORE-230

Potential race condition in InitializerExecutor

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: 1.0.3.RELEASE
    • Fix versions: 1.0.4.RELEASE
    • Components: Initializers
    • Labels:
      None
    • Number of Attachments:
      0
    • Number of Comments:
      2
    • Sprint:

      Description

      The method InitializerExecutor::runInitializers(SimplePDPConfiguration) checks whether the initializers already ran and only executes the initializers if the test yields false.

      However, the test is broken and allows for a race condition if multiple threads compete for the initialization of the same PDP instance. The initializers may execute multiple times in a multi-threaded scenario.

      If we indeed need to protect a PDP form being initialized concurrently by multiple threads, then the test has to be changed to something like this:

      if (!initializersRan.compareAndSet(false, true)) {
          // run initializers
      }
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: