After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751308 - Crash: xf86openConsole: VT_ACTIVATE failed: Operation not permitted
Crash: xf86openConsole: VT_ACTIVATE failed: Operation not permitted
Status: RESOLVED INVALID
Product: gdm
Classification: Core
Component: general
3.16.x
Other Linux
: Normal critical
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-22 08:24 UTC by Milan Bouchet-Valat
Modified: 2016-01-14 18:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
journalctl -b -a (218.16 KB, application/x-xz)
2015-06-22 18:45 UTC, Milan Bouchet-Valat
Details

Description Milan Bouchet-Valat 2015-06-22 08:24:23 UTC
GDM 3.16.1 always fails to start in Fedora 22, while GDM 3.16.0.1 works fine.

This was reported in Fedora by two users (including me):
https://bugzilla.redhat.com/show_bug.cgi?id=1232786

And in Arch (where the reporter originally noted 3.16.0.1 works):
https://bugs.archlinux.org/task/44588

All three users have Intel cards, if that's related.


The logs contain this:
$ systemctl status 'gdm';
* gdm.service - GNOME Display Manager
   Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2015-06-16 12:27:54 CEST; 2min 8s ago
 Main PID: 1018 (gdm)
   CGroup: /system.slice/gdm.service
           `-1018 /usr/sbin/gdm

Jun 16 12:28:32 nazgul.tolkien gdm[1018]: Unable to kill session worker process
Jun 16 12:28:32 nazgul.tolkien gdm[1018]: Child process 6150 was already dead.
Jun 16 12:28:32 nazgul.tolkien gdm[1018]: Unable to kill session worker process
Jun 16 12:28:32 nazgul.tolkien gdm[1018]: Could not start command '/usr/libexec/gdm-session-worker': Too many open files
Jun 16 12:28:32 nazgul.tolkien gdm[1018]: GLib: g_child_watch_add_full: assertion 'pid > 0' failed
Jun 16 12:28:32 nazgul.tolkien gdm[1018]: Child process -6163 was already dead.
Jun 16 12:28:32 nazgul.tolkien gdm[1018]: Child process 6159 was already dead.
Jun 16 12:28:32 nazgul.tolkien gdm[1018]: Unable to kill session worker process
Jun 16 12:28:32 nazgul.tolkien gdm[1018]: Child process 6159 was already dead.
Jun 16 12:28:32 nazgul.tolkien gdm[1018]: Unable to kill session worker process

$ journalctl --all | less;
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (II) modesetting: Driver for Modesetting Kernel Drivers: kms
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (II) FBDEV: driver for framebuffer: fbdev
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (II) VESA: driver for VESA chipsets: vesa
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (EE)
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: Fatal server error:
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (EE) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (EE)
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (EE)
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: Please consult the Fedora Project support
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: at http://wiki.x.org
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: for help.
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (EE) Please also check the log file at "/var/lib/gdm/.local/share/xorg/Xorg.0.log" for additional information.
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (EE)
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (WW) xf86CloseConsole: KDSETMODE failed: Operation not permitted
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (WW) xf86CloseConsole: VT_SETMODE failed: Operation not permitted
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (EE)
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: FatalError re-entered, aborting
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (EE) xf86CloseConsole: VT_ACTIVATE failed: Operation not permitted
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: (EE)
Jun 16 12:35:08 nazgul.tolkien audit[1493]: <audit-1701> auid=4294967295 uid=42 gid=42 ses=4294967295 subj=system_u:system_r:xserver_t:s0-s0:c0.c1023 pid=1493 comm="Xorg" exe="/usr/libexec/Xorg" sig=6
Jun 16 12:35:08 nazgul.tolkien gnome-session[1148]: could not connect to wayland server
Jun 16 12:35:08 nazgul.tolkien gnome-session[1148]: (EE)
Jun 16 12:35:08 nazgul.tolkien gnome-session[1148]: Fatal server error:
Jun 16 12:35:08 nazgul.tolkien gnome-session[1148]: (EE) Couldn't add screen
Jun 16 12:35:08 nazgul.tolkien gnome-session[1148]: (EE)
Jun 16 12:35:08 nazgul.tolkien /usr/libexec/gdm-x-session[1491]: Unable to run X server
Jun 16 12:35:08 nazgul.tolkien gdm-launch-environment][1483]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Jun 16 12:35:08 nazgul.tolkien audit[1483]: <audit-1106> pid=1483 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="gdm" exe="/usr/libexec/gdm-session-worker" hostname=? addr=? terminal=/dev/tty1 res=success'
Jun 16 12:35:08 nazgul.tolkien audit[1483]: <audit-1104> pid=1483 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_permit acct="gdm" exe="/usr/libexec/gdm-session-worker" hostname=? addr=? terminal=/dev/tty1 res=success'
Jun 16 12:35:08 nazgul.tolkien gdm[985]: Child process -1491 was already dead.
Jun 16 12:35:08 nazgul.tolkien gdm[985]: Child process 1483 was already dead.
Jun 16 12:35:08 nazgul.tolkien gdm[985]: Unable to kill session worker process
Jun 16 12:35:08 nazgul.tolkien gdm[985]: Child process 1483 was already dead.
Jun 16 12:35:08 nazgul.tolkien gdm[985]: Unable to kill session worker process
Jun 16 12:35:08 nazgul.tolkien systemd-logind[937]: Removed session c2.
...

$ tail -n20 '/var/lib/gdm/.local/share/xorg/Xorg.0.log';
        i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
        915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
        Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
        GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[    54.209] (II) intel: Driver for Intel(R) HD Graphics: 2000-6000
[    54.210] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100, 6100
[    54.210] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200, 6200, P6300
[    54.210] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    54.210] (II) FBDEV: driver for framebuffer: fbdev
[    54.210] (II) VESA: driver for VESA chipsets: vesa
[    54.210] (EE) 
Fatal server error:
[    54.210] (EE) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
[    54.210] (EE) 
[    54.210] (EE) 
Please consult the Fedora Project support 
         at http://wiki.x.org
 for help. 
[    54.210] (EE) Please also check the log file at "/var/lib/gdm/.local/share/xorg/Xorg.0.log" for additional information.
[    54.210] (EE)
Comment 1 Milan Bouchet-Valat 2015-06-22 08:24:53 UTC
Forgot to say, it sounds kind of related to Bug 745031.
Comment 2 Milan Bouchet-Valat 2015-06-22 08:29:42 UTC
Ah, and the main Arch report has many more users suffering from this:
https://bugs.archlinux.org/task/44587
Comment 3 Ray Strode [halfline] 2015-06-22 12:50:51 UTC
can you enable debugging in custom.conf reboot, reproduce, and then attach the full output of journalctl -b -a ?
Comment 4 Milan Bouchet-Valat 2015-06-22 18:45:10 UTC
Created attachment 305851 [details]
journalctl -b -a

Here it is. FWIW, that's with Wayland disabled, as I get another bug (screen not responding) when enabling it.

Oh, and "Trop de fichiers ouverts" means "Too many open files".
Comment 5 Magdalen Berns (irc magpie) 2015-06-30 19:42:14 UTC
(In reply to Milan Bouchet-Valat from comment #2)
> Ah, and the main Arch report has many more users suffering from this:
> https://bugs.archlinux.org/task/44587

I am also suffering this on Fedora.
Comment 6 Milan Bouchet-Valat 2015-07-05 09:09:40 UTC
Bump!
Comment 7 Michael Catanzaro 2016-01-12 22:10:59 UTC
Is this still happening to you?

If so, please post the exact distro version/release numbers of gdm and systemd. On Fedora you can get these with 'rpm -qi'. E.g. I have systemd-222-11.fc23 and gdm-1:3.18.2-1.fc23.
Comment 8 Milan Bouchet-Valat 2016-01-13 14:21:28 UTC
Unfortunately, yes (and enabling Wayland still fails too). I'm now on Fedora 23, with systemd-222-12 and kernel 4.3.3-300. The most recent GDM I tried is gdm-3.18.2-1.

I'm still forced to use a custom GDM 3.16.0.1 package, which isn't even available from F22 repos now.

Please suggest any ways of debugging this, I'm all ears. :-) I can test custom patches if you like. Looking at the short git log between 3.16.0.1 and 3.16.1, the culprit shouldn't be too hard to find:
https://git.gnome.org/browse/gdm/log/?h=gnome-3-16-2
Comment 9 Milan Bouchet-Valat 2016-01-13 14:33:41 UTC
I wonder whether this commit might be the cause of the problem:
https://git.gnome.org/browse/gdm/commit/?h=gnome-3-16-2&id=798a1ad79bdb937c4b0c9008562cd543acaf3206

If this really allows the system to drop privileges, it might explain the permission errors.

Is there a way to override this environment variable after it's been set, or do I need to rebuild the package?
Comment 10 Ray Strode [halfline] 2016-01-13 19:30:36 UTC
create a file called /etc/X11/Xwrapper.config and put 

needs_root_rights=yes

in it.

the log has this in it, which is puzzling:

juin 22 20:28:30 milan dbus[702]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.2018" (uid=42 pid=11761 comm="/usr/libexec/Xorg vt1 -displayfd 3 -auth /run/user") interface="org.freedesktop.login1.Session" member="TakeControl" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=683 comm="/usr/lib/systemd/systemd-logind ")

So the X server can't ask logind for control of the session because dbus is rejecting the call.

Is SELinux getting in the way?  Do you have a syntax error in one of the files in /etc/dbus-1/system.d/ which is making the system bus choke before gets around to loading /etc/dbus-1/system.d/org.freedesktop.login1.conf ?
Comment 11 Milan Bouchet-Valat 2016-01-14 13:19:13 UTC
Ah, good catch. Indeed, I had a loading /etc/dbus-1/system.d/org.freedesktop.login1.conf.rpmnew file waiting to be used. No idea why RPM detected that I had manually edited that file...

I can't believe I missed that obvious explanation. Thanks for your help!
Comment 12 Michael Catanzaro 2016-01-14 16:09:15 UTC
It was not obvious at all....

Very unfortunate that something like this could break gdm, but I'm not sure what could be done about it.
Comment 13 Milan Bouchet-Valat 2016-01-14 18:38:11 UTC
I would think the package managers should make it more visible that some config files should be updated after a distro upgrade. Though I must admit the Fedora wiki mentions this: https://fedoraproject.org/wiki/DNF_system_upgrade