Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-5458

Implement use of synchronized threads on shared data structures

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 5.10.6
    • None
    • None
    • None

    Description

      Hello team,

      We've discovered, after an user reported a performance issue, that some threads on GreenHopper aren't using a synchronized protection, which means that we can have data inconsistency or infinite loops caused by multiple threads accessing a share resource.

      On a specific case, the customer was able to track that a thread of com.pyxis.greenhopper.GreenHopperImpl.put method was stuck. Also, as per his comments:

      Therefore, I conclude that the HashMap is being improperly accessed. I checked the code - and sure enough - if you track the stack backwards from the put() higher, I see no use of synchronization primitives. No thread safety. 18 threads are locked in a put() against a non-thread-safe data structure. Something is wrong.

      The consequence of improper access are varied and random as they depend on the exact assumptions that each thread is making about cached data. One possible outcome can be a regular loop accessing the data structure turns into an infinite loop due to a "circular" reference, because of incorrect assumptions that the JVM is making about the data it is accessing.

      Could you please consider this and tell us if this is possible to implement a protection on running threads?

      Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            agoncalves Arthur Gonçalves (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: