Skip to content

Added memory guard in Makefile#803

Open
chrngc wants to merge 1 commit intoopen-edge-platform:3.0-devfrom
chrngc:mem
Open

Added memory guard in Makefile#803
chrngc wants to merge 1 commit intoopen-edge-platform:3.0-devfrom
chrngc:mem

Conversation

@chrngc
Copy link
Contributor

@chrngc chrngc commented Mar 9, 2026

Merge Checklist

All boxes should be checked before merging the PR

  • The changes in the PR have been built and tested
  • [] cgmanifest file has been updated if required
  • [] Ready to merge

Description

During an event of OOM (out of memory) the build process will be stuck and random processes will be killed. The previous fix for this inconvenience was done by limiting the concurrent build and processing thread. This PR has added a systemctl memory guard into the Makefile to rerun the whole build process in a systemctl scope. Through this method the whole process tree spawned by the Makefile is able to be killed, either by user request or through the systemctl OOM kill process. This addition scans for current available machine memory and add a 2GB buffer, the minimum RAM required is 3GB. When the hard memory limit is reached OOM kill will be initiated and the whole build process tree will be killed.
image

Any Newly Introduced Dependencies

How Has This Been Tested?

Tested with full build, delta build, make iso, the process is able to be killed during an event of OOM, the whole build process is now able to be killed with systemctl instead of hard resetting the machine.

@chrngc chrngc requested a review from a team as a code owner March 9, 2026 03:58
@andy-vm
Copy link
Contributor

andy-vm commented Mar 13, 2026

is this change tested in current build pipelines to ensure no impact to current CI?

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.

2 participants