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

Ian Jackson ijackson at chiark.greenend.org.uk
Sun May 8 14:32:45 UTC 2016


Ian Jackson writes ("Re: [Pkg-xfce-devel] Bug#823460: lightdm: SIGPIPE ignored in session"):
> I have a plan for how to track this down further.  I will get back to
> you.

I applied the attached patch below to my libc, and created the logfile
/var/log/exec-sigignblock.log world-writeable, and rebooted.  An
extract from the logfile is also attached.

The first line which mentions lightdm is this one:

  2016-04-08 12:15:12 UTC:/bin/sh[3344] execd oddly (parent
  /usr/sbin/lightdm[3294]): Broken pipe: SIG_IGN

Note that that shell process almost immmediately spawns Xorg.

This allows us to conclude:

1. When lightdm is first execd by whatever spawns it, it does NOT
   inherit SIGPIPE set to SIG_IGN.  If this weren't the case there
   would be a message about lightdm being execd oddly, before lightdm
   itself execs anything else.

2. lightdm is definitely executing Xorg with SIGPIPE set to SIG_IGN.
   This is IMO a bug.  It is a less serious bug than running the
   user's session this way because the X server probablhy doesn't
   spawn that many other processes (so that the bug can only influence
   a limited set of processes), and the X server probably runs with
   SIGPIPE ignored anyway (so that while this is wrong, there is no
   actual adverse consequence).

Further on, we see;

  2016-04-08 12:15:22 UTC:/bin/bash[4164] execd oddly (parent Permission
  denied[4155]): Broken pipe: SIG_IGN

and then 4164 execs a lot of things which are part of my .xsession.

The prior report about pid 4155 is

  2016-04-08 12:15:20 UTC:lightdm[4155] execd oddly (parent
  /usr/sbin/lightdm[3294]): Broken pipe: SIG_IGN

Ie, 4164 was spawned by lightdm, and is running as a different user
(so the readlink of /proc/4155/exe failed).

lightdm is of course entitled to exec itself with SIGPIPE ignored if
it so chooses, but that (almost conclusively) proves that it is
the lightdm process which is at fault.

The only way in which it could be someone else's fault is if lightdm
forked 4155, and execed some other program with PIPE=DFL (which
wouldn't show up in my log), and that other program set PIPE=IGN and
in turn execed lightdm.  Then the bug would be in that other
program.  I don't think this is at all likely.

As previously discussed here, the ignoring of SIGPIPE doesn't seem to
be done explicitly in the lightdm source code.  Having established
that it is (almost certainly) the lightdm process which is responsible
I will now attempt to find that out.


Incidentally, the log contains a lot of messages like this:

  2016-04-08 12:15:12 UTC:/sbin/wpa_supplicant[3350] execd oddly (parent
  /usr/bin/dbus-daemon[3349]): Broken pipe: SIG_IGN

I think this is a separate bug.  Unless lightdm is spawned from dbus
somehow, I don't think this can be responsible for my session having
PIPE=IGN.  Furthermore, if this was the root cause of the bug I would
expect to see a complaint about the initial parent lightdm itself
being execed oddly.


Watch this space for more information.

Ian.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: glibc.diff
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20160508/8f6eb370/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: exec-sigignblock.log
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20160508/8f6eb370/attachment-0001.ksh>


More information about the Pkg-xfce-devel mailing list