RFR: 8378369: TestJhsdbJstackMixedWithVDSOCallCore.java fails if missing vdso64.so

Chris Plummer cjplummer at openjdk.org
Sat Feb 21 01:07:01 UTC 2026


On Sat, 21 Feb 2026 00:41:50 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

> `TEST=serviceability/sa/TestJhsdbJstackMixedWithVDSOCallCore.java` fails if `/lib/modules/<version>/vdso/vdso64.so` is missing. (Seems that is the case on default Debian installation.)
> 
> 
> java.util.NoSuchElementException: No value present
>         at java.base/java.util.Optional.get(Optional.java:147)
>         at jdk.test.lib.SA.SATestUtils.getDebugInfo(SATestUtils.java:332)
>         at TestJhsdbJstackMixedWithVDSOCallCore.checkVDSODebugInfo(TestJhsdbJstackMixedWithVDSOCallCore.java:73)
>         at TestJhsdbJstackMixedWithVDSOCallCore.main(TestJhsdbJstackMixedWithVDSOCallCore.java:85)
>         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:565)
>         at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)
>         at java.base/java.lang.Thread.run(Thread.java:1527)
> 
> 
> I could reproduce same problem on WSL 2 (kernel 6.6.87.2-microsoft-standard-WSL2). The test should be skipped if vDSO library not found.

test/lib/jdk/test/lib/SA/SATestUtils.java line 339:

> 337:                     exists = Files.exists(debuginfoPath);
> 338:                 } catch (NoSuchElementException _) {
> 339:                     // return null if vDSO not found.

I'm pretty sure the issue is "readelf" is returning an error because the library is not found. Would it be better to check proc.exitValue() for 1 to indicate failure? Would you ever expect "Build ID:" to be missing from the output if readelf succeeded?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29854#discussion_r2835629571


More information about the serviceability-dev mailing list