Skip to content

fix(ci): limit Jenkins matrix and Cargo concurrency - #455

Merged
agicy merged 3 commits into
syswonder:devfrom
correctorall:fix/ci-bounded-concurrency
Nov 28, 2026
Merged

agicy merged 3 commits into
syswonder:devfrom
correctorall:fix/ci-bounded-concurrency

Conversation

@correctorall

@correctorall correctorall commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Run all 21 Jenkins platform jobs through a rolling queue. The initial
profile allows two active platforms and two Cargo jobs per platform.
Pause dispatch below 4 GiB of available memory, resume at 5 GiB, and
archive resource samples and per-platform results.

Motivation

During PR #451, the Linux OOM killer terminated Jenkins while the
pipeline was compiling 21 platforms concurrently. Each Cargo build
can also run multiple compiler jobs, increasing peak memory demand.

Verification

  • PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=jenkins python3 -m unittest discover -s jenkins/tests -v — 24 passed.
  • Ruff, Prettier, and Jenkinsfile validation passed.
  • Two local Jenkins runs with stub tasks scheduled all 21 platforms
    with a peak concurrency of two. An injected failure still allowed
    the other 20 platforms to finish, and the build reported failure.

Risks and Limitations

Lower concurrency may increase total CI time. The 2×2 profile is a
pilot. A full run on the project's Jenkins node is pending to measure
memory usage during real compilation, QEMU tests, and board tests.

Phytium-Pi network verification

The first Jenkins run reached U-Boot but timed out resolving the old
TFTP server address, 192.168.1.181. Update the U-Boot and Linux
deployment settings to use 192.168.10.111 for the server and
192.168.10.179/24 for the board.

Manual verification passed: U-Boot downloaded
phytium-pi/hvisor.bin from 192.168.10.111 and reported
Bytes transferred = 197024. The full Jenkins board regression
is pending.

wzm and others added 2 commits November 27, 2026 10:51
Schedule the existing 21 BIDs through a rolling worker queue, constrain builds and test-time recompilation, and record memory pressure and per-cell outcomes. Preserve the in-tree hvisor-tool build and configured functional tests. Start with an explicitly unvalidated 2x2 pilot until full CI measurements establish a safe profile.
@github-actions github-actions Bot added the bug Something isn't working label Nov 27, 2026
@li041

li041 commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Thanks for fixing the CI that has been down for a long time!

A couple of questions before this lands:

  1. OOM evidence: The PR description says the OOM killer terminated Jenkins during PR fix(hvisor-tool): release virtio and SCMI resources on zone shutdown #451 while compiling 21 platforms concurrently. However, OOM issues haven't shown up before. Could you provide more detailed information to substantiate that compiling 21 Cargo builds actually causes OOM? For example, memory usage logs/samples from that run, the node's total memory, peak RSS per Cargo build, etc. It would help to confirm the root cause rather than just the symptom.

  2. Rolling vs. concurrent timing: The new approach uses a rolling queue (2 active platforms, 2 Cargo jobs each). Have you actually measured and compared the total CI time between the old fully-concurrent approach and the new rolling one? The PR itself notes "Lower concurrency may increase total CI time" and that the 2×2 profile is "a pilot" — a before/after timing comparison would make it much easier to judge whether the trade-off is acceptable.

Thanks!

@agicy
agicy requested review from agicy and dallasxy November 28, 2026 05:18

@agicy agicy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@agicy
agicy merged commit 87dfdbe into syswonder:dev Nov 28, 2026
32 checks passed
@agicy

agicy commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

@correctorall

Thank you for fixing up CI. But I re-tested this code and found something interesting:

So I suggest in #459, that:

  • Split compilation and integration test
  • The compilation part is just fetch hvisor code after env ready and:
    • get all BID
    • compile one BID one after another, no clean is needed
    • collect errors, and report all after all BID is compiled
    • no need to clean between different BID
  • Report errors if exists, and clean the assets up

This way, there is no need to bound concurrency. And it might be much simpler and faster?

@agicy

agicy commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Addition

I run all BID compilation used about 64 seconds in total on my MacBook Air. The time is calculated by:

  • toolchain ready
  • clean up
  • start timer
  • build aarch64/
    • imx8mp (cold, 11s)
    • jeston-orin (warm, 2s)
    • ...
    • zcu102
  • build loongarch64/
    • ls3a5000 (cold, 9s)
    • ls3a6000 (warm, 2s)
  • build riscv64/
    • cold 9s, warm 1s
  • build x86_64/
    • cold 11s, warm 2s
  • report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants