Bug 70877 - vt-switching to X-session during weston shutdown crashes X-session
Summary: vt-switching to X-session during weston shutdown crashes X-session
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: 1.3.0
Hardware: Other All
: medium major
Assignee: Wayland bug list
QA Contact:
Depends on:
Reported: 2013-10-25 22:15 UTC by U. Artie Eoff
Modified: 2013-10-31 18:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description U. Artie Eoff 2013-10-25 22:15:09 UTC
When weston is shutting down/exiting, and attempting to immediately vt-switch to a running X-session, the X-session crashes.  If you wait long enough for weston to shutdown before attempting a vt-switch, then X does not crash.

1. Open a new console/tty
2. Execute 'weston' (as suid/root)
3. Kill/exit weston with <ctrl>+<alt>+<backspace> and then quickly vt-switch (e.g. <ctrl>+<alt>+<F1>) to a running X-session.
4. Observe that the X-session crashes

[  2107.854] (II) AIGLX: Resuming AIGLX clients after VT switch
[  2107.854] (WW) intel(0): drmSetMaster failed: Invalid argument
[  2107.854] (EE) intel(0): failed to set mode: Permission denied
[  2107.854] 
Fatal server error:
[  2107.854] EnterVT failed for screen 0
[  2107.854] 
[  2107.854] (EE) 
Please consult the Fedora Project support 
	 at http://wiki.x.org
 for help. 
[  2107.854] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  2107.854] (EE) 
[  2107.854] (II) AIGLX: Suspending AIGLX clients for VT switch
[  2107.854] (WW) intel(0): drmDropMaster failed: Invalid argument
[  2107.858] Server terminated with error (1). Closing log file.

Software Stack
wayland (1.3) heads/1.3-0-g84247b7
drm (master) libdrm-2.4.46-0-gc6d73cf
mesa (9.2) heads/9.2-0-g7ab2b8c
libva (master) libva-1.2.1-0-g88ed1eb
intel-driver (master) 1.2.1-0-g8f306e3
weston (1.3) heads/1.3-0-gdf566b2
Comment 1 Kristian Høgsberg 2013-10-30 23:28:47 UTC
commit a28ba55b56c3c94a86524a8cd13cae9257d91376
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Wed Oct 30 16:27:16 2013 -0700

    launcher: Make sure we drop drm master before we allow VT switches
    On shutdown, we can risk having a pending vt switch that we normally
    handle in the vt signal handler.  However as we put the vt back in VT_AUTO
    mode, the pending VT switch will go through and if we haven't dropped
    drm master at that point, we could switch to another display server
    without dropping drm master.  That will typically crash the other server,
    so let's try to make sure we don't do that.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.