Skip to content

build: cap checkout commit messages at 16 KiB - #3286

Merged
nuclearcat merged 1 commit into
kernelci:mainfrom
nuclearcat:fix/kubernetes-python-script
Nov 27, 2026
Merged

nuclearcat merged 1 commit into
kernelci:mainfrom
nuclearcat:fix/kubernetes-python-script

Conversation

@nuclearcat

@nuclearcat nuclearcat commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

On November 26, 77 retained Kubernetes build logs showed exec /usr/bin/env: argument list too long. The kbuild template embeds the Maestro node, including the full Git commit message, in a single python3 -c argument. On a Linux worker with 4 KiB pages the maximum payload for one argument is 131,071 bytes. Validation run · Example pod log · Linux execve limits

Change

The pipeline tarball service calls kernelci.build.git_commit_message() before it writes the kernel revision to the Maestro checkout. Limit the message returned there to the first 16 KiB of UTF-8, ending on a complete character. Child jobs inherit that revision, and the KCIDB exporter reads the same field. This keeps long merge messages out of new checkout and child nodes across runtimes. The commit SHA identifies the full message in Git. Checkout producer

The change takes effect when the tarball service runs the updated kernelci-core. Existing nodes, including checkouts used for retries, can still carry their original messages.

Why 16 KiB

Of 1,328 production checkouts over the 30 days ending November 26 at 15:12 UTC, 1,295 had a recorded message, each from a distinct commit. The median was 736 bytes, the 99th percentile was 9,516 bytes and the maximum was 168,784 bytes. A 16 KiB cap kept 1,283 messages in full (99.07%). All 12 longer messages came from Android. An 8 KiB cap would also shorten one mainline merge message. Mainline example · Largest Android example

Verification

Replayed three affected Android builds locally using the recorded checkout messages as Git commit objects. Read each message through the updated helper, copied the resulting field into the recorded build node and rendered the production template. All three original arguments raised E2BIG. All three shortened invocations started with the build entry point disabled.

Android branch Original argument, bytes Revised argument, bytes
android13-5.15-lts 139,904 23,776
android14-6.1-lts 181,408 23,791
android17-6.18 131,074 23,495

Five regression cases cover empty and short messages, the exact byte limit, overflow and a multibyte character crossing the boundary. Ruff passed. The full unit suite had 293 passes and two rootfs configuration-count failures also present on the base branch.

@nuclearcat nuclearcat changed the title runtime: run Kubernetes Python jobs from a mounted file runtime: cap Kubernetes kbuild commit messages at 16 KiB Nov 26, 2026
@nuclearcat
nuclearcat force-pushed the fix/kubernetes-python-script branch from c31e4a5 to 0ccc7e1 Compare November 27, 2026 08:39
The tarball service stores the Git commit message on the checkout node.
Child jobs inherit that revision, so a long merge message is copied
across Maestro nodes and into job payloads. On November 26, Android
merge messages pushed rendered kbuild arguments past the Linux limit
and prevented workers from starting Python.

Limit the checkout metadata to a 16 KiB UTF-8 prefix when reading the
message from Git. In a 30-day sample, 1,283 of 1,295 recorded messages
fit in that space. The commit SHA still identifies the full message.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@nuclearcat
nuclearcat force-pushed the fix/kubernetes-python-script branch from 0ccc7e1 to bbfe606 Compare November 27, 2026 08:49
@nuclearcat nuclearcat changed the title runtime: cap Kubernetes kbuild commit messages at 16 KiB build: cap checkout commit messages at 16 KiB Nov 27, 2026
@nuclearcat
nuclearcat marked this pull request as ready for review November 27, 2026 12:10
@nuclearcat
nuclearcat added this pull request to the merge queue Nov 27, 2026
Merged via the queue into kernelci:main with commit 9a10f8f Nov 27, 2026
3 checks passed
@nuclearcat
nuclearcat deleted the fix/kubernetes-python-script branch November 27, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant