RFR: 8370176: Mixed mode jhsdb jstack cannot unwind call stack with -Xcomp [v2]
Yasumasa Suenaga
ysuenaga at openjdk.org
Sat Oct 25 02:58:04 UTC 2025
On Fri, 24 Oct 2025 15:02:14 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> I could reproduce the problem not only Ubuntu 22.04 but also 23.04 . However it did not happen on Ubuntu 24.04 .
>> According to your report, the problem would happen on AArch64, it implies the problem is not in DWARF parser only. (DWARF parser is only available on Linux AMD64 so far)
>>
>> AFAICS stack unwinding would fail from the function in glibc (on Ubuntu 22.04 and 23.04 at least), so I suspect something wrong in glibc binary and/or behavior and/or compiler options on Ubuntu. but I'm not sure.
>>
>> I checked glibc version from `gnu_get_libc_version()`. "2.37" is returned on Ubuntu 23.04, and "2.39" is returned on Ubuntu 24.04 . So I think it can be `gnu_get_libc_version()` with FFM at first of the test, then the test is skipped if it runs on glibc 2.38 or earlier. Is it ok?
>>
>> I grep'ed test directory with "mixed", I found another tests (TestJhsdbJstackMixed.java, TestJhsdbJstackPrintVMLocks.java). I will add glibc check to them as another ticket if this solution is ok.
>
> I am not sure about the glibc version as I don't know much about the differences among these distributions.
> But it works for me if you want to fix all the affected tests in another PR. Thanks for considering that.
I updated this PR to check glibc version in TestJhsdbJstackMixedWithXComp.java added by this PR. It skips the test on Ubuntu 22.04, OTOH it works on Fedora 43. It is expected.
I attempted to add this check to `SATestUtils` at first, but it seems to be difficult because native access have to be allowed all of `SATestUtils` users - the impact is too significant.
I will file another issue to apply this check to other tests of `jhsdb jstack --mixed` user after this PR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27885#discussion_r2462372806
More information about the serviceability-dev
mailing list