8206316: ZGC: Preferred tmpfs mount point not found on Debian
Per Liden
per.liden at oracle.com
Tue Jul 3 21:28:16 UTC 2018
On Linux kernels < 3.17 (where memfd_create() syscall does not exist),
ZGC falls back to searching for a suitable tmpfs mount point. If
multiple mount points are found (which is the common case) we try to see
if any of them matches the "preferred default" path (which is hard coded
to be /dev/shm in ZGC). This work well, except on Debian and Debian
derived distributions, which for some reason have chosen to use /run/shm
instead instead of /dev/shm. As a result, ZGC will fail to initialize on
some commonly used distributions (current Debian stable, Ubuntu
14.04-LTS, etc), forcing the user to manually mount a tmpfs file system
on /dev/shm or use -XX:ZPath=/run/shm to explicitly select the mount
point. ZGC should handle this situation much better, but having a list
of preferred mount points (instead of just one) to allow for multiple
alternatives covering differences between distributions. There is a high
risk that this otherwise becomes a common problem, given the popularity
of Debian and Debian derived distributions.
Bug: https://bugs.openjdk.java.net/browse/JDK-8206316
Webrev: http://cr.openjdk.java.net/~pliden/8206316/webrev.0
Testing: Manual testing of various mount point configurations.
/Per
More information about the hotspot-gc-dev
mailing list