Skip to content

Cap GoReleaser build parallelism to avoid OOM on the release runner#466

Merged
goccy merged 1 commit into
mainfrom
fix-release-oom
May 18, 2026
Merged

Cap GoReleaser build parallelism to avoid OOM on the release runner#466
goccy merged 1 commit into
mainfrom
fix-release-oom

Conversation

@goccy

@goccy goccy commented May 18, 2026

Copy link
Copy Markdown
Owner

Problem

The first GoReleaser run of the new release pipeline (run 26036447466) failed. The Run GoReleaser log stops dead at building binaries with four concurrent builds in flight, then the job is finalized as failure ~8.5 minutes later with no error message and no ##[error] annotation — even in the raw downloaded log. That signature means the runner agent itself was OOM-killed.

Cause

A single cold go build of this project peaks at ~5.6 GB RSS:

44.98 real   248.10 user   37.63 sys
5602304000  maximum resident set size

GoReleaser defaults --parallelism to the CPU count (4 on ubuntu-latest), so building four targets at once needs ~22 GB on a 16 GB runner. The runner thrashed into swap (hence 8.5 min for sub-minute builds) and was killed. The Docker image job succeeded because it only builds the two linux targets via buildx.

Fix

Pass --parallelism 1 so targets build one at a time and memory stays bounded (~6 targets × ~45 s ≈ 5 min).

🤖 Generated with Claude Code

The first GoReleaser run of the new release pipeline was killed on the
CI runner. The `Run GoReleaser` log stops dead at `building binaries`
with four concurrent builds in flight and no error or `##[error]`
annotation, even in the raw downloaded log -- the signature of the
runner agent being OOM-killed.

A single cold `go build` of this project peaks at ~5.6 GB RSS.
GoReleaser defaults `--parallelism` to the CPU count (4 on
ubuntu-latest), so building four targets at once needs ~22 GB on a
16 GB runner and the runner thrashes into swap before dying.

Pass `--parallelism 1` so the targets build one at a time and memory
stays bounded.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@goccy goccy merged commit 283a94d into main May 18, 2026
10 checks passed
@goccy goccy deleted the fix-release-oom branch May 18, 2026 13:58
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