Ray's Knowledge Base
Unlock

The GCC 12 container build runs out of memory at 12 parallel jobs

PitfallVerified 5 Oct 2026Holds project: dftracer-utils
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

A full build in the GCC 12 Docker container with 12 parallel compiles is killed for memory. Test results from that build are void: a kill or OOM in the build log means the run is invalid, not that tests failed.

Cause#

Too many parallel compiles for the container's memory.

Fix#

Rerun with 4 parallel jobs (-j4); it completes. Check the build log tail for OOM before trusting any test result from the container.

Evidence#

Seen while making make docker-test-gcc12 work (commit 5a12a75a).

Also found by searching

  • docker-test-gcc12 build killed, test results invalid
  • container build runs out of memory with many parallel compiles
  • how many parallel jobs for the GCC 12 container build
  • OOM kill in docker build log