[Pkg-xfce-devel] Bug#823460: lightdm: SIGPIPE ignored in session

Ian Jackson ijackson at chiark.greenend.org.uk
Wed May 4 23:31:02 UTC 2016


Package: lightdm
Version: 1.18.1-1
Severity: serious


I have just discovered that my entire X session is running with
SIGPIPE ignored.  I think this is the fault of lightdm - see below.

All Unix programs are entitled to assume that they start with
reasonable signal dispositions, which (with a few exceptions) means
everything set to SIG_DFL.  I have marked this bug "serious" on the
grounds that I think this is a release-critical bug.


More details:

In an xterm:

zealot:~> perl -e 'print $SIG{PIPE},"\n"'
IGNORE
zealot:~>


By grepping /proc I have discovered this:


* Several processes spawned directly from init (including secnet, a
  program of which I am the maintainer, which does not mess with
  SIGPIPE) do not have SIGPIPE ignored:

root(ian)@zealot:~> for f in `pidof secnet`; do grep SigIgn /proc/$f/status; done
SigIgn: 0000000000000002
SigIgn: 0000000000000002
root(ian)@zealot:~>

So I don't think init (sysvinit, in my case) is responsible.


* lightdm has SIGPIPE ignored:

root(ian)@zealot:~> for f in `pidof lightdm`; do grep SigIgn /proc/$f/status; done
SigIgn: 0000000000001000
SigIgn: 0000000000001000
root(ian)@zealot:~>

lightdm is of course entitled to run with whatever SIGPIPE disposition
it likes, but this is suggestive.



* My .xsession script has SIGPIPE ignored:

root      4144  3371  0 11:24 ?        00:00:00     lightdm --session-child 13 22
ian       4154  4144  0 11:24 ?        00:00:00       /bin/bash /home/ian/.xsession

root(ian)@zealot:~> grep SigIgn /proc/4154/status 
SigIgn: 0000000000001004
root(ian)@zealot:~>

My .xsession script is fairly complicated but does not mention PIPE,
and hasn't changed since Decmeber; on another machine running jessie
and gdm it has SIGPIPE set to DFL.

So this isn't something my .xsession script has done.

I have a .dmrc containing this:

[Desktop]
Language=en_GB.utf8
Layout=gb
Session=lightdm-xsession



The bad SIGPIPE disposition is inherited by the primary xterm which my
xsession runs, and its children including my main session script, my
window manager, all my xterms, etc.


Thanks for your attention.

Ian.



-8<- ~/.xession -8<-
#!/bin/bash

exec >>.configs/xsession-errors 2>&1
echo xsession running

. .configs/setenvir

rm .configs/mini-desktop-window-id

eval `.configs/configure`

set

if [ -x .configs/xmodmap-kb=$kb ]
then
	.configs/xmodmap-kb=$kb | xmodmap -
else
	xmodmap .configs/xmodmap-kb=$kb
fi

xrdb -merge .configs/Xresources
xrdb -merge .configs/Xresources-colours=$colours
xrdb -merge .configs/Xresources-font=$font
xrdb -merge .configs/Xresources-size=$size

xset b off

${lxtermpath}xterm -C $lxtermopts -T "login" -e .configs/xprofile
echo xterm done logging out again
rm .configs/xsession-errors
.configs/eliforp
-8<-


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.5.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.utf-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages lightdm depends on:
ii  adduser                                3.114
ii  dbus                                   1.10.8-1
ii  debconf [debconf-2.0]                  1.5.59
ii  libaudit1                              1:2.4.5-1+b1
ii  libc6                                  2.22-7
ii  libgcrypt20                            1.7.0-2
ii  libglib2.0-0                           2.48.0-1
ii  libpam-systemd                         229-5
ii  libpam0g                               1.1.8-3.2
ii  libxcb1                                1.11.1-1
ii  libxdmcp6                              1:1.1.2-1.1
ii  lightdm-gtk-greeter [lightdm-greeter]  2.0.1-2

Versions of packages lightdm recommends:
ii  xserver-xorg  1:7.7+15

Versions of packages lightdm suggests:
pn  accountsservice  <none>
ii  upower           0.99.4-2

-- Configuration Files:
/etc/lightdm/lightdm.conf changed:
[LightDM]
[Seat:*]
xserver-command=X -retro
[XDMCPServer]
[VNCServer]


-- debconf information:
* shared/default-x-display-manager: lightdm
  lightdm/daemon_name: /usr/sbin/lightdm



More information about the Pkg-xfce-devel mailing list