Crashes running display server scripts for non X servers

Bug #1305006 reported by Tony Themelis
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Fix Released
High
Robert Ancell
1.10
Fix Released
High
Robert Ancell
lightdm (Ubuntu)
Fix Released
High
Robert Ancell
Trusty
Fix Released
Medium
Robert Ancell
Utopic
Fix Released
High
Robert Ancell

Bug Description

[Impact]
Running non X server setups (e.g. Unity 8) and having display server scripts configured leads to LightDM crashing. This is due to a faulty assumption in LightDM assuming all display servers are X servers. Commonly caused by having nVidia prime support installed. Error reports in [1].

[Test Case]
1. Install the Unity 8 desktop preview
2. Configure a display setup script in the LightDM configuration:
 [SeatDefaults]
 display-setup-script=...
3. Start LightDM
4. Log in Unity 8
Expected result:
Setup script is run and you are logged into Unity 8
Observed result:
LightDM crashes

[Regression Potential]
Low, fix is simple. Tested with regression tests.

[1] https://errors.ubuntu.com/bucket/?id=/usr/sbin/lightdm%3A11%3Ax_server_local_get_authority_file_path%3Aseat_xlocal_run_script%3Arun_script%3Adisplay_server_ready_cb%3A_g_closure_invoke_va

Revision history for this message
Tony Themelis (tony-athemelis) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 x_server_local_get_authority_file_path (server=server@entry=0x7f4a4000a960) at x-server-local.c:304
 seat_xlocal_run_script (seat=0x22559e0, display_server=0x7f4a4000a960, script=0x224e070) at seat-xlocal.c:290
 run_script (seat=seat@entry=0x22559e0, display_server=display_server@entry=0x7f4a4000a960, script_name=0x2260a10 "/sbin/prime-offload", user=user@entry=0x0) at seat.c:302
 display_server_ready_cb (display_server=0x7f4a4000a960, seat=0x22559e0) at seat.c:1197
 _g_closure_invoke_va (closure=0x2281970, return_value=0x0, instance=0x7f4a4000a960, args=0x7fffc7c0b568, n_params=0, param_types=0x0) at /build/buildd/glib2.0-2.40.0/./gobject/gclosure.c:831

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in lightdm (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
tags: added: utopic
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: lightdm crashed with SIGSEGV

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu):
status: New → Confirmed
information type: Private → Public
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Is this still occurring for anyone? Does it only happen when you switch from Unity 8 to Unity 7?

summary: - lightdm crashed with SIGSEGV
+ Crashes running display server scripts for non X servers
Changed in lightdm (Ubuntu):
status: Confirmed → Triaged
importance: Medium → High
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Found it - this is when you have script hooks for the display server [1] LightDM makes an incorrect assumption that you are running X.

[1] from /usr/share/lightdm/lightdm.conf.d/90-nvidia.conf in this case.

Changed in lightdm:
importance: Undecided → High
status: New → Triaged
Changed in lightdm:
assignee: nobody → Robert Ancell (robert-ancell)
Changed in lightdm:
status: Triaged → In Progress
Changed in lightdm:
status: In Progress → Fix Committed
Changed in lightdm (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in lightdm (Ubuntu Trusty):
assignee: nobody → Robert Ancell (robert-ancell)
importance: Undecided → Medium
status: New → Triaged
Changed in lightdm:
milestone: none → 1.11.10
Changed in lightdm:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.12.0-0ubuntu2

---------------
lightdm (1.12.0-0ubuntu2) utopic; urgency=medium

  * Restore 1.11.9-0ubuntu2, it was reverted by error in the previous upload
 -- Sebastien Bacher <email address hidden> Tue, 30 Sep 2014 11:25:09 +0200

Changed in lightdm (Ubuntu Utopic):
status: Triaged → Fix Released
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Missing SRU information

Thanks for uploading the fix for this bug report to -proposed. However, when reviewing the package in -proposed and the details of this bug report I noticed that the bug description is missing information required for the SRU process. You can find full details at http://wiki.ubuntu.com/StableReleaseUpdates#Procedure but essentially this bug is missing some of the following: a statement of impact, a test case and details regarding the regression potential. Thanks in advance!

description: updated
Revision history for this message
Mathew Hodson (mhodson) wrote :

https://launchpad.net/ubuntu/+source/lightdm/1.10.3-0ubuntu2 is available in trusty-proposed.

---------------
lightdm (1.10.3-0ubuntu2) trusty; urgency=medium

  * Refresh patches

 -- Robert Ancell <email address hidden> Fri, 10 Oct 2014 21:24:51 +1300

lightdm (1.10.3-0ubuntu1) trusty; urgency=medium

  * New upstream release:
    - Fix crash when having configuration keys defined in multiple places
      (LP: #1377373)
    - Allow user switching in multi-seat until bug stopping greeter showing on
      logout is fixed
    - Don't access .dmrc files until information from these files is required
      (LP: #1370852)
    - Do timed autologin each time you are returned to the greeter
      (LP: #1302491)

 -- Robert Ancell <email address hidden> Thu, 09 Oct 2014 09:01:21 +1300

lightdm (1.10.2-0ubuntu1) trusty; urgency=medium

  * New upstream release:
    - Use logind to provide the list of seats to use. This is disabled unless
      logind-load-seats (in [LightDM] section) is set to true. This is the
      default behaviour in lightdm 1.12. (LP: #1190581)
    - Fix crash if running script hooks with non-X display servers.
      (LP: #1305006)
    - Add a seat option 'allow-user-switching' that can disable all user
      switching for that seat. (LP: #1350357)
    - Make PAM services configurable. (LP: #1348251)
    - Add liblightdm method to get user UID. (LP: #1370327)
    - Add a new session type 'mir-container' that allows the session to run
      inside a custom system compositor. (LP: #1359332)
    - Add --show-config option that shows combined configuration.
    - Use XDG_SESSION_ID from PAM instead of using the logind D-Bus API.
      (LP: #1364725)
    - Make socket writing code used between greeter and daemon more robust to
      errors.
    - Correct section name in default users.conf file.
    - Fix tests failing with Qt 5.3 due to it checking getuid/geteuid which we
      are faking.
    - Fix small memory leaks.
    - Test improvements

 -- Robert Ancell <email address hidden> Wed, 17 Sep 2014 16:27:53 +1200

Changed in lightdm (Ubuntu Trusty):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Mathew Hodson (mhodson) wrote :

lightdm is available in the trusty-proposed repository and at https://launchpad.net/ubuntu/+source/lightdm/1.10.3-0ubuntu2 .

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation 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, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

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

Confirmed fixed in 1.10.3-0ubuntu2

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.10.3-0ubuntu2

---------------
lightdm (1.10.3-0ubuntu2) trusty; urgency=medium

  * Refresh patches
 -- Robert Ancell <email address hidden> Fri, 10 Oct 2014 21:24:51 +1300

Changed in lightdm (Ubuntu Trusty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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