RFR: 8332917: failure_handler should execute gdb "info threads" command on linux

Chris Plummer cjplummer at openjdk.org
Fri May 24 19:52:13 UTC 2024


On Fri, 24 May 2024 19:45:21 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> On linux, failure_handler dumps stack traces for all threads, but this dump does not include the name of each thread. The gdb "info threads" command will give a summary of all threads, and if debugging process, the summary will include each thread's name. If debugging a core file, for some reason the thread name is not included, but the summary is still useful.
> 
> Tested by running some tests that fail with a timeout, and looking at the failure_handler gdb output for both the process and the core file.

Here's some output for each:

Process:


  Id Target Id Frame
* 1 Thread 0xffff7fcf2a50 (LWP 2749191) "java" 0x0000ffff7fc22ba8 in __pthread_timedjoin_ex () from /lib64/libpthread.so.0
  2 Thread 0xffff7d9f31d0 (LWP 2749192) "old-m-a-i-n" 0x0000ffff7fc27d70 in pthread_cond_wait@@GLIBC_2.17 () from /lib64/libpthread.so.0
  3 Thread 0xffff7c51e1d0 (LWP 2749193) "GC Thread#0" 0x0000ffff7fc2a820 in do_futex_wait.constprop () from /lib64/libpthread.so.0
  4 Thread 0xffff7c31f1d0 (LWP 2749194) "G1 Main Marker" 0x0000ffff7fc27d70 in pthread_cond_wait@@GLIBC_2.17 () from /lib64/libpthread.so.0
  5 Thread 0xffff5ea991d0 (LWP 2749195) "G1 Conc#0" 0x0000ffff7fc2a820 in do_futex_wait.constprop () from /lib64/libpthread.so.0
...


Core File:


  Id Target Id Frame
* 1 Thread 0xffff7fcf2a50 (LWP 2749191) 0x0000ffff7fc22ba8 in __pthread_timedjoin_ex () from /lib64/libpthread.so.0
  2 Thread 0xffff7d9f31d0 (LWP 2749192) 0x0000ffff7fc27d70 in pthread_cond_wait@@GLIBC_2.17 () from /lib64/libpthread.so.0
  3 Thread 0xffff4ffff1d0 (LWP 2749196) 0x0000ffff7fc27d70 in pthread_cond_wait@@GLIBC_2.17 () from /lib64/libpthread.so.0
  4 Thread 0xffff7c51e1d0 (LWP 2749193) 0x0000ffff7fc2a820 in do_futex_wait.constprop () from /lib64/libpthread.so.0
  5 Thread 0xffff5ea991d0 (LWP 2749195) 0x0000ffff7fc2a820 in do_futex_wait.constprop () from /lib64/libpthread.so.0
...

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19401#issuecomment-2130253422


More information about the hotspot-dev mailing list