Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566888 - sys-apps/systemd-228-r1: ctrl-c kills gnome-session
Summary: sys-apps/systemd-228-r1: ctrl-c kills gnome-session
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-26 08:55 UTC by poncho
Modified: 2016-05-30 14:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
core: don't reset /dev/console if stdin/stdout/stderr is passed as fd in a transient service (fix-console-ctrl-c.patch,9.94 KB, patch)
2016-02-10 10:28 UTC, poncho
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description poncho 2015-11-26 08:55:21 UTC
In a root shell opened with "machinectl shell" hitting ctrl-c logs me out to the gdm login screen.

1. login to gnome session
2. open gnome-terminal
3. open root shell with "machinectl shell"
4. hit ctrl-c

result: gnome-session gets killed and user ends up at gdm login screen.

this was working fine with systemd-226


systemd[1]: Created slice Virtual Machine and Container Slice.
systemd[1]: Starting Virtual Machine and Container Registration Service...
dbus[780]: [system] Successfully activated service 'org.freedesktop.machine1'
systemd[1]: Started Virtual Machine and Container Registration Service.
polkitd[864]: Operator of unix-session:1 successfully authenticated as unix-user:root to gain TEMPORARY authorization for action org.freedesktop.machine1.host
systemd[1]: Created slice system-container\x2dshell.slice.
systemd[1]: Started Shell for User root.
systemd[20549]: pam_unix(login:session): session opened for user root by (uid=0)
systemd[1]: Created slice User Slice of root.
systemd[1]: Starting User Manager for UID 0...
systemd[20551]: pam_unix(systemd-user:session): session opened for user root by (uid=0)
systemd-logind[810]: New session 2 of user root.
systemd[1]: Started Session 2 of user root.
systemd[20551]: Reached target Paths.
systemd[20551]: Reached target Sockets.
systemd[20551]: Reached target Timers.
systemd[20551]: Reached target Basic System.
systemd[20551]: Reached target Default.
systemd[20551]: Startup finished in 13ms.
systemd[1]: Started User Manager for UID 0.
gdm-password][7119]: pam_unix(gdm-password:session): session closed for user poncho
polkitd[864]: Unregistered Authentication Agent for unix-session:1 (system bus name :1.50, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus)
systemd-logind[810]: Removed session 2.
systemd[1]: Stopping User Manager for UID 0...
systemd[20551]: Reached target Shutdown.
systemd[20551]: Starting Exit the Session...
systemd[20551]: Stopped target Default.
systemd[20551]: Stopped target Basic System.
systemd[20551]: Stopped target Timers.
systemd[20551]: Stopped target Sockets.
systemd[20551]: Stopped target Paths.
systemd[20551]: Received SIGRTMIN+24 from PID 20585 (kill).
systemd[20552]: pam_unix(systemd-user:session): session closed for user root
systemd[1]: Stopped User Manager for UID 0.
systemd[1]: Removed slice User Slice of root.
/usr/libexec/gdm-x-session[944]: (II) systemd-logind: got resume for 13:69
polkitd[864]: Unregistered Authentication Agent for unix-session:1 (system bus name :1.50, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus)
/usr/libexec/gdm-x-session[944]: (II) systemd-logind: got resume for 13:66
/usr/libexec/gdm-x-session[944]: (II) systemd-logind: got resume for 13:65
/usr/libexec/gdm-x-session[944]: (II) systemd-logind: got resume for 13:68
/usr/libexec/gdm-x-session[944]: (II) systemd-logind: got resume for 13:67
/usr/libexec/gdm-x-session[944]: (II) systemd-logind: got resume for 13:64
/usr/libexec/gdm-x-session[944]: (II) systemd-logind: got resume for 226:0
/usr/libexec/gdm-x-session[944]: (EE)
/usr/libexec/gdm-x-session[944]: Fatal server error:
/usr/libexec/gdm-x-session[944]: (EE) EnterVT failed for screen 0
/usr/libexec/gdm-x-session[944]: (EE)
/usr/libexec/gdm-x-session[944]: (EE)
/usr/libexec/gdm-x-session[944]: Please consult the The X.Org Foundation support
/usr/libexec/gdm-x-session[944]: at http://wiki.x.org
/usr/libexec/gdm-x-session[944]: for help.
/usr/libexec/gdm-x-session[944]: (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
/usr/libexec/gdm-x-session[944]: (EE)
/usr/libexec/gdm-x-session[944]: (WW) NVIDIA(0): Failed to set the display configuration
/usr/libexec/gdm-x-session[944]: (WW) NVIDIA(0):  - The X server does not have permission to set modes on the
/usr/libexec/gdm-x-session[944]: (WW) NVIDIA(0):     device
/usr/libexec/gdm-x-session[944]: (EE) Server terminated with error (1). Closing log file.
systemd[1]: Stopping Session 1 of user poncho.


Portage 2.2.20.1 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.3, glibc-2.21-r1, 4.3.0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.3.0-x86_64-Intel-R-_Core-TM-_i7-4770K_CPU_@_3.50GHz-with-gentoo-2.2
KiB Mem:    16348092 total,  12117052 free
KiB Swap:   15624188 total,  15624188 free
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

mozilla
    location: /var/portage/layman/mozilla
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/mozilla.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/portage/layman/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

vmware
    location: /var/portage/layman/vmware
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/vmware.git
    masters: gentoo
    priority: 50

gentoo
    location: /var/portage/tree
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo.git
    priority: 1000

poncho
    location: /var/portage/local/poncho-overlay
    sync-type: git
    sync-uri: git://github.com/MeisterP/poncho-overlay.git
    masters: gentoo
    priority: 1050

torbrowser
    location: /var/portage/local/torbrowser-overlay
    sync-type: git
    sync-uri: git://github.com/MeisterP/torbrowser-overlay.git
    masters: gentoo
    priority: 1050

Installed sets: @kernels
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-11.x skype-4.0.0.7-copyright FraunhoferFDK google-chrome"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/firefox/browser/searchplugins/google.xml /usr/share/backgrounds/gnome/adwaita-timed.xml /usr/share/gnome-shell/theme/gnome-shell.css /usr/share/gnupg/qualified.txt /usr/share/thumbnailers/ffmpegthumbnailer.thumbnailer"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --ask --jobs=9 --load-average=8 --verbose"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo 	http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo 	http://distfiles.gentoo.org"
INSTALL_MASK=" /etc/init.d"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9 -l8"
PKGDIR="/var/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aften alac alsa amd64 argyllcms bash-completion berkdb bluetooth bluray bzip2 cairo cdda cdio cdr cdrdao cli colord cracklib crypt cryptsetup css cue cups cxx dbus device-mapper dirac dri dts dvd dvdr egl emboss encode evo exif fam fdk ffmpeg firefox flac fontconfig fortran gif glamor gles2 gnome gnome-keyring gnome-online-accounts gstreamer gtk gtk3 iconv id3tag introspection ipv6 jpeg kate kms lame lcms libass libnotify libproxy libsecret libtiger mad matroska mmx mmxext mng modules mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl nss nvidia ogg opengl openmp opus pam pango pcre pdf png policykit postscript ppds pulseaudio qt3support quicktime raw readline rtmp schroedinger sdl seccomp session sndfile speex spell sse sse2 ssl startup-notification svg systemd tcpd theora threads tiff tracker truetype udev udisks unicode upower usb v4l vaapi vdpau vorbis vpx wav wavpack webp x264 x265 xattr xcb xinerama xml xmp xps xv xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev roccat_arvo roccat_konepure" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-apps/systemd-228-r1::gentoo was built with the following:
USE="acl cryptsetup curl gcrypt gnuefi importd kdbus kmod lz4 lzma pam policykit seccomp ssl sysv-utils -apparmor -audit -elfutils -http -idn -nat -qrcode (-selinux) -test -vanilla -xkb" ABI_X86="32 64 -x32"
Comment 1 poncho 2015-12-13 13:17:00 UTC
is somebody from the systemd team able to reproduce this issue? should I report it upstream?
Comment 2 Mike Gilbert gentoo-dev 2015-12-13 13:22:24 UTC
I do not run gnome. Adding the gnome team to CC.

But yes, this seems like something you may want to ask about upstream.
Comment 3 poncho 2016-02-10 10:28:56 UTC
Created attachment 425110 [details, diff]
core: don't reset /dev/console if stdin/stdout/stderr is passed as fd in a transient service

This is upstream commit
https://github.com/systemd/systemd/commit/1e22b5cda04b6d5e0dd83ab8e6ecb452cf34851f

Dropping it into /etc/portage/patches/sys-apps/systemd/ fixes the issue for me.
Comment 4 Mike Gilbert gentoo-dev 2016-05-30 14:08:46 UTC
Fixed in systemd-229.