Uploaded image for project: 'River (Retired)'
  1. River (Retired)
  2. RIVER-348

Possible race condition in net.jini.lookup.ServiceDiscoveryManager addProxyReg

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • River_2.1.1, River_2.1.2, River_2.2.0, River_2.2.1, River_2.2.2
    • River_3.0.0
    • None
    • None

    Description

      SDM appears to assume that tasks with sequence numbers are added to their TaskManager in ascending sequence number order. The method addProxyReg increments the sequence number in a serviceIdMap synchronized block, but does not add the task to its TaskManager until outside the block. leaving a small window during which another task could be created with higher sequence number but added to the TaskManager first.

      There is no known test case reproducing this, so it is difficult to be sure there is nothing else preventing the problem from happening.

      The fix wold be to move the cacheTaskMgr.add(treg); call inside the synchronized block.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pats@acm.org Patricia Shanahan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: