Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
On Sat, 9 Jul 2022 05:19:08 GMT, Ioi Lam wrote: >> src/hotspot/os/posix/perfMemory_posix.cpp line 796: >> >>> 794: if (!is_locked_by_another_process) { >>> 795: if ((pid == os::current_process_id()) || >>> 796: (kill(pid, 0) == OS_ERR && (errno == ESRCH || errno == >>> EPERM

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
On Fri, 8 Jul 2022 07:08:27 GMT, Thomas Stuefe wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @tstuefe comments > > src/hotspot/os/posix/perfMemory_posix.cpp line 796: > >> 794: if (!is_locked_by_another_process)

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
On Fri, 8 Jul 2022 06:54:33 GMT, Thomas Stuefe wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @tstuefe comments > > src/hotspot/os/posix/perfMemory_posix.cpp line 743: > >> 741: >> 742: // We now have a file name

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Thomas Stuefe
On Thu, 7 Jul 2022 21:21:27 GMT, Ioi Lam wrote: >> Some Kubernetes setups share the /tmp directory across multiple containers. >> On rare occasions, the JVM may crash when it tries to write to >> `/tmp/hsperfdata_/` when a process in a separate container >> decides to do the same thing (becaus

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Thomas Stuefe
On Thu, 7 Jul 2022 21:58:55 GMT, Ioi Lam wrote: >> src/hotspot/os/posix/perfMemory_posix.cpp line 781: >> >>> 779: // signal the process, then the file is assumed to >>> 780: // be stale and is removed because the files for such a >>> 781: // process should be in a different user spe

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
> Some Kubernetes setups share the /tmp directory across multiple containers. > On rare occasions, the JVM may crash when it tries to write to > `/tmp/hsperfdata_/` when a process in a separate container decides > to do the same thing (because they happen to have the same namespaced pid). > > T

Re: RFR: 8286030: Avoid JVM crash when containers share the same /tmp dir [v2]

2022-07-08 Thread Ioi Lam
On Thu, 7 Jul 2022 14:17:19 GMT, Thomas Stuefe wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @tstuefe comments > > src/hotspot/os/posix/perfMemory_posix.cpp line 708: > >> 706: fd = ::open(filename, O_RDONLY); >> 7