Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8319899

jmm_GetThreadInfo inspects lock stacks of running threads

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 21
    • hotspot
    • svc

      I found this while investigating JDK-8319897. It seems like jmm_GetThreadInfo calls Threads::owning_thread_from_object, which calls LockStack::contains, on running threads. This is a race and Undefined Behavior. I've heard some explanation that has been deemed to be safe after investigating the race and thinking about what could actually happens. That is not a safe way to handle races, certainly not when we are changing the implementation of the LockStack.

      This needs to be fixed somehow. If others don't agree then we should at least add a warning in the code + document here why we think it is OK to have this race.

            kevinw Kevin Walls
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: