JDK-8265690 : Use the latest Ubuntu base image version in Docker testing
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8,11,17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-04-21
  • Updated: 2025-01-24
  • Resolved: 2021-04-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17
11.0.12Fixed 17 b20Fixed
Related Reports
Relates :  
Description
Running hotspot_containers tests at current Xubuntu 20.04 fails with glibc incompatibility error like this:

$ CONF=linux-x86_64-server-fastdebug make images test TEST=hotspot_containers

STDERR:
 stdout: [Error: dl failure on line 542
Error: failed /jdk/lib/server/libjvm.so, because /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /jdk/lib/server/libjvm.so)
];
 stderr: []
 exitValue = 6

AFAIU, this means that the host glibc (and thus what the tested JDK is using) is newer than the glibc in the image (needed by /lib64/libm.so).

After JDK-8221342, the current image version is selected by:

        switch (Platform.getOsArch()) {
            case "aarch64":
            case "ppc64le":
            case "s390x":
                return "latest";
            default:
                return "7.6";
        }

I think it would make sense to default to "latest" Ubuntu, so that we get the image with the latest glibc. Which would get much higher chance to work on all hosts, because it would have higher chance to be at least as new as the host glibc. There is still the option to select the image that fits a particular system, but the default should catch as much as possible.

Unfortunately, even the latest oraclelinux:8.3 does not have a glibc that is modern enough to cater for recent Ubuntu desktops.
Comments
Removed the tag for now.
29-04-2021

[~shade] At least for JDK 8u we have duplicate DockerfileConfig.java. One in the jdk tree and one in hotspot: JDK: $ find test/ -name DockerfileConfig.java test/lib/jdk/test/lib/containers/docker/DockerfileConfig.java HotSpot: $ find test/ -name DockerfileConfig.java test/testlibrary/com/oracle/java/testlibrary/DockerfileConfig.java Hence, that'll need a review.
29-04-2021

Fix Request (8u) Same reason as for 11u. Patch applies to 8u with the usual shufflings. runtime/containers test pass with one unrelated failure.
29-04-2021

Fix Request (11u) This fixes Docker tests on modern desktop. Patch applies cleanly to 11u, hotspot_containers tests pass.
29-04-2021

Changeset: b67b2b16 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2021-04-27 16:36:15 +0000 URL: https://git.openjdk.java.net/jdk/commit/b67b2b16
27-04-2021