Skip to content

Commit

Permalink
Merge branch 'checkpoint-restore:criu-dev' into mi300_fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fdavid-amd authored Sep 16, 2024
2 parents 921b6de + 6551847 commit 03ff436
Show file tree
Hide file tree
Showing 194 changed files with 4,998 additions and 1,679 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
jobs:
test-local-gcc:
machine:
image: ubuntu-2004:202010-01
image: default
working_directory: ~/criu
steps:
- checkout
Expand All @@ -11,7 +11,7 @@ jobs:
command: sudo -E make -C scripts/ci local
test-local-clang:
machine:
image: ubuntu-2004:202010-01
image: default
working_directory: ~/criu
steps:
- checkout
Expand Down
36 changes: 4 additions & 32 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ task:
ln -sf /usr/include/google/protobuf/descriptor.proto images/google/protobuf/descriptor.proto
dnf config-manager --set-enabled crb # Same as CentOS 8 powertools
dnf -y install epel-release epel-next-release
dnf -y install --allowerasing asciidoc gcc git gnutls-devel libaio-devel libasan libcap-devel libnet-devel libnl3-devel libbsd-devel libselinux-devel make protobuf-c-devel protobuf-devel python-devel python-PyYAML python-protobuf python-junit_xml python3-importlib-metadata python-flake8 xmlto libdrm-devel
dnf -y install --allowerasing asciidoc gcc git gnutls-devel libaio-devel libasan libcap-devel libnet-devel libnl3-devel libbsd-devel libselinux-devel make protobuf-c-devel protobuf-devel python-devel python-PyYAML python-protobuf python-junit_xml python3-importlib-metadata xmlto libdrm-devel
# The image has a too old version of nettle which does not work with gnutls.
# Just upgrade to the latest to make the error go away.
dnf -y upgrade nettle nettle-devel
systemctl stop sssd
# Even with selinux in permissive mode the selinux tests will be executed.
# The Cirrus CI user runs as a service from selinux point of view and is
Expand Down Expand Up @@ -89,37 +92,6 @@ task:
build_script: |
make -C scripts/ci vagrant-fedora-non-root
task:
name: CentOS Stream 8 based test
environment:
HOME: "/root"
CIRRUS_WORKING_DIR: "/tmp/criu"

compute_engine_instance:
image_project: centos-cloud
image: family/centos-stream-8
platform: linux
cpu: 4
memory: 8G

setup_script: |
ln -sf /usr/include/google/protobuf/descriptor.proto images/google/protobuf/descriptor.proto
# Do not fail if latest epel repository definition is already installed
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm || :
yum install -y dnf-plugins-core
yum config-manager --set-enabled powertools
yum install -y --allowerasing asciidoc gcc git gnutls-devel libaio-devel libasan libcap-devel libnet-devel libnl3-devel libbsd-devel libselinux-devel make protobuf-c-devel protobuf-devel python3-devel python3-flake8 python3-PyYAML python3-protobuf python3-importlib-metadata python3-junit_xml xmlto libdrm-devel
alternatives --set python /usr/bin/python3
systemctl stop sssd
# Even with selinux in permissive mode the selinux tests will be executed
# The Cirrus CI user runs as a service from selinux point of view and is
# much more restricted than a normal shell (system_u:system_r:unconfined_service_t:s0)
# The test case above (vagrant-fedora-no-vdso) should run selinux tests in enforcing mode
setenforce 0
build_script: |
make -C scripts/ci local SKIP_CI_PREP=1 CC=gcc CD_TO_TOP=1 ZDTM_OPTS="-x zdtm/static/socket-raw"
task:
name: aarch64 build GCC (native)
arm_container:
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/actuated-aarch64-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Actuated aarch64 test

on: [push, pull_request]

# Cancel any preceding run on the pull request.
concurrency:
group: actuated-test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/criu-dev' }}

jobs:
build:
# Actuated runners are not available in all repositories.
if: ${{ github.repository == 'checkpoint-restore/criu' }}
# The memory size and the number of CPUs can be freely selected.
# 3GB and 4 CPUs seems to be enough according to the result from 'vmmeter'.
runs-on: actuated-arm64-4cpu-3gb
strategy:
matrix:
target: [GCC=1, CLANG=1]

steps:
# https://gist.github.com/alexellis/1f33e581c75e11e161fe613c46180771#file-metering-gha-md
# vmmeter start
- name: Prepare arkade
uses: alexellis/arkade-get@master
with:
crane: latest
print-summary: false

- name: Install vmmeter
run: |
crane export --platform linux/arm64 ghcr.io/openfaasltd/vmmeter:latest | sudo tar -xvf - -C /usr/local/bin
- name: Run vmmeter
uses: self-actuated/vmmeter-action@master
# vmmeter end

