8206316: ZGC: Preferred tmpfs mount point not found on Debian

Thomas Schatzl thomas.schatzl at oracle.com
Wed Jul 4 06:55:29 UTC 2018


Hi,

On Tue, 2018-07-03 at 23:28 +0200, Per Liden wrote:
> 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.

Looking at the various support documents, this does not seem to be a
very significant issue. On Debian Stretch (latest stable) kernel is 4.9
[1].
And latest Ubuntu 14.04(.05) runs on a 4.4 kernel [2].

While Jessie (previous stable) is 3.16, it is "almost" out of support
(and so is 14.04), and will be even more at GA. Also memfd_create has
been backported to Jessie afaict [3].

I am not sure that people that already need to go out of their way to
install latest JDK on these OSes to test, won't also consider upgrading
 minor versions their OS. (And I assume that for testing, people do not
use live systems anyway).

All in all I do not see this issue as urgent as the description make it
seem. It does not seem to be a problematic change either (to me it
seems like an enhancement of existing code too).

> 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.

  looks good.

Thomas

[1] https://lists.debian.org/debian-kernel/2016/08/msg00099.html
[2] https://wiki.ubuntu.com/Kernel/Support
[3] https://manpages.debian.org/jessie-backports/manpages-dev/memfd_cre
ate.2.en.html (see the "other versions" table)




More information about the hotspot-gc-dev mailing list