sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #02222
[Bug 1830746] Re: memlock setting in systemd (pid 1) too low for containers (bionic)
Hello Kees, or anyone else affected,
Accepted systemd into bionic-proposed. The package will build now and be
available at
https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.43 in a few
hours, and then in the -proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
bionic to verification-done-bionic. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-bionic. In either case, without details of your testing we will
not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: systemd (Ubuntu Bionic)
Status: In Progress => Fix Committed
** Tags added: verification-needed verification-needed-bionic
--
You received this bug notification because you are a member of STS
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1830746
Title:
memlock setting in systemd (pid 1) too low for containers (bionic)
Status in systemd package in Ubuntu:
Fix Released
Status in systemd source package in Bionic:
Fix Committed
Status in systemd source package in Cosmic:
Won't Fix
Status in systemd source package in Disco:
Won't Fix
Status in systemd source package in Eoan:
Fix Released
Status in systemd source package in Focal:
Fix Released
Bug description:
[Impact]
* Since systemd commit fb3ae275cb ("main: bump RLIMIT_NOFILE for the root user substantially") [https://github.com/systemd/systemd/commit/fb3ae275cb], which is present in Bionic, the memlock ulimit value was bumped to 16M. It's an adjustable limit, but the default (in previous Ubuntu releases/systemd versions) was really small.
* Although bumping this value was a good thing, 16M is not enough and we can see failures on mlock'ed allocations on Bionic, like the one hereby reported by Kees or the recent introduced cryptsetup build failures (due to PPA builder updates to Bionic) - see https://bugs.launchpad.net/bugs//1891473.
* It's especially harmful in containers to have such "small" limit, so
we are hereby SRUing a more recent bump from upstream systemd, in the
form of commit 91cfdd8d29 ("core: bump mlock ulimit to 64Mb")
[https://github.com/systemd/systemd/commit/91cfdd8d29]. Latest Ubuntu
releases, like Focal and subsequent ones, already include this patch
so effectively we're putting Bionic on-par with newer releases.
* A discussion about this topic (leading to this SRU) is present in
ubuntu-devel ML: https://lists.ubuntu.com/archives/ubuntu-
devel/2020-September/041159.html.
[Test Case]
* The straightforward test is to just look "ulimit -l" and "ulimit -Hl" in a current Bionic system, and then install an updated version with the hereby proposed SRU to see such limit bump from 16M to 64M (after a reboot) - a version containing this fix is available at my PPA as of 2020-09-10 [0] (likely to be deleted in next month or so).
* A more interesting test is to run a Focal container in a current
Bionic system and try to build the cryptsetup package - it'll fail in
some tests. After updating the host (Bionic) systemd to include the
mlock bump patch, the build succeeds in the Focal container.
[Regression Potential]
* Since it's a simple bump and it makes Bionic behave like Focal, I don't foresee regressions. One potential issue would be if some users rely on the lower default limit (16M) and this value is bumped by a package update, but that could be circumvented by setting a lower limit in limits.conf. The benefits for such bump are likely much bigger than any "regression" caused for users relying on such default limit.
[0] https://launchpad.net/~gpiccoli/+archive/ubuntu/test1830746
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1830746/+subscriptions