On Thu, 18 Dec 2025 13:06:58 GMT, Yasumasa Suenaga <[email protected]> wrote:
>> There is a [problemlisted test](https://github.com/openjdk/jdk/pull/21417) >> related to this that could make sense to run manually >> (https://bugs.openjdk.org/browse/JDK-8341518). It's failing in some of >> Oracle's CI but I have not been able to reproduce the failure myself. It was >> discussed a bit in https://github.com/openjdk/jdk/pull/21331 too. >> >> I'll see if I can find time to check out this change locally and run some >> tests, otherwise, feel free to run it yourself. > > @slovdahl I found out the cause of error in TestJcmdWithSideCar.java. It is > not a bug, environment issue. > I sent email to serviceability-dev because it is different from this PR. > https://mail.openjdk.org/pipermail/serviceability-dev/2025-December/068668.html > > Anyway, I'm waiting for Reviewers for this PR! @YaSuenag Interesting, thanks for figuring that part out. In any case, I also ran the tests locally now (using Docker 29.1.3 on Ubuntu 24.04), both on the latest JDK master branch and on your branch. Both passed. make test TEST=test/hotspot/jtreg/containers/docker/TestJcmdWithSideCar.java JTREG=RUN_PROBLEM_LISTS=true But on another note, I'm wondering if this change breaks the fix from https://bugs.openjdk.org/browse/JDK-8226919 and https://github.com/openjdk/jdk/pull/17628. Unfortunately there is no jtreg test for it, but by following the steps I did in https://github.com/openjdk/jdk/pull/17628#issuecomment-1916589081 and trying to attach to a JVM run as a systemd unit with extra privileges using a JDK built from this branch, I got this error: [15:35:41] ~/dev/external/jdk-8226919-reproducer ❯ /home/slovdahl/dev/external/jdk/build/linux-x86_64-server-release/images/jdk/bin/java -version openjdk version "27-internal" 2026-09-15 OpenJDK Runtime Environment (build 27-internal-adhoc.slovdahl.jdk) OpenJDK 64-Bit Server VM (build 27-internal-adhoc.slovdahl.jdk, mixed mode, sharing) [15:30:58] ~/dev/external/jdk-8226919-reproducer ❯ /home/slovdahl/dev/external/jdk/build/linux-x86_64-server-release/images/jdk/bin/jcmd $(pgrep -f Reproducer.java) VM.version 2799281: com.sun.tools.attach.AttachNotSupportedException: Unable to access the filesystem of the target process at jdk.attach/sun.tools.attach.VirtualMachineImpl.findTargetProcessTmpDirectory(VirtualMachineImpl.java:281) at jdk.attach/sun.tools.attach.VirtualMachineImpl.findSocketFile(VirtualMachineImpl.java:231) at jdk.attach/sun.tools.attach.VirtualMachineImpl.<init>(VirtualMachineImpl.java:82) at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:56) at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:201) at jdk.jcmd/sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:113) at jdk.jcmd/sun.tools.jcmd.JCmd.main(JCmd.java:97) Caused by: java.nio.file.AccessDeniedException: /proc/2799281/root/tmp at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:108) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:113) at java.base/sun.nio.fs.UnixFileSystemProvider.isSameFile(UnixFileSystemProvider.java:391) at java.base/java.nio.file.Files.isSameFile(Files.java:1418) at jdk.attach/sun.tools.attach.VirtualMachineImpl.findTargetProcessTmpDirectory(VirtualMachineImpl.java:275) ... 6 more Before JDK-8226919 was fixed one got a timeout instead. Similar to the behaviour before JDK-8226919, using root when attaching works with a JDK built from this branch: [15:32:20] ~/dev/external/jdk-8226919-reproducer ❯ /home/slovdahl/dev/external/jdk/build/linux-x86_64-server-release/images/jdk/bin/jcmd $(pgrep -f Reproducer.java) VM.version 2799281: com.sun.tools.attach.AttachNotSupportedException: Unable to access the filesystem of the target process at jdk.attach/sun.tools.attach.VirtualMachineImpl.findTargetProcessTmpDirectory(VirtualMachineImpl.java:281) at jdk.attach/sun.tools.attach.VirtualMachineImpl.findSocketFile(VirtualMachineImpl.java:231) at jdk.attach/sun.tools.attach.VirtualMachineImpl.<init>(VirtualMachineImpl.java:82) at jdk.attach/sun.tools.attach.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:56) at jdk.attach/com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:201) at jdk.jcmd/sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:113) at jdk.jcmd/sun.tools.jcmd.JCmd.main(JCmd.java:97) Caused by: java.nio.file.AccessDeniedException: /proc/2799281/root/tmp at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:108) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:113) at java.base/sun.nio.fs.UnixFileSystemProvider.isSameFile(UnixFileSystemProvider.java:391) at java.base/java.nio.file.Files.isSameFile(Files.java:1418) at jdk.attach/sun.tools.attach.VirtualMachineImpl.findTargetProcessTmpDirectory(VirtualMachineImpl.java:275) ... 6 more Are you able to replicate the same error locally? ------------- PR Comment: https://git.openjdk.org/jdk/pull/28867#issuecomment-3670336288
