Skip to content

Commit

Permalink
Update semeru image base os to ubuntu 22 (adoptium#4204)
Browse files Browse the repository at this point in the history
- Update semeru image base os to ubuntu 22, which is the default ubuntu 22
- Add glibc rseq to solve criu checkpoint create problem on ubuntu 22

Signed-off-by: LongyuZhang <longyu.zhang@ibm.com>

Signed-off-by: LongyuZhang <longyu.zhang@ibm.com>
  • Loading branch information
LongyuZhang authored Dec 19, 2022
1 parent 6c74b56 commit 2cf9779
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions external/criu-portable-checkpoint/test_restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ source $(dirname "$0")/test_base_functions.sh
# This script is used as the new entrypoint for saved criu-restore-ready-with-jdk docker image
echo "Restore tests from Checkpoint"

echo "export GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load";
export GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load
echo "export GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load";
export GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load
echo "export LD_BIND_NOT=on";
export LD_BIND_NOT=on

Expand Down
4 changes: 2 additions & 2 deletions external/criu-ubi-portable-checkpoint/test_restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ checkpoint_folders="/aqa-tests/TKG/output_*/cmdLineTester_criu_keepCheckpoint*"
output_file="testOutput" # File "testOutput" is used to store all outputs
result_code=0

echo "export GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load";
export GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load
echo "export GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load";
export GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load
echo "export LD_BIND_NOT=on";
export LD_BIND_NOT=on

Expand Down
10 changes: 5 additions & 5 deletions external/dockerfile_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ print_image_args() {
if [[ "${vm}" == "openj9" ]]; then
if [[ "${os}" == "ubuntu" ]]; then
image_name="ibm-semeru-runtimes"
tag=open-${tag}-focal
tag=open-${tag}
else
# os is ubi
image_name="registry.access.redhat.com/ubi8/ubi"
Expand Down Expand Up @@ -359,7 +359,7 @@ print_criu_install() {

echo -e "\nRUN chmod a+x /usr/sbin/criu \\" \
"\n\t&& setcap cap_checkpoint_restore,cap_net_admin,cap_sys_ptrace=eip /usr/sbin/criu \\" \
"\n\t&& export GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load \\" \
"\n\t&& export GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load \\" \
"\n\t&& cd /usr/lib64 \\" \
"\n\t&& ln -s libcriu.so.2.0 libcriu.so \\" \
"\n\t&& ln -s libcriu.so.2.0 libcriu.so.2 \\" \
Expand All @@ -376,13 +376,13 @@ print_criu_install() {
# "\n\t&& apt-get install -y --no-install-recommends criu \\" \
# "\n\t&& criu -V \\" \
# "\n\t&& setcap cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_net_admin,cap_sys_chroot,cap_sys_ptrace,cap_sys_admin,cap_sys_resource,cap_sys_time,cap_audit_control=eip /usr/sbin/criu" \
# "\n\t&& export GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load" \
# "\n\t&& export GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load" \
# "\n" >> ${file}

# Method 2: build from source code
echo -e "\n# Install dependent packages for criu" \
"\nRUN apt-get update \\" \
"\n\t&& apt-get install -y --no-install-recommends iptables libbsd-dev libcap-dev libdrm-dev libnet1-dev libgnutls28-dev libgnutls30 libnftables-dev libnl-3-dev libprotobuf-dev python3-distutils protobuf-c-compiler protobuf-compiler xmlto libssl-dev python3-future libxt-dev libfontconfig1-dev python-protobuf nftables libcups2-dev libasound2-dev python-ipaddress libxtst-dev libexpat1-dev libfontconfig libaio-dev libffi-dev libx11-dev libprotobuf-c-dev libnuma-dev libfreetype6-dev libxrandr-dev libxrender-dev libelf-dev libxext-dev libdwarf-dev" \
"\n\t&& apt-get install -y --no-install-recommends iptables libbsd-dev libcap-dev libdrm-dev libnet1-dev libgnutls28-dev libgnutls30 libnftables-dev libnl-3-dev libprotobuf-dev python3-distutils protobuf-c-compiler protobuf-compiler xmlto libssl-dev python3-future libxt-dev libfontconfig1-dev python3-protobuf nftables libcups2-dev libasound2-dev libxtst-dev libexpat1-dev libfontconfig libaio-dev libffi-dev libx11-dev libprotobuf-c-dev libnuma-dev libfreetype6-dev libxrandr-dev libxrender-dev libelf-dev libxext-dev libdwarf-dev" \
"\n" >> ${file}

echo -e "\n# Build criu and set capabilities" \
Expand All @@ -395,7 +395,7 @@ print_criu_install() {
"\n\t&& make PREFIX=/usr install \\" \
"\n\t&& criu -V \\" \
"\n\t&& setcap cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_net_admin,cap_sys_chroot,cap_sys_ptrace,cap_sys_admin,cap_sys_resource,cap_sys_time,cap_audit_control=eip /usr/sbin/criu \\" \
"\n\t&& export GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load" \
"\n\t&& export GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load" \
"\n" >> ${file}
fi
}
Expand Down

0 comments on commit 2cf9779

Please sign in to comment.