On Thu, 9 Jul 2026 12:30:43 GMT, Coleen Phillimore <[email protected]> wrote:
>> Please review this change to allow XX configuration for specifying a >> different /tmp directory for the JVM to use. In some container >> environments, /tmp and /proc/pid/root/tmp might not be usable and an >> alternate would be used. This requires a release note and CSR. Usage is: >> >> java -XX:AltTempDir=/diags <app> >> jps -J-XX:AltTempDir=/diags >> jcmd -J-XX:AltTempDir=/diags <pid> <cmds> >> >> Tested with a couple of tests and locally, and ran tier1-4. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Coleen Phillimore has updated the pull request incrementally with one > additional commit since the last revision: > > Moved down AltTempDir in jinfo.md src/hotspot/os/linux/os_linux.cpp line 1562: > 1560: // Since the attach mechanism uses the socket name length, this > severely limits the length of the > 1561: // alternate temporary directory name. We don't check that here since > the temporary directory is > 1562: // used for many things. The perfData and attach code will check it. Nit: I can't fully understand the comment at lines 1557-1562. Are we trying to say this: - absolute paths are enforced - existence and writeability is warned but not rejected ? Is it possible to simplify the wording a little bit to make it more clear? src/jdk.attach/linux/native/libattach/VirtualMachineImpl.c line 80: > 78: addr.sun_family = AF_UNIX; > 79: if (strlen(p) >= sizeof(addr.sun_path)) { > 80: JNU_ThrowIOException(env, "Socket file path too long"); Nit: The exception is thrown without releasing the string `p`. This does not match the comment at lines 95-97. src/jdk.internal.jvmstat/linux/classes/sun/jvmstat/PlatformSupportImpl.java line 175: > 173: /* > 174: * Extract the VM ID (PID) from a file path. > 175: * Specifically the host pid for a container process. Nit: Inconsistency with use of `PID` and `pid`. Better to have the same naming style to avoid confusions. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31407#discussion_r3557042477 PR Review Comment: https://git.openjdk.org/jdk/pull/31407#discussion_r3556973760 PR Review Comment: https://git.openjdk.org/jdk/pull/31407#discussion_r3556988351
