Test failure in TestJcmdWithSideCar.java
Philippe Marschall
kustos at gmx.net
Thu Dec 18 16:29:36 UTC 2025
On 12/18/25 14:04, Yasumasa Suenaga wrote:
> Hi,
>
> I'm working on JDK-28867 ( https://github.com/openjdk/jdk/pull/28867 ),
> and @slovdahl said this PR might fix the failure in
> TestJcmdWithSideCar.java which has been recorded in ProblemList.
> Unfortunately this PR fix that problem, but I found the cause of
> failure, so I will tell it to the maillist.
>
> The cause is mismatch container base image and OS of build host.
>
> I'm using Fedora 43 to build OpenJDK, however container test would use
> ubuntu:latest image by default.
> Thus I saw error in dynamic linker in .jtr file as following. It is why
> main container wasn't started.
>
> ```
> [main-container-process] Error: dl failure on line 532
> [main-container-process] Error: failed /jdk/lib/server/libjvm.so,
> because /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_ABI_GNU2_TLS'
> not found (required by /jdk/lib/server/libjvm.so)
> ```
>
> The test passed when I added both -Djdk.test.docker.image.name -
> Djdk.test.docker.image.version as following.
>
> ```
> make test TEST=test/hotspot/jtreg/containers/docker/
> TestJcmdWithSideCar.java JTREG="JAVA_OPTIONS=-
> Djdk.test.container.command=podman -Djdk.test.docker.image.name=fedora -
> Djdk.test.docker.image.version=43"
> ```
>
>
> Thus it is an environment problem. Not a bug.
That test has quite a few issues. A somewhat related issue is that the
working directory of the main container is / but this is not shared with
the side car [1].
Then there are the issues that a lot of the test infrastructure relies
on polling and timeouts rather than signals with makes the tests
unnecessarily long. Ie. EventGeneratorLoop should add a shutdown hook
and exit on interruption.
And yes, a lot of the comments in #findTargetProcessTmpDirectory do not
make much sense when compared to the implementation. And to my knowledge
we should test for execute rather than write permission on the temp dir
as target process creates the socket file, not the attaching process.
[1] https://github.com/openjdk/jdk/pull/26712#issuecomment-3508500130
Regards
Philippe
More information about the serviceability-dev
mailing list