Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14635

improve ThreadDumpHandler to show more info related to locks

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.7, master (9.0)
    • Component/s: None
    • Labels:
      None

      Description

      Having recently spent some time trying to use ThreadDumpHandler to diagnose a "lock leak" i realized there are quite a few bits of info available from the ThreadMXBean/ThreadInfo datastcutures that are not included in the response, and i think we should add them:

      • switch from findMonitorDeadlockedThreads() to findDeadlockedThreads() to also detect deadlocks from ownable syncrhonizers (ie: ReintrantLocks)
      • for each thread:
        • in addition to outputing the current getLockName() when a thread is blocked/waiting, return info about the lock owner when available.
          • there's already dead code checking this and then throwing away the info
        • return the list of all locks (both monitors and ownable synchronizers) held by each thread

        Attachments

        1. SOLR-14635.patch
          10 kB
          Chris M. Hostetter

          Activity

            People

            • Assignee:
              hossman Chris M. Hostetter
              Reporter:
              hossman Chris M. Hostetter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: