From 5eb5119d00ab26da97394844f65e4bd8a2b8538a Mon Sep 17 00:00:00 2001 From: Sirac Ozmen Date: Sat, 24 Oct 2026 03:29:20 +0300 Subject: [PATCH 1/2] ci: give the container an init that reaps orphans --- .github/workflows/cpp.yml | 6 ++++-- .github/workflows/init-probe.yml | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/init-probe.yml diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 8874415..26cc35f 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -69,9 +69,11 @@ jobs: runs-on: ${{ inputs.runner }} timeout-minutes: ${{ inputs.timeout }} # The CI image, pinned by digest; a new version is a new pin of this - # workflow. zizmor reads the null of the macOS and Windows branch as an + # workflow. --init gives the container a PID 1 that reaps orphans, so a + # daemon a test stops is gone rather than a zombie that still looks + # alive. zizmor reads the null of the macOS and Windows branch as an # unpinned image. - container: ${{ startsWith(inputs.runner, 'ubuntu') && 'ghcr.io/rawframe-project/ci-cpp:2026.10.6@sha256:50c383f608f992c272196139d749f15978e35143a2876362b1e0aef6993480bd' || null }} # zizmor: ignore[unpinned-images] + container: ${{ startsWith(inputs.runner, 'ubuntu') && fromJSON('{"image":"ghcr.io/rawframe-project/ci-cpp:2026.10.6@sha256:50c383f608f992c272196139d749f15978e35143a2876362b1e0aef6993480bd","options":"--init"}') || null }} # zizmor: ignore[unpinned-images] permissions: contents: read steps: diff --git a/.github/workflows/init-probe.yml b/.github/workflows/init-probe.yml new file mode 100644 index 0000000..248027c --- /dev/null +++ b/.github/workflows/init-probe.yml @@ -0,0 +1,13 @@ +name: init-probe +on: pull_request +permissions: {} +jobs: + probe: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + container: ${{ fromJSON('{"image":"ghcr.io/rawframe-project/ci-cpp:2026.10.6@sha256:50c383f608f992c272196139d749f15978e35143a2876362b1e0aef6993480bd","options":"--init"}') }} + steps: + - run: | + cat /proc/1/comm + sh -c 'sleep 30 & echo $! > /tmp/p' ; sleep 1; kill "$(cat /tmp/p)"; sleep 1 + if [ -e "/proc/$(cat /tmp/p)" ]; then echo "zombie left: $(cat /proc/$(cat /tmp/p)/stat)"; exit 1; else echo "orphan reaped"; fi From f88ddbdaf68a77bd1cf47cb1be4a8b051d394d3d Mon Sep 17 00:00:00 2001 From: Sirac Ozmen Date: Sat, 24 Oct 2026 03:39:51 +0300 Subject: [PATCH 2/2] ci: drop the init probe --- .github/workflows/init-probe.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .github/workflows/init-probe.yml diff --git a/.github/workflows/init-probe.yml b/.github/workflows/init-probe.yml deleted file mode 100644 index 248027c..0000000 --- a/.github/workflows/init-probe.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: init-probe -on: pull_request -permissions: {} -jobs: - probe: - runs-on: ubuntu-24.04 - timeout-minutes: 5 - container: ${{ fromJSON('{"image":"ghcr.io/rawframe-project/ci-cpp:2026.10.6@sha256:50c383f608f992c272196139d749f15978e35143a2876362b1e0aef6993480bd","options":"--init"}') }} - steps: - - run: | - cat /proc/1/comm - sh -c 'sleep 30 & echo $! > /tmp/p' ; sleep 1; kill "$(cat /tmp/p)"; sleep 1 - if [ -e "/proc/$(cat /tmp/p)" ]; then echo "zombie left: $(cat /proc/$(cat /tmp/p)/stat)"; exit 1; else echo "orphan reaped"; fi