- uses: actions/checkout@v4
- name: Run Tests ${{ matrix.target }}
# Following tests are failing on the actuated VMs:
# ./change_mnt_context --pidfile=change_mnt_context.pid --outfile=change_mnt_context.out
# 45: ERR: change_mnt_context.c:23: mount (errno = 22 (Invalid argument))
#
# In combination with '--remote-lazy-pages' following error occurs:
# 138: FAIL: maps05.c:84: Data corrupted at page 1639 (errno = 11 (Resource temporarily unavailable))
run: |
# The 'sched_policy00' needs the following:
sudo sysctl -w kernel.sched_rt_runtime_us=-1
# etc/hosts entry is needed for netns_lock_iptables
echo "127.0.0.1 localhost" | sudo tee -a /etc/hosts
sudo -E make -C scripts/ci local ${{ matrix.target }} RUN_TESTS=1 \
ZDTM_OPTS="-x zdtm/static/change_mnt_context -x zdtm/static/maps05"
4 changes: 2 additions & 2 deletions .github/workflows/alpine-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
target: [GCC=1, CLANG=1]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Alpine ${{ matrix.target }} Test
run: sudo -E make -C scripts/ci alpine ${{ matrix.target }}
4 changes: 2 additions & 2 deletions .github/workflows/archlinux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Arch Linux Test
run: sudo -E make -C scripts/ci archlinux
4 changes: 2 additions & 2 deletions .github/workflows/compat-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
target: [GCC, CLANG]


steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Compat Tests (${{ matrix.target }})
run: sudo -E make -C scripts/ci local COMPAT_TEST=y ${{ matrix.target }}=1
2 changes: 1 addition & 1 deletion .github/workflows/cross-compile-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
branches: [criu-dev, master]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branches }}
- name: Run Cross Compilation Targets
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
target: mips64el-unstable-cross

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Cross Compilation Targets
run: >
sudo make -C scripts/ci ${{ matrix.target }}
4 changes: 2 additions & 2 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Docker Test (${{ matrix.os }})
run: sudo make -C scripts/ci docker-test
4 changes: 2 additions & 2 deletions .github/workflows/fedora-asan-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Fedora ASAN Test
run: sudo -E make -C scripts/ci fedora-asan
4 changes: 2 additions & 2 deletions .github/workflows/fedora-rawhide-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Fedora Rawhide Test
# We need to pass environment variables from the CI environment to
# distinguish between CI environments. However, we need to make sure that
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gcov-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Coverage Tests
run: sudo -E make -C scripts/ci local GCOV=1
- name: Run gcov
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/java-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Java Test
run: sudo make -C scripts/ci java-test
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
image: registry.fedoraproject.org/fedora:latest
steps:
- name: Install tools
run: sudo dnf -y install git make python3-flake8 xz clang-tools-extra which codespell git-clang-format ShellCheck
run: sudo dnf -y install git make ruff xz clang-tools-extra which codespell git-clang-format ShellCheck

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set git safe directory
# https://github.com/actions/checkout/issues/760
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/loongarch64-qemu-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: sudo make -C scripts/ci loongarch64-qemu-test
4 changes: 2 additions & 2 deletions .github/workflows/podman-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run Podman Test
run: sudo make -C scripts/ci podman-test
4 changes: 2 additions & 2 deletions .github/workflows/stream-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run CRIU Image Streamer Test
run: sudo -E make -C scripts/ci local STREAM_TEST=1
4 changes: 2 additions & 2 deletions .github/workflows/x86-64-clang-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run X86_64 CLANG Test
run: sudo make -C scripts/ci x86_64 CLANG=1
4 changes: 2 additions & 2 deletions .github/workflows/x86-64-gcc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ concurrency:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run X86_64 GCC Test
run: sudo make -C scripts/ci x86_64
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ images/google/protobuf/*.h
.gitid
criu/criu
criu/unittest/unittest
criu/arch/*/sys-exec-tbl*.c
# x86 syscalls-table is not generated
!criu/arch/x86/sys-exec-tbl.c
criu/arch/*/syscalls*.S
criu/include/syscall-codes*.h
criu/include/syscall*.h
criu/include/version.h
criu/pie/restorer-blob.h
criu/pie/parasite-blob.h
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Other conventions can be learned from the source code itself. In short, make sur

Important: These tools are there to advise you, but should not be considered as a "source of truth", as tools also make nasty mistakes from time to time which can completely break code readability.

The following command can be used to automatically run a code linter for Python files (flake8), Shell scripts (shellcheck),
The following command can be used to automatically run a code linter for Python files (ruff), Shell scripts (shellcheck),
text spelling (codespell), and a number of CRIU-specific checks (usage of print macros and EOL whitespace for C files).

```
Expand Down
8 changes: 2 additions & 6 deletions Documentation/criu-amdgpu-plugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,10 @@ to criu to allow Checkpoint / Restore with ROCm.


Dependencies
~~~~~~~~~~~~~~
------------
*amdkfd support*::
In order to snapshot the *VRAM* and other *GPU* device states, we require
an updated version of amdkfd(amdgpu) driver. The kernel patches are under
review currently.

*criu 3.16*::
This work is rebased on latest criu release available at this time.
an updated version of amdkfd(amdgpu) driver.

OPTIONS
-------
Expand Down
Loading

0 comments on commit 03ff436

Please sign in to comment.