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

Java Memory Model Compliance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • 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
    • JVM

    • None, River is highly multi threaded, remote calls invoked on exported objects are executed by the ThreadPool Executor, so all exported objects must be thread safe.

    Description

      Much of the Jini codebase was written prior to the publication of the current JMM, for this reason, there are a number of issues with the existing code base that need to be changed to bring River into compliance with the JMM.

      Typical issues encountered:

      1.Letting "this" escape during construction - example exporting or starting threads, where those threads can see internal field references before construction of that object is complete.

      2. Inadequate synchronization or lack of synchronization on mutable fields.

      3. Sharing of internal unsynchronized state.

      4. Race conditions where unsynchronized or non final or non volatile fields are updated by other threads.

      5. Deserializing an object in one thread and sharing the deserialized mutable but unmodified object with another thread without first publishing it safely to a volatile or final field, so the second thread can sometimes see the default value of fields in the mutable object.

      Affects all presently released versions, planned to be fixed in River 3.0

      Attachments

        1. RegistrarImpl.patch
          146 kB
          Peter Firmstone

        Issue Links

          Activity

            People

              pfirmst Peter Firmstone
              pfirmst Peter Firmstone
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: