[Pkg-utopia-maintainers] Bug#823754: dbus execs nonconsenting programs with SIGPIPE ignored

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


Package: dbus
Version: 1.10.8-1

While investigating #823460 "lightdm: SIGPIPE ignored in session" in
developed a libc patch which logs a message whenever any new program
starts up an with unusual setup for SIGPIPE.

The logfile contains entries 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

It is a bug to execute a program with SIGPIPE ignored without its
consent.  (Or to put it another way, it is not part of the
specification of programs in general, on a unix system, that they will
function correctly if run with anomalous signal configuration.)

In this case I see quite a few programs in the log being executed with
SIGPIPE set to SIG_IGN.  For many of thexe programs I don't really
know whether the consent.  But I think I know that wpa_supplicant
doesn't; and I doubt that nm-dispatcher or the various systemd-*
programs document that this is permitted or expected.

In practice the fallout from this bug is likely to be modest because
many of these programs are daemons of one kind or another anyway, and
few of them tend to do their work with a lot of pipes etc.

But one possible consequence is that daemons or other long-lived
service processes might fail to terminate when their socket peer goes
away, and instead might end up spinning on the cpu.

I will attach the glibc patch I used, and an extract from the log it
wrote.

Ian.


-- 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 dbus depends on:
ii  adduser              3.114
ii  init-system-helpers  1.29
ii  libapparmor1         2.10-4
ii  libaudit1            1:2.4.5-1+b1
ii  libc6                2.22-7
ii  libcap-ng0           0.7.7-1+b1
ii  libdbus-1-3          1.10.8-1
ii  libexpat1            2.1.1-1
ii  libselinux1          2.5-1
ii  libsystemd0          229-5
ii  lsb-base             9.20160110

dbus recommends no packages.

Versions of packages dbus suggests:
ii  dbus-x11  1.10.8-1

