Bug#756068: gdm3 blocks SIGUSR1 for all applications
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Fri Jul 25 21:51:56 UTC 2014
Package: gdm3
Version: 3.12.2-2
Severity: important
Tags: upstream
Dear Maintainer,
We've been puzzled to see that when using recent gdm3 and
gnome3, our application stopped receiving SIGUSR1 signals.
Digging into the issue, we found this gdm commit that seems
to block the SIGUSR1 signal in a process-wide fashion:
commit 956d7d1c7a0cfbf2beacdb9e88e645e15ad32047
Author: Jasper St. Pierre <jstpierre at mecheye.net>
Date: Fri Feb 14 14:32:50 2014 -0500
server: Process SIGUSR1 more carefully
If the slave is removed as a separate process, it means that we need
to be more careful with our handling of SIGUSR1. If multiple X servers
are launched at once, we need to use siginfo_t to get the PID of the
thing that sent the user signal, and make sure we signal the correct
GdmServer.
glib doesn't have native siginfo support, so do it ourselves by using
a worker thread that spins around waiting for sigwaitinfo.
https://bugzilla.gnome.org/show_bug.cgi?id=724382
Our issue is that this signal mask blocking of SIGUSR1 trickles
down to every application launched by the window manager. This
breaks POSIX guarantees about signal masks (see signal(7)). We
would expect SIGUSR1 to be delivered to the application by default.
Moreover, reading the commit, we notice that the intent using
sigprocmask in sigusr1_thread_main() is to handle SIGUSR1, but
the code actually blocks SIGUSR1. This is exactly the opposite of
what is expected. Therefore, we can expect that the signal is
never handled by sigusr1_thread_main, so there are probably other
issues hidden under this. Also, we would recommend using
pthread_sigmask rather than sigprocmask so the effect of the
signal masking only applies to the thread running
sigusr1_thread_main.
Thanks,
Mathieu
-- System Information:
Debian Release: jessie/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages gdm3 depends on:
ii accountsservice 0.6.37-2
ii adduser 3.113+nmu3
ii dconf-cli 0.20.0-2
ii dconf-gsettings-backend 0.20.0-2
ii debconf [debconf-2.0] 1.5.53
ii gir1.2-gdm3 3.12.2-2
ii gnome-session [x-session-manager] 3.12.1-3
ii gnome-session-bin 3.12.1-3
ii gnome-session-flashback [x-session-manager] 3.8.0-3
ii gnome-settings-daemon 3.12.2-1
ii gnome-shell 3.12.2-3
ii gnome-terminal [x-terminal-emulator] 3.12.3-1
ii gsettings-desktop-schemas 3.12.2-1
ii libaccountsservice0 0.6.37-2
ii libatk1.0-0 2.12.0-1
ii libaudit1 1:2.3.7-1
ii libc6 2.19-7
ii libcairo-gobject2 1.12.16-2
ii libcairo2 1.12.16-2
ii libcanberra-gtk3-0 0.30-2
ii libcanberra0 0.30-2
ii libgdk-pixbuf2.0-0 2.30.7-1
ii libgdm1 3.12.2-2
ii libglib2.0-0 2.40.0-3
ii libglib2.0-bin 2.40.0-3
ii libgtk-3-0 3.12.2-1+b1
ii libpam-modules 1.1.8-3
ii libpam-runtime 1.1.8-3
ii libpam-systemd 208-6
ii libpam0g 1.1.8-3
ii libpango-1.0-0 1.36.3-1
ii libpangocairo-1.0-0 1.36.3-1
ii librsvg2-common 2.40.2-1
ii libselinux1 2.3-1
ii libsystemd-daemon0 208-6
ii libsystemd-id128-0 208-6
ii libsystemd-journal0 208-6
ii libsystemd-login0 208-6
ii libwrap0 7.6.q-25
ii libx11-6 2:1.6.2-2
ii libxau6 1:1.0.8-1
ii libxdmcp6 1:1.1.1-1
ii libxrandr2 2:1.4.2-1
ii lsb-base 4.1+Debian13
ii metacity [x-window-manager] 1:2.34.13-1
ii policykit-1 0.105-6
ii twm [x-window-manager] 1:1.0.8-1
ii ucf 3.0030
ii x11-common 1:7.7+7
ii x11-xserver-utils 7.7+3
ii xfce4-session [x-session-manager] 4.10.1-6
ii xfwm4 [x-window-manager] 4.10.1-2
ii xterm [x-terminal-emulator] 308-1
Versions of packages gdm3 recommends:
ii at-spi2-core 2.12.0-2
ii desktop-base 7.0.3
ii gnome-icon-theme 3.12.0-1
ii gnome-icon-theme-symbolic 3.12.0-1
ii x11-xkb-utils 7.7+1
ii xserver-xephyr 2:1.16.0-1
ii xserver-xorg 1:7.7+7
ii zenity 3.12.1-1
Versions of packages gdm3 suggests:
pn gnome-orca <none>
ii libpam-gnome-keyring 3.8.2-2+b1
-- debconf information:
gdm3/daemon_name: /usr/sbin/gdm3
* shared/default-x-display-manager: gdm3
More information about the pkg-gnome-maintainers
mailing list