Bug 10929 - [PATCH] Teach dbus to ignore SIGPIPE when writing its PID
Summary: [PATCH] Teach dbus to ignore SIGPIPE when writing its PID
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: All FreeBSD
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-12 09:16 UTC by Joe Marcus Clarke
Modified: 2009-02-25 08:38 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Ignore SIGPIPE when writing PID (1.67 KB, patch)
2007-05-12 09:18 UTC, Joe Marcus Clarke
Details | Splinter Review
Write pid to pipe once (2.60 KB, patch)
2008-01-17 07:11 UTC, Padraig O'Briain
Details | Splinter Review

Description Joe Marcus Clarke 2007-05-12 09:16:42 UTC
The major details of this problem can be found at  http://bugzilla.gnome.org/show_bug.cgi?id=395488 since this was seen when gnome-session added internal D-Bus support.  Basically, dbus will write its PID twice to the PID file handle.  The first time is properly processed, but the second time causes a SIGPIPE which crashes the session bus.

I'm not sure what the proper fix is, but I have included a patch that simply ignores SIGPIPE for both writes.  Perhaps the second write should be eliminated altogether.  These patches are against dbus-1.0.2.
Comment 1 Joe Marcus Clarke 2007-05-12 09:18:14 UTC
Created attachment 9944 [details] [review]
Ignore SIGPIPE when writing PID
Comment 2 Havoc Pennington 2007-05-14 15:16:34 UTC
as mentioned on http://bugzilla.gnome.org/show_bug.cgi?id=395488
I think the better fix would be to avoid writing the pid twice.

It looks likely the fix for bug #1720 introduced the problem, though I have not verified. Need to fix it in such a way that it works both with and without --fork.
Comment 3 Padraig O'Briain 2008-01-17 07:11:51 UTC
Created attachment 13764 [details] [review]
Write pid to pipe once

This proposed patch writes to pid to pipe just once.
Comment 4 John (J5) Palmieri 2008-01-17 12:05:51 UTC
patch doesn't apply to git head.  Please repost one that does.  I don't think this will make 1.2.0.
Comment 5 Padraig O'Briain 2008-01-18 00:13:04 UTC
Brian Cameron has pointed out to me Havoc's commit of 2007-08-17. to bus/bus.c and dbus/dbus-sysdeps-util-unix.c.

I think that fixes the problem and this bug can be closed.
Comment 6 Colin Walters 2009-02-25 08:38:54 UTC
Sounds like this one is fixed, closing; thanks Padraig.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.