exec-sandbox 0.20.0__tar.gz → 0.22.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/.github/actions/build-guest-agent/action.yml +3 -18
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/.github/actions/build-gvproxy-wrapper/action.yml +1 -1
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/.github/actions/build-tiny-init/action.yml +3 -18
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/.github/actions/build-vm-images/action.yml +3 -22
- exec_sandbox-0.22.0/.github/actions/setup-vm-infra/action.yml +253 -0
- exec_sandbox-0.22.0/.github/runs-on.yml +54 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/.github/workflows/release.yml +31 -46
- exec_sandbox-0.22.0/.github/workflows/test.yml +563 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/.gitignore +6 -0
- exec_sandbox-0.22.0/CLAUDE.md +33 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/Makefile +50 -30
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/PKG-INFO +23 -14
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/README.md +21 -13
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/Cargo.toml +1 -2
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/Makefile +3 -4
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/connection.rs +85 -61
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/constants.rs +19 -4
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/error.rs +13 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/init.rs +381 -143
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/main.rs +12 -11
- exec_sandbox-0.22.0/guest-agent/src/oom_guard.rs +432 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/packages.rs +3 -3
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/repl/execute.rs +227 -89
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/repl/spawn.rs +2 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/gvproxy-wrapper/Makefile +5 -2
- exec_sandbox-0.22.0/images/kernel/alpine-virt-aarch64.config +6181 -0
- exec_sandbox-0.22.0/images/kernel/alpine-virt-x86_64.config +5842 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/images/kernel/exec-sandbox.config +280 -41
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/pyproject.toml +10 -2
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/benchmark_latency.py +118 -51
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/build-guest-agent.sh +28 -7
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/build-kernel.sh +94 -67
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/build-qcow2.sh +29 -8
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/build-qemu.sh +31 -8
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/build-tiny-init.sh +28 -7
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/extract-kernel.sh +29 -23
- exec_sandbox-0.22.0/scripts/upgrade-versions.sh +643 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/__init__.py +2 -0
- exec_sandbox-0.22.0/src/exec_sandbox/aio_utils.py +64 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/balloon_client.py +40 -27
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/cgroup.py +72 -10
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/config.py +1 -2
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/constants.py +72 -27
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/disk_snapshot_manager.py +13 -8
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/exceptions.py +18 -2
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/guest_channel.py +303 -76
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/gvproxy.py +22 -4
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/migration_client.py +76 -45
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/overlay_pool.py +22 -5
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/qemu_cmd.py +171 -39
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/qemu_storage_daemon.py +149 -74
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/qemu_vm.py +439 -133
- exec_sandbox-0.22.0/src/exec_sandbox/qmp_exchange.py +92 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/scheduler.py +138 -44
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/session.py +137 -64
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/subprocess_utils.py +98 -12
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/system_probes.py +88 -6
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/vm_manager.py +768 -307
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/vm_working_directory.py +130 -7
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/warm_vm_pool.py +254 -89
- exec_sandbox-0.22.0/tests/benchmarks/__init__.py +0 -0
- exec_sandbox-0.22.0/tests/benchmarks/test_bench_core.py +197 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/conftest.py +92 -15
- exec_sandbox-0.22.0/tests/test_aio_utils.py +124 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_asset_downloader.py +12 -6
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_balloon_client.py +56 -10
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_cgroup.py +14 -5
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_device_security.py +16 -19
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_dns_filtering.py +63 -51
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_dns_resolv_hijack.py +3 -3
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_ech_proxy_behavior.py +15 -10
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_env_var_security.py +3 -3
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_execution_edge_cases.py +8 -6
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_guest_agent_integration.py +11 -11
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_kernel_attack_surface.py +46 -28
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_memory_optimization.py +149 -143
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_migration_client.py +148 -27
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_overlay_pool.py +36 -5
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_platform_utils.py +3 -1
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_port_forward.py +29 -10
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_qemu_storage_daemon.py +81 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_scheduler.py +636 -2
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_session.py +19 -43
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_session_guard_and_io.py +737 -101
- exec_sandbox-0.22.0/tests/test_speculative_execution.py +378 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_subprocess_utils.py +186 -1
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_vm_manager.py +1488 -130
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_vm_working_directory.py +152 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_warm_vm_pool.py +476 -28
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_write_worker.py +19 -22
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tiny-init/Cargo.toml +1 -2
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tiny-init/Makefile +3 -4
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tiny-init/src/device.rs +21 -5
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tiny-init/src/main.rs +1 -2
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tiny-init/src/sys.rs +2 -1
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/uv.lock +28 -0
- exec_sandbox-0.22.0/versions.lock +26 -0
- exec_sandbox-0.20.0/.github/workflows/test.yml +0 -624
- exec_sandbox-0.20.0/CLAUDE.md +0 -25
- exec_sandbox-0.20.0/tests/test_speculative_execution.py +0 -340
- exec_sandbox-0.20.0/tiny-init/src/zram.rs +0 -85
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/.editorconfig +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/LICENSE +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/SECURITY.md +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/cicd/version.sh +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/.gitignore +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/Cargo.lock +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/file_io.rs +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/repl/mod.rs +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/repl/scripts/js_repl.mjs +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/repl/scripts/python_repl.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/repl/scripts/shell_repl.sh +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/repl/wrappers.rs +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/types.rs +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/guest-agent/src/validation.rs +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/gvproxy-wrapper/.gitignore +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/gvproxy-wrapper/go.mod +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/gvproxy-wrapper/go.sum +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/gvproxy-wrapper/main.go +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/benchmark_density.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/benchmark_optimizer.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/build-images.sh +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/build-initramfs.sh +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/build_package_catalogs.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/ci-resource-monitor.sh +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/ci_diagnose.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/scripts/extract-vmlinux.sh +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/_imports.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/_logging.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/admission.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/asset_downloader.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/assets.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/base_cache_manager.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/cli.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/dns_filter.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/guest_agent_protocol.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/hash_utils.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/lock_utils.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/memory_snapshot_manager.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/models.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/package_validator.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/permission_utils.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/platform_utils.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/port_forward.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/process_registry.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/py.typed +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/resource_cleanup.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/resources/npm_top_10k.json +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/resources/pypi_top_10k.json +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/settings.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/socket_auth.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/validation.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/vm_timing.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/src/exec_sandbox/vm_types.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/stubs/backports/__init__.pyi +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/stubs/backports/zstd.pyi +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/__init__.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/cpu_helpers.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_admission.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_assets.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_asyncio_cleanup.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_balloon_integration.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_bun_ffi_security.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_cli.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_config.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_consume_stream.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_dask_compatibility.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_disk_snapshot_manager.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_dns_filter.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_etc_hardening.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_file_io_buffers.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_file_io_edge_cases.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_file_io_integrity.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_file_io_security.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_file_io_streaming.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_fork_output.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_fork_stdout.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_guest_agent_protocol.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_image_tools.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_int_str_digits.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_loopback.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_memory_leaks.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_memory_snapshot_manager.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_multiprocessing.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_nonroot_repl.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_orphan_vm_cpu.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_package_validator.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_payload_integrity.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_permission_utils.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_pid1_zombie_reaping.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_process_registry.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_psutil_compatibility.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_qemu_attack_surface.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_resource_cleanup.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_rng_l1_snapshot.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_rng_quality.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_signal_isolation.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_socket_auth.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_streaming.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_vm_capacity.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tests/test_wasm_compatibility.py +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tiny-init/.gitignore +0 -0
- {exec_sandbox-0.20.0 → exec_sandbox-0.22.0}/tiny-init/Cargo.lock +0 -0
|
@@ -5,26 +5,15 @@ inputs:
|
|
|
5
5
|
arch:
|
|
6
6
|
description: Target architecture (x86_64 or aarch64)
|
|
7
7
|
required: true
|
|
8
|
-
rust-version:
|
|
9
|
-
description: Rust toolchain version (sourced from Makefile rust_version)
|
|
10
|
-
required: true
|
|
11
8
|
|
|
12
9
|
runs:
|
|
13
10
|
using: composite
|
|
14
11
|
steps:
|
|
15
12
|
- name: Set up QEMU
|
|
16
|
-
uses: docker/setup-qemu-action@
|
|
13
|
+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
|
|
17
14
|
|
|
18
15
|
- name: Set up Docker Buildx
|
|
19
|
-
uses: docker/setup-buildx-action@
|
|
20
|
-
|
|
21
|
-
- name: Expose GitHub Actions cache variables
|
|
22
|
-
uses: actions/github-script@v7
|
|
23
|
-
with:
|
|
24
|
-
script: |
|
|
25
|
-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'] || '');
|
|
26
|
-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'] || '');
|
|
27
|
-
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'] || '');
|
|
16
|
+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
|
28
17
|
|
|
29
18
|
# Try to restore from latest run on same branch (hash-based caching in build script will skip if unchanged)
|
|
30
19
|
- name: Get latest run ID
|
|
@@ -43,7 +32,7 @@ runs:
|
|
|
43
32
|
|
|
44
33
|
- name: Download previous build
|
|
45
34
|
if: steps.latest-run.outputs.run_id != ''
|
|
46
|
-
uses: actions/download-artifact@
|
|
35
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
|
47
36
|
with:
|
|
48
37
|
name: guest-agent-${{ inputs.arch == 'x86_64' && 'x64' || 'arm64' }}
|
|
49
38
|
path: images/dist/
|
|
@@ -53,8 +42,4 @@ runs:
|
|
|
53
42
|
|
|
54
43
|
- name: Build guest-agent
|
|
55
44
|
shell: bash
|
|
56
|
-
env:
|
|
57
|
-
RUST_VERSION: ${{ inputs.rust-version }}
|
|
58
|
-
BUILDX_CACHE_FROM: type=gha,ignore-error=true
|
|
59
|
-
BUILDX_CACHE_TO: type=gha,mode=max,ignore-error=true
|
|
60
45
|
run: ./scripts/build-guest-agent.sh ${{ inputs.arch }}
|
|
@@ -5,26 +5,15 @@ inputs:
|
|
|
5
5
|
arch:
|
|
6
6
|
description: Target architecture (x86_64 or aarch64)
|
|
7
7
|
required: true
|
|
8
|
-
rust-version:
|
|
9
|
-
description: Rust toolchain version (sourced from Makefile rust_version)
|
|
10
|
-
required: true
|
|
11
8
|
|
|
12
9
|
runs:
|
|
13
10
|
using: composite
|
|
14
11
|
steps:
|
|
15
12
|
- name: Set up QEMU
|
|
16
|
-
uses: docker/setup-qemu-action@
|
|
13
|
+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
|
|
17
14
|
|
|
18
15
|
- name: Set up Docker Buildx
|
|
19
|
-
uses: docker/setup-buildx-action@
|
|
20
|
-
|
|
21
|
-
- name: Expose GitHub Actions cache variables
|
|
22
|
-
uses: actions/github-script@v7
|
|
23
|
-
with:
|
|
24
|
-
script: |
|
|
25
|
-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'] || '');
|
|
26
|
-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'] || '');
|
|
27
|
-
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'] || '');
|
|
16
|
+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
|
28
17
|
|
|
29
18
|
# Try to restore from latest run on same branch (hash-based caching in build script will skip if unchanged)
|
|
30
19
|
- name: Get latest run ID
|
|
@@ -43,7 +32,7 @@ runs:
|
|
|
43
32
|
|
|
44
33
|
- name: Download previous build
|
|
45
34
|
if: steps.latest-run.outputs.run_id != ''
|
|
46
|
-
uses: actions/download-artifact@
|
|
35
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
|
47
36
|
with:
|
|
48
37
|
name: tiny-init-${{ inputs.arch == 'x86_64' && 'x64' || 'arm64' }}
|
|
49
38
|
path: images/dist/
|
|
@@ -53,8 +42,4 @@ runs:
|
|
|
53
42
|
|
|
54
43
|
- name: Build tiny-init
|
|
55
44
|
shell: bash
|
|
56
|
-
env:
|
|
57
|
-
RUST_VERSION: ${{ inputs.rust-version }}
|
|
58
|
-
BUILDX_CACHE_FROM: type=gha,ignore-error=true
|
|
59
|
-
BUILDX_CACHE_TO: type=gha,mode=max,ignore-error=true
|
|
60
45
|
run: ./scripts/build-tiny-init.sh ${{ inputs.arch }}
|
|
@@ -5,9 +5,6 @@ inputs:
|
|
|
5
5
|
arch:
|
|
6
6
|
description: Target architecture (x86_64 or aarch64)
|
|
7
7
|
required: true
|
|
8
|
-
alpine-version:
|
|
9
|
-
description: Alpine Linux version (sourced from Makefile alpine_version)
|
|
10
|
-
required: true
|
|
11
8
|
variant:
|
|
12
9
|
description: Image variant (python, node, raw, or all)
|
|
13
10
|
required: false
|
|
@@ -17,18 +14,10 @@ runs:
|
|
|
17
14
|
using: composite
|
|
18
15
|
steps:
|
|
19
16
|
- name: Set up QEMU
|
|
20
|
-
uses: docker/setup-qemu-action@
|
|
17
|
+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
|
|
21
18
|
|
|
22
19
|
- name: Set up Docker Buildx
|
|
23
|
-
uses: docker/setup-buildx-action@
|
|
24
|
-
|
|
25
|
-
- name: Expose GitHub Actions cache variables
|
|
26
|
-
uses: actions/github-script@v7
|
|
27
|
-
with:
|
|
28
|
-
script: |
|
|
29
|
-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'] || '');
|
|
30
|
-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'] || '');
|
|
31
|
-
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'] || '');
|
|
20
|
+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
|
32
21
|
|
|
33
22
|
# Try to restore from latest run on same branch (hash-based caching in build script will skip if unchanged)
|
|
34
23
|
- name: Get latest run ID
|
|
@@ -47,7 +36,7 @@ runs:
|
|
|
47
36
|
|
|
48
37
|
- name: Download previous build
|
|
49
38
|
if: steps.latest-run.outputs.run_id != ''
|
|
50
|
-
uses: actions/download-artifact@
|
|
39
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
|
51
40
|
with:
|
|
52
41
|
name: vm-images-${{ inputs.arch == 'x86_64' && 'x64' || 'arm64' }}
|
|
53
42
|
path: images/dist/
|
|
@@ -57,16 +46,8 @@ runs:
|
|
|
57
46
|
|
|
58
47
|
- name: Build kernel + initramfs
|
|
59
48
|
shell: bash
|
|
60
|
-
env:
|
|
61
|
-
ALPINE_VERSION: ${{ inputs.alpine-version }}
|
|
62
|
-
BUILDX_CACHE_FROM: type=gha,ignore-error=true
|
|
63
|
-
BUILDX_CACHE_TO: type=gha,mode=max,ignore-error=true
|
|
64
49
|
run: ./scripts/extract-kernel.sh ${{ inputs.arch }}
|
|
65
50
|
|
|
66
51
|
- name: Build qcow2
|
|
67
52
|
shell: bash
|
|
68
|
-
env:
|
|
69
|
-
ALPINE_VERSION: ${{ inputs.alpine-version }}
|
|
70
|
-
BUILDX_CACHE_FROM: type=gha,ignore-error=true
|
|
71
|
-
BUILDX_CACHE_TO: type=gha,mode=max,ignore-error=true
|
|
72
53
|
run: ./scripts/build-qcow2.sh ${{ inputs.variant }} ${{ inputs.arch }}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
name: Setup VM infrastructure
|
|
2
|
+
description: >
|
|
3
|
+
Setup for running QEMU VMs: install QEMU (from build artifact on Linux,
|
|
4
|
+
brew on macOS), KVM permissions, qemu-vm user, unprivileged user namespaces,
|
|
5
|
+
cgroup delegation, and system limits.
|
|
6
|
+
Used by test-python and CodSpeed benchmark jobs.
|
|
7
|
+
|
|
8
|
+
inputs:
|
|
9
|
+
os:
|
|
10
|
+
description: Host OS (linux or macos)
|
|
11
|
+
required: true
|
|
12
|
+
arch:
|
|
13
|
+
description: Host architecture (x64 or arm64)
|
|
14
|
+
required: true
|
|
15
|
+
os-version:
|
|
16
|
+
description: Ubuntu codename for QEMU build artifact (noble or jammy)
|
|
17
|
+
required: false
|
|
18
|
+
default: noble
|
|
19
|
+
setup-cgroups:
|
|
20
|
+
description: Setup cgroup delegation (disable for sandboxed runners like CodSpeed)
|
|
21
|
+
required: false
|
|
22
|
+
default: "true"
|
|
23
|
+
|
|
24
|
+
runs:
|
|
25
|
+
using: composite
|
|
26
|
+
steps:
|
|
27
|
+
# --- Install QEMU ---
|
|
28
|
+
|
|
29
|
+
- name: Install QEMU runtime libs (Linux)
|
|
30
|
+
if: inputs.os == 'linux'
|
|
31
|
+
shell: bash
|
|
32
|
+
run: |
|
|
33
|
+
# Remove Microsoft repos that can cause 403 errors (we don't need Azure CLI etc.)
|
|
34
|
+
# See: https://github.com/actions/runner-images/issues/9733
|
|
35
|
+
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list /etc/apt/sources.list.d/azure-cli.list
|
|
36
|
+
sudo apt-get update
|
|
37
|
+
# Runtime shared libs for our QEMU build (--enable-fdt/linux-io-uring/seccomp/slirp/tools):
|
|
38
|
+
# libfdt1 (libfdt.so.1), liburing2 (liburing.so.2), libseccomp2 (libseccomp.so.2),
|
|
39
|
+
# libslirp0 (libslirp.so.0), libpixman-1-0
|
|
40
|
+
# No qemu-utils needed — our build includes qemu-img and qemu-storage-daemon (--enable-tools)
|
|
41
|
+
sudo apt-get install -y libfdt1 liburing2 libseccomp2 libslirp0 libpixman-1-0
|
|
42
|
+
|
|
43
|
+
- name: Download QEMU build (Linux)
|
|
44
|
+
if: inputs.os == 'linux'
|
|
45
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
|
46
|
+
with:
|
|
47
|
+
name: qemu-${{ inputs.arch }}-${{ inputs.os-version }}
|
|
48
|
+
path: ~/qemu-build/
|
|
49
|
+
|
|
50
|
+
- name: Install QEMU to PATH (Linux)
|
|
51
|
+
if: inputs.os == 'linux'
|
|
52
|
+
shell: bash
|
|
53
|
+
run: |
|
|
54
|
+
# Restore executable permissions (stripped by actions/download-artifact)
|
|
55
|
+
chmod +x ~/qemu-build/bin/*
|
|
56
|
+
# Uninstall any system-packaged QEMU to prevent PATH shadowing.
|
|
57
|
+
# Some runners (e.g. CodSpeed macro) ship Ubuntu's qemu-system-arm package,
|
|
58
|
+
# which lacks --enable-seccomp. Just deleting the binaries (rm -f /usr/bin/qemu-*)
|
|
59
|
+
# is insufficient: the package remains registered in dpkg, so any subsequent
|
|
60
|
+
# apt operation (e.g. CodSpeed's valgrind .deb install via apt-get) can
|
|
61
|
+
# reinstall the missing files. A clean apt remove ensures dpkg no longer
|
|
62
|
+
# considers the package installed.
|
|
63
|
+
if dpkg -l 'qemu-system-*' 2>/dev/null | grep -q '^ii'; then
|
|
64
|
+
echo "Removing system QEMU packages..."
|
|
65
|
+
sudo apt-get remove -y 'qemu-system-*' 2>/dev/null || true
|
|
66
|
+
fi
|
|
67
|
+
# Copy pre-built QEMU to /usr/local/
|
|
68
|
+
sudo cp -a ~/qemu-build/bin/* /usr/local/bin/
|
|
69
|
+
sudo cp -a ~/qemu-build/share/qemu /usr/local/share/qemu 2>/dev/null || true
|
|
70
|
+
|
|
71
|
+
- name: Install QEMU (macOS)
|
|
72
|
+
if: inputs.os == 'macos'
|
|
73
|
+
shell: bash
|
|
74
|
+
run: brew install qemu coreutils
|
|
75
|
+
|
|
76
|
+
# --- Linux-only VM isolation ---
|
|
77
|
+
|
|
78
|
+
- name: Setup KVM permissions (Linux)
|
|
79
|
+
if: inputs.os == 'linux'
|
|
80
|
+
shell: bash
|
|
81
|
+
run: |
|
|
82
|
+
# Make /dev/kvm accessible to all users for hardware acceleration
|
|
83
|
+
# Using direct chmod because udevadm trigger can fail on some runners
|
|
84
|
+
# See: https://github.com/actions/runner-images/issues/8542
|
|
85
|
+
if [ -e /dev/kvm ]; then
|
|
86
|
+
sudo chmod 666 /dev/kvm
|
|
87
|
+
echo "KVM permissions updated:"
|
|
88
|
+
ls -la /dev/kvm
|
|
89
|
+
else
|
|
90
|
+
echo "WARNING: /dev/kvm not found - KVM acceleration not available"
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
- name: Create qemu-vm user (Linux)
|
|
94
|
+
if: inputs.os == 'linux'
|
|
95
|
+
shell: bash
|
|
96
|
+
run: |
|
|
97
|
+
# Create unprivileged user for QEMU process isolation
|
|
98
|
+
# Don't specify UID - let the system assign one to avoid conflicts
|
|
99
|
+
if ! id qemu-vm &>/dev/null; then
|
|
100
|
+
sudo useradd --system --no-create-home --shell /usr/sbin/nologin qemu-vm
|
|
101
|
+
fi
|
|
102
|
+
# Add qemu-vm to kvm group for hardware acceleration access
|
|
103
|
+
sudo usermod -aG kvm qemu-vm
|
|
104
|
+
# Add runner to qemu-vm group for socket access (sockets are 0660)
|
|
105
|
+
sudo usermod -aG qemu-vm runner
|
|
106
|
+
# Allow runner to run commands AS qemu-vm (for QEMU process)
|
|
107
|
+
# Note: runner already has full sudo via GitHub Actions, so chown works
|
|
108
|
+
echo "runner ALL=(qemu-vm) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/qemu-vm
|
|
109
|
+
|
|
110
|
+
- name: Enable unprivileged user namespaces (Linux)
|
|
111
|
+
if: inputs.os == 'linux'
|
|
112
|
+
shell: bash
|
|
113
|
+
run: |
|
|
114
|
+
# Ubuntu 24.04 restricts unprivileged user namespaces via AppArmor by default
|
|
115
|
+
# Disable this restriction to allow unshare for namespace isolation
|
|
116
|
+
# See: https://ubuntu.com/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces
|
|
117
|
+
if [ -f /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
|
|
118
|
+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
|
119
|
+
fi
|
|
120
|
+
|
|
121
|
+
- name: Setup cgroup delegation (Linux)
|
|
122
|
+
if: inputs.os == 'linux' && inputs.setup-cgroups == 'true'
|
|
123
|
+
shell: bash
|
|
124
|
+
run: |
|
|
125
|
+
# cgroupv2 delegation setup for VM resource limits.
|
|
126
|
+
#
|
|
127
|
+
# Hierarchy:
|
|
128
|
+
# /sys/fs/cgroup/
|
|
129
|
+
# └── code-exec/ ← delegated root (runner-owned)
|
|
130
|
+
# ├── cgroup.subtree_control ← +memory +cpu +pids
|
|
131
|
+
# ├── runner/ ← runner process lives here
|
|
132
|
+
# └── exec-sandbox/ ← created at runtime by exec_sandbox
|
|
133
|
+
# └── session-xxx/ ← per-VM cgroup with resource limits
|
|
134
|
+
#
|
|
135
|
+
# The runner process must be moved into code-exec/runner/ (via sudo,
|
|
136
|
+
# before any sandboxed execution like CodSpeed/valgrind). Once inside,
|
|
137
|
+
# all child processes inherit the cgroup. exec_sandbox then moves QEMU
|
|
138
|
+
# from code-exec/runner/ to code-exec/exec-sandbox/session-xxx/.
|
|
139
|
+
# This intra-subtree migration only needs write to the common ancestor
|
|
140
|
+
# (code-exec/cgroup.procs), which is runner-owned — no sudo required.
|
|
141
|
+
# Ref: https://docs.kernel.org/admin-guide/cgroup-v2.html#delegation
|
|
142
|
+
#
|
|
143
|
+
sudo mkdir -p /sys/fs/cgroup/code-exec
|
|
144
|
+
# Enable controllers at root and code-exec levels for nested VM cgroups
|
|
145
|
+
echo "+memory +cpu +pids" | sudo tee /sys/fs/cgroup/cgroup.subtree_control
|
|
146
|
+
echo "+memory +cpu +pids" | sudo tee /sys/fs/cgroup/code-exec/cgroup.subtree_control
|
|
147
|
+
# Create runner cgroup (cgroups with subtree_control can't have processes directly)
|
|
148
|
+
sudo mkdir -p /sys/fs/cgroup/code-exec/runner
|
|
149
|
+
# Delegate ownership to runner user so tests can create sub-cgroups
|
|
150
|
+
sudo chown -R runner:runner /sys/fs/cgroup/code-exec
|
|
151
|
+
|
|
152
|
+
- name: Increase system limits (Linux)
|
|
153
|
+
if: inputs.os == 'linux' && inputs.setup-cgroups == 'true'
|
|
154
|
+
shell: bash
|
|
155
|
+
run: |
|
|
156
|
+
# Increase process/thread limits to prevent QEMU thread creation failures
|
|
157
|
+
# QEMU creates multiple threads per VM (iothread, vCPU, virtio workers)
|
|
158
|
+
# With parallel tests spawning multiple VMs, we can exhaust default limits
|
|
159
|
+
# References:
|
|
160
|
+
# - https://access.redhat.com/solutions/350593 (QEMU pthread_create failures)
|
|
161
|
+
# - https://www.baeldung.com/linux/max-threads-per-process (threads-max formula)
|
|
162
|
+
# - https://github.com/systemd/systemd/issues/3211 (TasksMax=512 fallout)
|
|
163
|
+
echo "=== Current limits ==="
|
|
164
|
+
ulimit -a
|
|
165
|
+
echo ""
|
|
166
|
+
echo "=== System thread/process limits ==="
|
|
167
|
+
cat /proc/sys/kernel/threads-max
|
|
168
|
+
cat /proc/sys/kernel/pid_max
|
|
169
|
+
echo ""
|
|
170
|
+
# 1. Kernel-level: increase threads-max (default = RAM/128KB, ~60k on 7GB runner)
|
|
171
|
+
# Formula: max_threads = totalram_pages / 16 (x86)
|
|
172
|
+
sudo sysctl -w kernel.threads-max=120000
|
|
173
|
+
# 2. File descriptors: raise soft limit to hard limit.
|
|
174
|
+
# Each QEMU VM needs ~7-10 fds from the orchestrator (subprocess pipes,
|
|
175
|
+
# sockets, lock files). Default soft=1024 causes SIGABRT at ~85 concurrent VMs.
|
|
176
|
+
# The Scheduler also does this at startup via raise_fd_limit(), but raising it
|
|
177
|
+
# here ensures subprocesses and test harness also benefit.
|
|
178
|
+
echo "nofile soft/hard before: $(ulimit -Sn)/$(ulimit -Hn)"
|
|
179
|
+
ulimit -n "$(ulimit -Hn)"
|
|
180
|
+
echo "nofile soft/hard after: $(ulimit -Sn)/$(ulimit -Hn)"
|
|
181
|
+
# 3. Memory mappings per process (QEMU uses many for virtio rings, RAM, etc.)
|
|
182
|
+
sudo sysctl -w vm.max_map_count=262144
|
|
183
|
+
# 3b. Overcommit: heuristic mode (0) causes kernel to reject mmap for QEMU
|
|
184
|
+
# thread stacks during burst VM startup, even with ample free RAM.
|
|
185
|
+
# glibc converts ENOMEM→EAGAIN, which QEMU treats as fatal (abort).
|
|
186
|
+
# Mode 1 ("always allow") eliminates heuristic; OOM killer is the backstop.
|
|
187
|
+
sudo sysctl -w vm.overcommit_memory=1
|
|
188
|
+
# 4. PAM limits for qemu-vm user (nproc = threads + processes per UID)
|
|
189
|
+
echo "qemu-vm soft nproc unlimited" | sudo tee -a /etc/security/limits.d/90-qemu.conf
|
|
190
|
+
echo "qemu-vm hard nproc unlimited" | sudo tee -a /etc/security/limits.d/90-qemu.conf
|
|
191
|
+
echo "runner soft nproc unlimited" | sudo tee -a /etc/security/limits.d/90-qemu.conf
|
|
192
|
+
echo "runner hard nproc unlimited" | sudo tee -a /etc/security/limits.d/90-qemu.conf
|
|
193
|
+
# 5. systemd TasksMax: default is 15% of pid_max (~4915), can limit cgroup tasks
|
|
194
|
+
# See: https://github.com/systemd/systemd/issues/3211
|
|
195
|
+
sudo mkdir -p /etc/systemd/system/user-.slice.d
|
|
196
|
+
echo -e "[Slice]\nTasksMax=infinity" | sudo tee /etc/systemd/system/user-.slice.d/90-tasksmax.conf
|
|
197
|
+
sudo systemctl daemon-reload
|
|
198
|
+
# 6. Diagnostic: dump all thread/pids limits for debugging
|
|
199
|
+
echo ""
|
|
200
|
+
echo "=== Cgroup pids limits (current session) ==="
|
|
201
|
+
CGROUP_PATH=$(cat /proc/self/cgroup | sed 's/0:://')
|
|
202
|
+
echo "Current cgroup: $CGROUP_PATH"
|
|
203
|
+
DIR="/sys/fs/cgroup${CGROUP_PATH}"
|
|
204
|
+
while [ "$DIR" != "/sys/fs/cgroup" ] && [ "$DIR" != "/" ]; do
|
|
205
|
+
PIDS_MAX=$(cat "$DIR/pids.max" 2>/dev/null || echo "N/A")
|
|
206
|
+
PIDS_CUR=$(cat "$DIR/pids.current" 2>/dev/null || echo "N/A")
|
|
207
|
+
echo " $DIR: pids.max=$PIDS_MAX pids.current=$PIDS_CUR"
|
|
208
|
+
DIR=$(dirname "$DIR")
|
|
209
|
+
done
|
|
210
|
+
echo ""
|
|
211
|
+
echo "=== RLIMIT_NPROC and RLIMIT_NOFILE for runner and qemu-vm ==="
|
|
212
|
+
cat /proc/self/limits | grep -E "Max processes|Max open files"
|
|
213
|
+
sudo -u qemu-vm cat /proc/self/limits 2>/dev/null | grep -E "Max processes|Max open files" || echo "Cannot read qemu-vm limits"
|
|
214
|
+
echo ""
|
|
215
|
+
echo "=== systemd TasksMax for user slices ==="
|
|
216
|
+
systemctl show "user-$(id -u).slice" --property=TasksMax 2>/dev/null || true
|
|
217
|
+
echo ""
|
|
218
|
+
echo "=== io_uring availability ==="
|
|
219
|
+
cat /proc/sys/kernel/io_uring_disabled 2>/dev/null || echo "sysctl not present (io_uring enabled)"
|
|
220
|
+
# 7. Remove pids.max limits from runner's cgroup hierarchy
|
|
221
|
+
# TasksMax=infinity drop-in only affects new sessions; directly write to live cgroup
|
|
222
|
+
CGROUP_PATH=$(cat /proc/self/cgroup | sed 's/0:://')
|
|
223
|
+
DIR="/sys/fs/cgroup${CGROUP_PATH}"
|
|
224
|
+
while [ "$DIR" != "/sys/fs/cgroup" ] && [ "$DIR" != "/" ]; do
|
|
225
|
+
if [ -f "$DIR/pids.max" ] && [ -w "$DIR/pids.max" ]; then
|
|
226
|
+
echo max | sudo tee "$DIR/pids.max" > /dev/null 2>&1 || true
|
|
227
|
+
fi
|
|
228
|
+
DIR=$(dirname "$DIR")
|
|
229
|
+
done
|
|
230
|
+
|
|
231
|
+
# --- Verify installation ---
|
|
232
|
+
|
|
233
|
+
- name: Verify QEMU installation
|
|
234
|
+
shell: bash
|
|
235
|
+
run: |
|
|
236
|
+
echo "=== QEMU binaries ==="
|
|
237
|
+
which qemu-system-x86_64 || echo "qemu-system-x86_64 not found"
|
|
238
|
+
which qemu-system-x86_64-microvm || echo "qemu-system-x86_64-microvm not found"
|
|
239
|
+
which qemu-system-aarch64 || echo "qemu-system-aarch64 not found"
|
|
240
|
+
echo ""
|
|
241
|
+
echo "=== QEMU version ==="
|
|
242
|
+
QEMU_BIN="${{ inputs.arch == 'x64' && 'qemu-system-x86_64' || 'qemu-system-aarch64' }}"
|
|
243
|
+
"$QEMU_BIN" --version
|
|
244
|
+
echo ""
|
|
245
|
+
echo "=== Available machine types (first 20) ==="
|
|
246
|
+
"$QEMU_BIN" -machine help | head -20
|
|
247
|
+
echo ""
|
|
248
|
+
echo "=== Hardware acceleration ==="
|
|
249
|
+
if [ "${{ inputs.os }}" = "linux" ]; then
|
|
250
|
+
ls -la /dev/kvm || echo "/dev/kvm not available"
|
|
251
|
+
else
|
|
252
|
+
sysctl kern.hv_support || echo "HVF not available"
|
|
253
|
+
fi
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# RunsOn runner profiles — diversify EC2 instance families for faster spot allocation.
|
|
2
|
+
# Docs: https://runs-on.com/configuration/runner-profiles/
|
|
3
|
+
#
|
|
4
|
+
# RAM range: cpu×2 to cpu×4 (1:2–1:4 ratio). AWS Fleet picks lowest spot price
|
|
5
|
+
# within that band. Without a floor, Fleet picks t4g.nano (0.5GB) and OOMs.
|
|
6
|
+
# r-series (1:8) excluded — never matches the 1:4 ceiling.
|
|
7
|
+
|
|
8
|
+
runners:
|
|
9
|
+
# ARM64 (Graviton) — compute + general-purpose + burstable
|
|
10
|
+
1cpu-linux-arm64: &arm64
|
|
11
|
+
cpu: 1
|
|
12
|
+
ram: [ 2, 4 ]
|
|
13
|
+
image: ubuntu24-full-arm64
|
|
14
|
+
family: [ "c7g", "m7g", "r7g", "c8g", "m8g", "t4g" ]
|
|
15
|
+
|
|
16
|
+
2cpu-linux-arm64:
|
|
17
|
+
<<: *arm64
|
|
18
|
+
cpu: 2
|
|
19
|
+
ram: [ 4, 8 ]
|
|
20
|
+
|
|
21
|
+
4cpu-linux-arm64:
|
|
22
|
+
<<: *arm64
|
|
23
|
+
cpu: 4
|
|
24
|
+
ram: [ 8, 16 ]
|
|
25
|
+
|
|
26
|
+
8cpu-linux-arm64:
|
|
27
|
+
<<: *arm64
|
|
28
|
+
cpu: 8
|
|
29
|
+
ram: [ 16, 32 ]
|
|
30
|
+
|
|
31
|
+
# x64 — Intel + AMD
|
|
32
|
+
# Note: nested-virt (KVM) only works on c8i, m8i, r8i (Intel Xeon 6).
|
|
33
|
+
# RunsOn intersects this list with nested-virt-capable families at runtime,
|
|
34
|
+
# so jobs with /nested-virt effectively use {c8i, m8i, r8i} only.
|
|
35
|
+
1cpu-linux-x64: &x64
|
|
36
|
+
cpu: 1
|
|
37
|
+
ram: [ 2, 4 ]
|
|
38
|
+
image: ubuntu24-full-x64
|
|
39
|
+
family: [ "c7i", "m7i", "r7i", "c7a", "m7a", "c8i", "m8i", "r8i", "c8a", "m8a" ]
|
|
40
|
+
|
|
41
|
+
2cpu-linux-x64:
|
|
42
|
+
<<: *x64
|
|
43
|
+
cpu: 2
|
|
44
|
+
ram: [ 4, 8 ]
|
|
45
|
+
|
|
46
|
+
4cpu-linux-x64:
|
|
47
|
+
<<: *x64
|
|
48
|
+
cpu: 4
|
|
49
|
+
ram: [ 8, 16 ]
|
|
50
|
+
|
|
51
|
+
8cpu-linux-x64:
|
|
52
|
+
<<: *x64
|
|
53
|
+
cpu: 8
|
|
54
|
+
ram: [ 16, 32 ]
|