memlock setting in systemd (pid 1) too low for containers (bionic)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
High
|
Guilherme G. Piccoli | ||
Bionic |
Fix Released
|
High
|
Guilherme G. Piccoli | ||
Cosmic |
Won't Fix
|
High
|
Guilherme G. Piccoli | ||
Disco |
Won't Fix
|
High
|
Guilherme G. Piccoli | ||
Eoan |
Fix Released
|
High
|
Guilherme G. Piccoli | ||
Focal |
Fix Released
|
High
|
Guilherme G. Piccoli |
Bug Description
[Impact]
* Since systemd commit fb3ae275cb ("main: bump RLIMIT_NOFILE for the root user substantially") [https:/
* 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:/
* 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:/
* A discussion about this topic (leading to this SRU) is present in ubuntu-devel ML: https:/
[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:/
Changed in systemd (Ubuntu Disco): | |
status: | New → Won't Fix |
description: | updated |
Changed in systemd (Ubuntu Focal): | |
status: | New → Fix Released |
importance: | Undecided → High |
assignee: | nobody → Guilherme G. Piccoli (gpiccoli) |
tags: |
added: seg removed: patch rls-dd-incoming |
tags: | added: sts sts-sponsor-ddstreet |
tags: | added: block-proposed-bionic |
The attachment "fix-memlock- bump.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]