lightdm set SIGPIPE disposition to SIG_IGN even for children

Bug #1579867 reported by Yves-Alexis Perez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Fix Committed
Medium
Unassigned
1.10
Fix Committed
Medium
Unassigned
1.18
Fix Committed
Medium
Unassigned
1.2
Won't Fix
Medium
Unassigned
1.20
Fix Committed
Medium
Unassigned
lightdm (Debian)
Fix Released
Unknown
lightdm (Ubuntu)
Triaged
Medium
Unassigned
Precise
Won't Fix
Medium
Unassigned
Trusty
Triaged
Medium
Unassigned
Xenial
Triaged
Medium
Unassigned
Yakkety
Triaged
Medium
Unassigned

Bug Description

Hi,

a Debian user reported that his session was running with SIGPIPE set to SIG_IGN, and tracked the issue to lightdm.

The whole investigation is in the downstream bug, but in summary the glib gio functions set the disposition, and nothing reverts it. Using g_spawn_*() function should do it, but they're apparently not used in lightdm.

The reporter also provided a minimal patch, which is attached.

Tags: patch
Revision history for this message
Yves-Alexis Perez (corsac) wrote :
Revision history for this message
Yves-Alexis Perez (corsac) wrote :

Hi,

is there some news on this? Can you at least comment on the patch even without integrating it, so I can move forward and include it (or not) in the Debian package?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Hi,

Sorry for the delay. I'm not sure where the downstream bug is but looking through the GLib source code I can confirm the GSocket code does set SIGPIPE to SIG_IGN. So the attached patch will correctly revert it to the default for the child processes. As far as I can tell this is the right thing to do.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

http://stackoverflow.com/questions/8369506/why-does-sigpipe-exist has a good description of why this is a stupid signal you don't want to handle...

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Commited this patch with the following changes:
- I explicitly disable SIGPIPE when LightDM starts (because I don't want it to occur anywhere).
- I re-enable it just before I exec() the children so it can't affect any of the LightDM code.

Changed in lightdm:
milestone: none → 1.21.0
status: New → Fix Committed
importance: Undecided → Medium
Changed in lightdm (Debian):
status: Unknown → Confirmed
Changed in lightdm (Ubuntu):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Trusty):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Yakkety):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Xenial):
importance: Undecided → Medium
Changed in lightdm (Ubuntu Yakkety):
status: New → Triaged
Changed in lightdm (Ubuntu Xenial):
status: New → Triaged
Changed in lightdm (Ubuntu Trusty):
status: New → Triaged
Changed in lightdm (Ubuntu):
status: New → Triaged
Changed in lightdm (Ubuntu Precise):
importance: Undecided → Medium
status: New → Won't Fix
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "reset SIGPIPE to SIG_DFL after forking" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in lightdm (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.