Skip to content

[Tests] Use DiagnosticCommand JMX MBean to do the threaddump - #9766

Merged
merlimat merged 1 commit into
apache:masterfrom
lhotari:lh-improve-thread-dumps
Mar 2, 2021
Merged

[Tests] Use DiagnosticCommand JMX MBean to do the threaddump#9766
merlimat merged 1 commit into
apache:masterfrom
lhotari:lh-improve-thread-dumps

Conversation

@lhotari

@lhotari lhotari commented Mar 1, 2021

Copy link
Copy Markdown
Member

Motivation

When a tests times out, a thread dump will be printed using org.apache.pulsar.tests.ThreadDumpUtil . This class produces output that isn't
as rich as the output of jstack -l <pid>. However it's possible to produce a similar thread dump in Java programmatically. The benefit of a richer and standard thread dump is that it's possible to analyse it using standard tooling such as https://jstack.review/

Modifications

  • Improve threaddump by using DiagnosticCommand JMX MBean to do the threaddump
    • include full information about locks in the output
    • output is similar to what jstack -l <pid> produces
  • fallback to previous method if DiagnosticCommand MBean fails to produce
    the threaddump

@merlimat merlimat added this to the 2.8.0 milestone Mar 1, 2021
- improve threaddump by using DiagnosticCommand JMX MBean to do the threaddump
  - include full information about locks in the output
- fallback to previous method if DiagnosticCommand MBean fails to produce
  the threaddump
@lhotari
lhotari force-pushed the lh-improve-thread-dumps branch from 5423f39 to 4f10965 Compare March 2, 2021 06:34
@lhotari lhotari changed the title [Tests] Use DiagnosticCommandMBean to do the threaddump [Tests] Use DiagnosticCommand JMX MBean to do the threaddump Mar 2, 2021
@lhotari

lhotari commented Mar 2, 2021

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eolivelli

Copy link
Copy Markdown
Contributor

/pulsarbot run-failure-checks

@merlimat
merlimat merged commit 7ba9816 into apache:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants