Discussion:
maintainer-feedback requested: [Bug 211196] java/openjdk8: thread id missing from jstack output against core files
(too old to reply)
b***@freebsd.org
2016-07-18 12:09:14 UTC
Permalink
Ron Roskens <***@gmail.com> has reassigned Bugzilla Automation
<***@FreeBSD.org>'s request for maintainer-feedback to ***@FreeBSD.org:
Bug 211196: java/openjdk8: thread id missing from jstack output against core
files
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211196



--- Description ---
Created attachment 172643
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=172643&action=edit
patch for hotspot/src/os/bsd/vm/os_bsd.cpp

When analyzing a JVM core dump, jstack is unable to display any stacktraces for
any threads because it cannot match any thread id's.

In the JVM on BSD, a thread is represented by two different thread id values,
however, only when defined(__APPLE__) does the second value, unique_thread_id,
get set. Its unique_thread_id that jstack uses to match thread ids in a core
dump.

I've been using the attached two local patches.

patch-rjr-os_bsd.cpp sets unique_thread_id to the same value as the thread_id.
patch-rjr-BsdThread.java adds the unique_thread_id to BsdThread.toString()
output.
b***@freebsd.org
2016-07-18 12:10:02 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211196

--- Comment #1 from Ron Roskens <***@gmail.com> ---
Created attachment 172644
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=172644&action=edit
patch for
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThread.java
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freebsd.org
2016-07-18 12:11:06 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211196

--- Comment #2 from Ron Roskens <***@gmail.com> ---
Created attachment 172645
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=172645&action=edit
jstack output
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freebsd.org
2016-07-18 12:11:27 UTC
Permalink
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211196

--- Comment #3 from Ron Roskens <***@gmail.com> ---
Created attachment 172646
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=172646&action=edit
jstack -m output
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...