Skip to content

Conversation

stephanlachnit
Copy link
Contributor

When using scan-build, it uses all threads by default. In cloud environments where the exposed number of cores by system might not be the same as the available cores, this can be a problem leading to OOM.

The simple fix is adding the number of cores via -j to the ninja invocation using the determine_worker_count function.

@stephanlachnit
Copy link
Contributor Author

stephanlachnit commented Oct 7, 2025

Example job that is OOMs because scan-build uses 64 threads from the CPU instead of the available 8 in the runner: https://gitlab.desy.de/constellation/constellation/-/jobs/982477 (MESON_NUM_PROCESSES is set but ignored)

@stephanlachnit
Copy link
Contributor Author

@bonzini I'm not sure if there is a 1.8.6 release planned to be included in Fedora 43, but this would be a good addition for such a release.

@dcbaker
Copy link
Member

dcbaker commented Oct 8, 2025

@stephanlachnit Can you rebase this, that should resolve the red CI

@stephanlachnit stephanlachnit force-pushed the p-scan-build-num-processes branch from 2435501 to 063458a Compare October 9, 2025 09:45
@stephanlachnit
Copy link
Contributor Author

@stephanlachnit Can you rebase this, that should resolve the red CI

@dcbaker done!

Copy link
Member

@dcbaker dcbaker left a comment

Choose a reason for hiding this comment

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

This seems fine to me, the failure in CI isn't related to this change.

@dcbaker dcbaker merged commit 02c38fe into mesonbuild:master Oct 14, 2025
30 of 32 checks passed
@stephanlachnit stephanlachnit deleted the p-scan-build-num-processes branch October 15, 2025 11:51
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