Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-4565

MVELDialectRuntimeData is not thread safe

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.16.0.Final
    • core engine
    • None
    • 2019 Week 38-40 (from Sep 16)
    • NEW
    • NEW

    Description

      MVELDialectRuntimeData#mvelReaders is accessed concurrently but is not thread safe due to the usage of a HashSet. This may cause lost updates. (See ForkJoinPool-1-worker-1.txt and main.txt )

      If this happens and the kie base is serialized and deserialized it results in a NullPointerException at runtime. (See NPE.txt )

      We observed that the entries in this Set (mvelReaders) are serialized and important for the deserialization step because they contain information about transient objects that have to be re-initialized after deserialization.
      While losing this information due to concurrent access does not cause problems during compilation, serialization and deserialization of a kie base, they may cause NullPointerExceptions at runtime when transient fields remain uninitialized.

      Attachments

        1. ForkJoinPool-1-worker-1.txt
          2 kB
        2. main.txt
          1 kB
        3. NPE.txt
          3 kB

        Activity

          People

            mfusco@redhat.com Mario Fusco
            timogutjahr Timo Gutjahr (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: