JDK-8251488 : Numa test/hotspot/jtreg/gc/g1/numa/TestG1NUMATouchRegions.java fails on Alpine Linux
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: repo-portola
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: other
  • Submitted: 2020-08-12
  • Updated: 2022-04-27
  • Resolved: 2022-04-27
Related Reports
Duplicate :  
Description
Build JDK from Portola repository on Alpine Linux.
Install NUMA lib:
{code}
apk add numactl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/1) Installing numactl (2.0.13-r0)
OK: 372 MiB in 148 packages
{code}

Run test/hotspot/jtreg/gc/g1/numa/TestG1NUMATouchRegions.java test.

The test fails:
{code}
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f314a93ee3d, pid=15797, tid=15800
#
# JRE version:  (16.0) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 16-internal+0-adhoc..portola, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libnuma.so.1+0x3e3d]
#
{code}
Comments
Has been fixed in the official integration of alpine linux JDK-8247589.
27-04-2022

The proposed fix tries to load numa_node_to_cpus() version 1.2 first. The fix is included into the Portola patch. See discussion on the portola-dev alias: https://mail.openjdk.java.net/pipermail/portola-dev/2020-July/000465.html Proposed changes (including other changes related to Portola patch): https://cr.openjdk.java.net/~avoitylov/webrev.8247589.01/src/hotspot/os/linux/os_linux.hpp.udiff.html https://cr.openjdk.java.net/~avoitylov/webrev.8247589.01/src/hotspot/os/linux/os_linux.cpp.udiff.html
12-08-2020

musl libc is not able to load symbols with version. See discussion on musl alias: https://www.openwall.com/lists/musl/2020/05/26/2 jdk loads numa_node_to_cpus function with version libnuma_1.1 which has 3 parameters: numa_node_to_cpus(int node, unsigned long *buffer, int bufferlen) musl libc loads the latest numa_node_to_cpus function version 1.2 with 2 parameters: numa_node_to_cpus(int node, struct bitmask *mask); Using numa_node_to_cpus function with unexpected parameters leads to the test crash.
12-08-2020