Disable mlockall() call for systemd-240

Bug #1815493 reported by Khurshid Alam on 2019-02-11
This bug affects 2 people
Affects Status Importance Assigned to Milestone
unity-greeter (Ubuntu)

Bug Description

With systemd-240 unity-greeter fails to start on most systems and always fails on 32 bit.

According to systemd-dev,

"mlockall() is generally a bad idea and certainly has no place in a graphical program.
A program like this uses lots of memory and it is crucial that this memory can be paged
out to relieve memory pressure."

With systemd version 239 the ulimit for RLIMIT_MEMLOCK was set to 16 MiB
and therefore the mlockall call would fail. This is lucky becasue the subsequent mmap would not fail.

With systemd version 240 the RLIMIT_MEMLOCK is now set to 64 MiB
and now the mlockall no longer fails. However, it not possible to mmap in all
the memory and because that would still exceed the MEMLOCK limit.
See https://bugzilla.redhat.com/show_bug.cgi?id=1662857 &

RLIMIT_MEMLOCK = 64 MiB means, unity-greeter will most likely fail with 64 bit and
will always fail on 32 bit systems.

Hence we better disable it.

Related branches

description: updated
Changed in unity-greeter (Ubuntu):
status: New → Confirmed
Jeremy Bicha (jbicha) on 2019-02-11
Changed in unity-greeter (Ubuntu):
importance: Undecided → Critical
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-greeter - 18.04.0+18.10.20180926-0ubuntu2

unity-greeter (18.04.0+18.10.20180926-0ubuntu2) disco; urgency=medium

  * src/unity-greeter.vala:
    - don't use mlockall, it's not meant to be used like that and stopped
      working with the newer systemd version (lp: #1815493)
  * debian/control:
    - don't suggests packages that have not been part of Ubuntu since trusty
  * debian/rules:
    - enable the version number to the current serie

 -- Sebastien Bacher <email address hidden> Tue, 19 Feb 2019 16:48:37 +0100

Changed in unity-greeter (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers