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

full lock information for virtual threads in thread dumps

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P2 P2
    • tbd
    • None
    • core-svc

      We need a guaranteed way to easily account for all held locks in the application, exactly what any threads that hold them are doing, and identify what code / threads are waiting on them. Whatever way this is done needs to be simple, built into the runtime, and produce output that can be easily shared for off-line analysis. Information for both intrinsic monitors as well as j.u.c locks (if enabled) is required.

      This is currently possible for platform threads (via a normal thread dump), but not virtual threads. This represents a severe regression in serviceability for any user of virtual threads.

      Adding the needed lock information to the implementation of Thread.dump_to_file should be sufficient (given that all threads are tracked).

            alanb Alan Bateman
            dbuck David Buck
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: