HomeClusterLabs Projects
Diffusion Booth f93d028b364c

Don't lock all current and future memory if can't increase memlock rlimit

Description

Don't lock all current and future memory if can't increase memlock rlimit

If we fail to increase our RLIMIT_MEMLOCK, then locking all our current
and future memory is extremely dangerous; once our memory use reaches
our RLIMIT_MEMLOCK, memory allocations will start failing, very likely
leading to our entire process crashing.

This can happen if we aren't a privileged process, for example if
running as non-root user, or inside an unprivileged container.

Details

Provenance
Dan Streetman <ddstreet@canonical.com>Authored on Mar 11 2021, 12:20 PM
Parents
rB977726e673b5: Merge pull request #105 from ClusterLabs/misc-fixes
Branches
Unknown
Tags
Unknown

Event Timeline