Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5339

[drlvm][thread] provide synchronization info in thread dump

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • Advanced

    Description

      The important debugging facility is not fully implemented in drlvm: thread info dump (handled via Ctrl-Break on Win and Ctrl-/ on Linux).
      Currently it provides Java stack-traces only. OTOH competitive impls provide much more information, including synchronization state for each thread (which locks it holds, wait state, etc). Below is an example of such output:
      ==================================================
      Full thread dump Java HotSpot(TM) Client VM (1.5.0_08-b03 mixed mode):

      "CritiquingThread" daemon prio=4 tid=0x0bdd4740 nid=0x5088 waiting on condition [0x0b6ff000..0x0b6ffc6c]
      at java.lang.Thread.sleep(Native Method)
      at org.argouml.cognitive.Designer.run(Designer.java:360)
      at java.lang.Thread.run(Thread.java:595)

      "DestroyJavaVM" prio=6 tid=0x00035bf8 nid=0x116f8 waiting on condition [0x00000000..0x0007fae8]

      "TimerQueue" daemon prio=6 tid=0x0bce16c8 nid=0x412e8 in Object.wait() [0x0b67f000..0x0b67fd6c]
      at java.lang.Object.wait(Native Method)

      • waiting on <0x037f5e50> (a javax.swing.TimerQueue)
        at javax.swing.TimerQueue.run(TimerQueue.java:233)
      • locked <0x037f5e50> (a javax.swing.TimerQueue)
        at java.lang.Thread.run(Thread.java:595)
        =============================================

      DRLVM should also provide such info, this is critical for debugging Java deadlocks and other threading issues, see HARMONY-5261 for example.
      As a further enhancement, it could auto-detect and highlight deadlocks in the dump output.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              varlax Alexey Varlamov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: