lightdm causes all greeters to fail to start

Bug #1662244 reported by Doug Goldstein
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Invalid
Undecided
Unassigned
LightDM GTK Greeter
Invalid
Undecided
Unassigned
lightdm (Ubuntu)
Invalid
Undecided
Unassigned
unity-greeter (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

lightdm is failing to start. Best guess is because of unity-session-manager. This is from .xsession-errors.

dbus-update-activation-environment: setting _=/usr/bin/dbus-update-activation-environment
upstart: click-user-hooks main process (4028) terminated with status 1
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon main process ended, respawning
upstart: unity-settings-daemon respawning too fast, stopped
upstart: indicator-application main process ended, respawning
upstart: indicator-application main process ended, respawning
upstart: indicator-application respawning too fast, stopped
xbrlapi: window 0x03a00084 changed to NULL name
xbrlapi: window 0x03a00084 changed to NULL name
xbrlapi: window 0x03c00084 changed to NULL name
xbrlapi: window 0x03c00084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
xbrlapi: window 0x04000084 changed to NULL name
upstart: dbus main process (4023) killed by TERM signal

I've tried to move aside $HOME/.config/dconf/user and that didn't work. I've reverted kernel versions and that didn't work. I've moved aside $HOME/.cache and that didn't work.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: lightdm 1.19.5-0ubuntu1
ProcVersionSignature: Ubuntu 4.8.0-30.32-generic 4.8.6
Uname: Linux 4.8.0-30-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.20.3-0ubuntu8.2
Architecture: amd64
Date: Mon Feb 6 10:21:29 2017
InstallationDate: Installed on 2015-07-20 (566 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
SourcePackage: lightdm
UpgradeStatus: Upgraded to yakkety on 2016-12-14 (53 days ago)

Revision history for this message
Doug Goldstein (cardoe) wrote :
Revision history for this message
Doug Goldstein (cardoe) wrote :

Realized that it's likely unity-greeter because I'm seeing a lot of...

[25886.110278] traps: unity-greeter[820] trap int3 ip:7fb856a35241 sp:7fff145ad0f0 error:0 in libglib-2.0.so.0.5000.0[7fb8569e5000+110000]

I've got libglib2.0 2.50.2-2ubuntu1 so I tried to roll back to 2.50.0-1 but that didn't help either. libglib-2.0 was something that was upgraded in between my last reboot.

Doug Goldstein (cardoe)
no longer affects: lightdm
no longer affects: lightdm (Ubuntu)
summary: - lightdm fails to start
+ unity-greeter crashes causing lightdm to fail to start
Revision history for this message
Doug Goldstein (cardoe) wrote : Re: unity-greeter crashes causing lightdm to fail to start
Download full text (5.6 KiB)

Here's the backtrace I'm getting out of unity-greeter. Unfortunately there's no debug symbols available for it to find what's at the bottom of the stack trace.

#0 _g_log_abort (breakpoint=breakpoint@entry=1) at ././glib/gmessages.c:487
#1 0x00007ffff5c8a64d in g_logv (log_domain=0x7ffff5ccbd6e "GLib",
    log_level=G_LOG_LEVEL_ERROR, format=<optimized out>,
    args=args@entry=0x7fffffffd7c0) at ././glib/gmessages.c:1296
#2 0x00007ffff5c8a7af in g_log (
    log_domain=log_domain@entry=0x7ffff5ccbd6e "GLib",
    log_level=log_level@entry=G_LOG_LEVEL_ERROR,
    format=format@entry=0x7ffff5cd56c8 "%s: failed to allocate %lu bytes")
    at ././glib/gmessages.c:1337
#3 0x00007ffff5c88ed1 in g_realloc (mem=<optimized out>, n_bytes=131072)
    at ././glib/gmem.c:164
#4 0x00007ffff5c56869 in g_array_maybe_expand (
    array=array@entry=0x55555590aa40, len=len@entry=40)
    at ././glib/garray.c:779
#5 0x00007ffff5c56be8 in g_array_append_vals (farray=0x55555590aa40,
    data=0x7fffffffd9a0, len=40) at ././glib/garray.c:418
#6 0x00007ffff5c57d09 in g_byte_array_append (
    array=array@entry=0x55555590aa40, data=data@entry=0x7fffffffd9a0 "",
    len=len@entry=40) at ././glib/garray.c:1713
#7 0x00007ffff6f57d34 in alloc_tree (offset=<synthetic pointer>,
    array=0x55555590aa40) at ././gtk/gtkcssselector.c:1726
#8 subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555968020, parent_offset=parent_offset@entry=65392)
    at ././gtk/gtkcssselector.c:1779
#9 0x00007ffff6f57f73 in subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555967f20, parent_offset=parent_offset@entry=65392)
    at ././gtk/gtkcssselector.c:1824
#10 0x00007ffff6f57f5c in subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555967ec0, parent_offset=parent_offset@entry=65352)
    at ././gtk/gtkcssselector.c:1821
#11 0x00007ffff6f57f5c in subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555968100, parent_offset=parent_offset@entry=65312)
    at ././gtk/gtkcssselector.c:1821
#12 0x00007ffff6f57f5c in subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555967a20, parent_offset=parent_offset@entry=62904)
    at ././gtk/gtkcssselector.c:1821
#13 0x00007ffff6f57f73 in subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555967740, parent_offset=parent_offset@entry=62904)
    at ././gtk/gtkcssselector.c:1824
#14 0x00007ffff6f57f73 in subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555966b20, parent_offset=parent_offset@entry=62904)
    at ././gtk/gtkcssselector.c:1824
#15 0x00007ffff6f57f5c in subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555961b80,
    parent_offset=parent_offset@entry=2147483647)
    at ././gtk/gtkcssselector.c:1821
#16 0x00007ffff6f57f73 in subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555959a20,
    parent_offset=parent_offset@entry=2147483647)
    at ././gtk/gtkcssselector.c:1824
#17 0x00007ffff6f57f73 in subdivide_infos (array=array@entry=0x55555590aa40,
    infos=infos@entry=0x555555953020,
    parent_offset=par...

Read more...

Revision history for this message
Doug Goldstein (cardoe) wrote :

I've tried lightdm-gtk-greeter and kylin-greeter and the same crash occurs. So I'm back to thinking this issue is with lightdm. Some data or configuration its passing to the greeter is causing it to fail.

I've removed all the dot directories (.cache, .config, .dbus, .gconf, and .local) inside of /var/lib/lightdm and still am experiencing this.

summary: - unity-greeter crashes causing lightdm to fail to start
+ lightdm causes all greeters to fail to start
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Does the lightdm.log say anything useful? The stack trace looks like an out of memory condition, which could be either liblightdm or GTK+ failing to work? I'd suggest trying different versions of those libraries.

Revision history for this message
Doug Goldstein (cardoe) wrote :

The lightdm.log is very repetitive so I just snipped out the last run since they all appear to be identical.

Revision history for this message
Doug Goldstein (cardoe) wrote :

Thanks for the response Robert. I'll give both a shot.

Revision history for this message
Doug Goldstein (cardoe) wrote :

Unfortunately that didn't work. I went back to the versions that 16.10 originally shipped with and its still broken. I'm guessing some data file that gets generated got corrupted and its causing this but I'm unable to find it. I've taken an strace of lightdm-gtk-greeter showing the failure to help track this down

Revision history for this message
Doug Goldstein (cardoe) wrote :

Just prior to the SIGTRAP I see a mmap() fail with EAGAIN and a failing ioctl() call. This is from the attached strace with the other noise trimmed out.

4108 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_ST
ACK, -1, 0 <unfinished ...>
4108 <... mmap resumed> ) = -1 EAGAIN (Resource temporarily unavai
lable)
4108 ioctl(2, TCGETS <unfinished ...>
4108 <... ioctl resumed> , 0x7ffcbb763220) = -1 ENOTTY (Inappropriate ioctl for
 device)
4108 write(2, "\n(lightdm-gtk-greeter:4108): GLi"..., 125 <unfinished ...>
4108 <... write resumed> ) = 125
4108 --- SIGTRAP {si_signo=SIGTRAP, si_code=SI_KERNEL} ---

Revision history for this message
Doug Goldstein (cardoe) wrote :

Well the ioctl() call isn't really an issue because stderr isn't hooked to a tty in the way that a greeter is started up so that's normal.

The EAGAIN is interesting because I recently installed a package dealing with hugepages and it created some rules in /etc/security/limits.d

Revision history for this message
Doug Goldstein (cardoe) wrote :

Sure enough removing the 'hugepages' package has solved the issue.

Changed in lightdm:
status: New → Invalid
Changed in lightdm-gtk-greeter:
status: New → Invalid
Changed in lightdm (Ubuntu):
status: New → Invalid
Changed in unity-greeter (Ubuntu):
status: New → Invalid
Revision history for this message
Horst Schirmeier (horst) wrote :

Please reopen. This just bit me on 17.10, using some manually configured soft and hard memlock limits in /etc/security/limits.conf:

* soft memlock 262144
* hard memlock 262144

As these limits *increase* max locked memory from 64 to 262144 kB, it took me quite some time (and a lucky google hit on this bug report) to locate this as the cause.

Revision history for this message
Horst Schirmeier (horst) wrote :

This is BTW almost exactly the same what 'hugepages' does -- *increasing* memlock limits to 262144 kB.

Revision history for this message
torel (torehl) wrote :

Seen on 18.04.1. WorkARound?

* soft memlock 262144
* hard memlock 262144
# End of file

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Does setting:
[LightDM]
lock-memory=false

Workaroud this issue?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

(in lightdm.conf)

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Hi, a recent systemd update in 18.04 makes slick-greeter segfault.
So all Ubuntu MATE 18.04 users now get black screens instead of lightdm.

It's related to memory limits so I'm cross-referencing it here:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1830746

This didn't help:

[LightDM]
lock-memory=false

Can I put something in /etc/security/limits.conf to see if it helps?

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

What torel proposed in https://bugs.launchpad.net/ubuntu/+source/unity-greeter/+bug/1662244/comments/14 avoids the segfault:

* soft memlock 262144
* hard memlock 262144

Should all lightdm users manually put that in limits.conf, or should we expect some update?

Revision history for this message
Olivier Marty (omarty-m) wrote :

Thanks

Adding

* soft memlock 262144
* hard memlock 262144

in /etc/security/limits.conf

solved the same problem with lightdm and X not starting on Ubuntu 18.04 running on a motherboard with VIA KM400 integrated graphics.

Revision history for this message
Christophe Chisogne (cchisogne) wrote :

Upgrading to (K)Ubuntu 18.04.5 LTS basically broke the system as X was not restarting correctly (black screen instead of lightdm display or even infinite loop of X crashes based on BIOS/EFI config).

This is critical for non-savvy users as my parents.

The issue is the same as can be seen in /var/log/lightdm/seat0-greeter.log with repeated messages like

**MEMORY-ERROR***: unity-greeter[1647]: GSlice: failed to allocate 2040 bytes (alignment: 2048)...
**MEMORY-ERROR***: unity-greeter[1647]: GSlice: failed to allocate 2040 bytes (alignment: 2048)...
**MEMORY-ERROR***: unity-greeter[1647]: GSlice: failed to allocate 2040 bytes (alignment: 2048)...

The workaround is indded updating the memlock limits as described above (adding the 2 lines of the above comment to /etc/security/limits.con).

Thanks for the workaround :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.