Versions of packages dbus is related to:
ii  dbus-x11      1.10.8-1
ii  systemd       229-5
pn  systemd-sysv  <none>

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc.diff
Type: text/x-diff
Size: 3195 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20160508/ef6b8cf5/attachment.diff>
-------------- next part --------------
2016-04-08 12:13:21 UTC:/usr/lib/dbus-1.0/dbus-daemon-launch-helper[12813] execd oddly (parent /usr/bin/dbus-daemon[12790]): Broken pipe: SIG_IGN
2016-04-08 12:13:21 UTC:/usr/lib/x86_64-linux-gnu/systemd-shim[12813] execd oddly (parent /usr/bin/dbus-daemon[12790]): Broken pipe: SIG_IGN
2016-04-08 12:13:21 UTC:/usr/lib/dbus-1.0/dbus-daemon-launch-helper[12911] execd oddly (parent /usr/bin/dbus-daemon[12905]): Broken pipe: SIG_IGN
2016-04-08 12:13:21 UTC:/usr/lib/NetworkManager/nm-dispatcher[12911] execd oddly (parent /usr/bin/dbus-daemon[12905]): Broken pipe: SIG_IGN
2016-04-08 12:13:24 UTC:/run/cgmanager/agents/cgm-release-agent.systemd[13682] execd oddly (parent No such file or directory[2]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/dbus-1.0/dbus-daemon-launch-helper[2826] execd oddly (parent /usr/bin/dbus-daemon[2824]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/lib/systemd/systemd-hostnamed[2826] execd oddly (parent /usr/bin/dbus-daemon[2824]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/dbus-1.0/dbus-daemon-launch-helper[2915] execd oddly (parent /usr/bin/dbus-daemon[2913]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/NetworkManager/nm-dispatcher[2915] execd oddly (parent /usr/bin/dbus-daemon[2913]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:(pinger)[3213] execd oddly (parent /usr/sbin/squid[3079]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/sbin/exim4[3250] execd oddly (parent /usr/sbin/exim4[3248]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/dbus-1.0/dbus-daemon-launch-helper[3312] execd oddly (parent /usr/bin/dbus-daemon[3311]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/bin/sh[3312] execd oddly (parent /usr/bin/dbus-daemon[3311]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:mkdir[3317] execd oddly (parent /bin/dash[3312]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/lib/systemd/systemd-logind[3312] execd oddly (parent /usr/bin/dbus-daemon[3311]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/dbus-1.0/dbus-daemon-launch-helper[3327] execd oddly (parent /usr/bin/dbus-daemon[3326]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/x86_64-linux-gnu/systemd-shim[3327] execd oddly (parent /usr/bin/dbus-daemon[3326]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/bin/sh[3344] execd oddly (parent /usr/sbin/lightdm[3294]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/xorg/Xorg[3344] execd oddly (parent /usr/sbin/lightdm[3294]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/dbus-1.0/dbus-daemon-launch-helper[3348] execd oddly (parent /usr/bin/dbus-daemon[3347]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/dbus-1.0/dbus-daemon-launch-helper[3350] execd oddly (parent /usr/bin/dbus-daemon[3349]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/lib/policykit-1/polkitd[3348] execd oddly (parent /usr/bin/dbus-daemon[3347]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/sbin/wpa_supplicant[3350] execd oddly (parent /usr/bin/dbus-daemon[3349]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:sh[3471] execd oddly (parent /usr/lib/xorg/Xorg[3344]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/bin/xkbcomp[3473] execd oddly (parent /bin/dash[3471]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:sh[3530] execd oddly (parent /usr/lib/xorg/Xorg[3344]): Broken pipe: SIG_IGN
2016-04-08 12:15:12 UTC:/usr/bin/xkbcomp[3531] execd oddly (parent /bin/dash[3530]): Broken pipe: SIG_IGN
2016-04-08 12:15:13 UTC:lightdm[3713] execd oddly (parent /usr/sbin/lightdm[3294]): Broken pipe: SIG_IGN
2016-04-08 12:15:15 UTC:/usr/lib/NetworkManager/nm-dhcp-helper[3976] execd oddly (parent /sbin/dhclient[3952]): Broken pipe: SIG_IGN
2016-04-08 12:15:15 UTC:/usr/lib/NetworkManager/nm-dhcp-helper[4026] execd oddly (parent /sbin/dhclient[3952]): Broken pipe: SIG_IGN
2016-04-08 12:15:16 UTC:lightdm[4148] execd oddly (parent /usr/sbin/lightdm[3294]): Broken pipe: SIG_IGN
2016-04-08 12:15:20 UTC:lightdm[4155] execd oddly (parent /usr/sbin/lightdm[3294]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/bin/gnome-keyring-daemon[4160] execd oddly (parent Permission denied[4155]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/bin/sh[4164] execd oddly (parent Permission denied[4155]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:touch[4165] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:chmod[4166] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:date[4167] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:tempfile[4168] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:rm[4169] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:run-parts[4170] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:cat[4171] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:run-parts[4172] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:xrdb[4173] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:sh[4174] execd oddly (parent /usr/bin/xrdb[4173]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/bin/cpp[4175] execd oddly (parent /bin/dash[4174]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/lib/gcc/x86_64-linux-gnu/5/cc1[4176] execd oddly (parent /usr/bin/cpp-5[4175]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:id[4177] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:xhost[4178] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:basename[4180] execd oddly (parent /bin/dash[4179]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:cut[4181] execd oddly (parent /bin/dash[4179]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/bin/xdg-user-dirs-update[4183] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/bin/dbus-launch[4184] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/bin/xbrlapi[4182] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/bin/dbus-daemon[4186] execd oddly (parent /usr/bin/dbus-launch[4185]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/bin/unclutter[4189] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:dbus-update-activation-environment[4190] execd oddly (parent /bin/dash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/bin/ssh-agent[4164] execd oddly (parent Permission denied[4155]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/bin/bash[4164] execd oddly (parent Permission denied[4155]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:hostname[4193] execd oddly (parent /bin/bash[4192]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:rm[4194] execd oddly (parent /bin/bash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/bin/sh[4195] execd oddly (parent /bin/bash[4164]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:hostname[4196] execd oddly (parent /bin/dash[4195]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:cat[4197] execd oddly (parent /bin/dash[4195]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:/usr/bin/perl[4198] execd oddly (parent /bin/dash[4195]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:tee[4199] execd oddly (parent /bin/dash[4195]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:xauth[4200] execd oddly (parent /usr/bin/perl[4198]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:xdpyinfo[4201] execd oddly (parent /usr/bin/perl[4198]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:uname[4202] execd oddly (parent /usr/bin/perl[4198]): Broken pipe: SIG_IGN
2016-04-08 12:15:22 UTC:rm[4203] execd oddly (parent /bin/dash[4195]): Broken pipe: SIG_IGN


More information about the Pkg-utopia-maintainers mailing list