Several XFCE applications appear unresponsive after communicating with a daemon

Bug #1347272 reported by Martin Spacek
258
This bug affects 107 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Fix Released
High
Unassigned
Thunar File Manager
Invalid
High
Xfce4 Application Finder
Fix Released
High
Xfce4 Power Manager
Fix Released
High
Xfce4 Settings
Fix Released
High
xfce4-volumed-pulse
Fix Released
Undecided
Unassigned
thunar (Ubuntu)
Fix Released
High
Unassigned
Nominated for Lucid by Alberto Salvia Novella
Nominated for Precise by Alberto Salvia Novella
Nominated for Trusty by Alberto Salvia Novella
Nominated for Utopic by Alberto Salvia Novella
xfce4-appfinder (Ubuntu)
Fix Released
High
Unassigned
Nominated for Lucid by Alberto Salvia Novella
Nominated for Precise by Alberto Salvia Novella
Nominated for Trusty by Alberto Salvia Novella
Nominated for Utopic by Alberto Salvia Novella
xfce4-power-manager (Ubuntu)
Fix Released
High
Unassigned
Nominated for Lucid by Alberto Salvia Novella
Nominated for Precise by Alberto Salvia Novella
Nominated for Trusty by Alberto Salvia Novella
Nominated for Utopic by Alberto Salvia Novella
xfce4-settings (Ubuntu)
Fix Released
High
Unassigned
Nominated for Lucid by Alberto Salvia Novella
Nominated for Precise by Alberto Salvia Novella
Nominated for Trusty by Alberto Salvia Novella
Nominated for Utopic by Alberto Salvia Novella
xfce4-volumed (Ubuntu)
Fix Released
High
Unassigned
Nominated for Lucid by Alberto Salvia Novella
Nominated for Precise by Alberto Salvia Novella
Nominated for Trusty by Alberto Salvia Novella
Nominated for Utopic by Alberto Salvia Novella

Bug Description

Several programs in Xfce have a daemon mode call gtk_init() before fork()ing.

This is unsafe, and when it goes wrong this will typically manifest as the daemon hanging shortly after forking, and appearing to simply do nothing at all.

Revision history for this message
Martin Spacek (mspacek) wrote :
Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

If this turns out to have anything to do with Bug #1314782, then the issue lies not in D-Bus but in Ubuntu patches to GTK+ conflicting with Xubuntu patches to XFCE apps (or possibly with the apps originally). I don't remember the exact details but whoever triages/investigates this should get in touch with the Xubuntu team.

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

@ Xubuntu Developers:

Please, could you give your thoughts on this?

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

It severely affects packages beyond the one that causes the flaw.

Changed in dbus (Ubuntu):
importance: Undecided → Critical
Changed in dbus (Ubuntu):
status: New → Confirmed
Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :
summary: - DBus communication problems affecting multiple packages
+ Applications appear to do nothing after communicating with the DBus
+ fork() function
summary: - Applications appear to do nothing after communicating with the DBus
- fork() function
+ Applications appear to do nothing after communicating with DBus
summary: - Applications appear to do nothing after communicating with DBus
+ Several applications appear irresponsible after communicating with DBus
description: updated
Changed in xfce4-volumed (Ubuntu):
status: New → Triaged
importance: Undecided → High
importance: High → Critical
Changed in xfce4-settings (Ubuntu):
status: New → Triaged
importance: Undecided → Critical
status: Triaged → Confirmed
Changed in xfce4-volumed (Ubuntu):
status: Triaged → Confirmed
Changed in xfce4-power-manager (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
Changed in dbus (Ubuntu):
status: Confirmed → Invalid
Changed in xfce4-appfinder (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
Changed in policykit-1 (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
importance: Critical → High
Changed in xfce4-appfinder (Ubuntu):
importance: Critical → High
Changed in xfce4-settings (Ubuntu):
importance: Critical → High
Changed in xfce4-volumed (Ubuntu):
importance: Critical → High
Changed in xfce4-power-manager (Ubuntu):
importance: Critical → High
Changed in thunar (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Changed in xfce4-volumed-pulse (Ubuntu):
status: New → Confirmed
importance: Undecided → High
summary: - Several applications appear irresponsible after communicating with DBus
+ Several applications appear irresponsible after using the gtk_init()
+ daemon mode
Changed in gdk-pixbuf (Ubuntu):
status: New → Confirmed
importance: Undecided → High
importance: High → Critical
Changed in policykit-1 (Ubuntu):
importance: High → Critical
Changed in xfce4-appfinder (Ubuntu):
importance: High → Critical
Changed in xfce4-volumed-pulse (Ubuntu):
importance: High → Critical
Changed in xfce4-power-manager (Ubuntu):
importance: High → Critical
Changed in thunar (Ubuntu):
importance: High → Critical
Changed in xfce4-settings (Ubuntu):
importance: High → Critical
Changed in xfce4-volumed (Ubuntu):
importance: High → Critical
Changed in gdk-pixbuf (Ubuntu):
importance: Critical → High
Changed in xfce4-volumed-pulse (Ubuntu):
importance: Critical → High
Changed in policykit-1 (Ubuntu):
importance: Critical → High
Changed in thunar (Ubuntu):
importance: Critical → High
Changed in xfce4-appfinder (Ubuntu):
importance: Critical → High
Changed in xfce4-power-manager (Ubuntu):
importance: Critical → High
Changed in xfce4-settings (Ubuntu):
importance: Critical → High
Changed in xfce4-volumed (Ubuntu):
importance: Critical → High
summary: - Several applications appear irresponsible after using the gtk_init()
- daemon mode
+ Several applications appear irresponsible after communicating with a
+ daemon
summary: - Several applications appear irresponsible after communicating with a
- daemon
+ XFCE applications appear irresponsible after communicating with a daemon
no longer affects: dbus (Ubuntu)
description: updated
tags: added: i386 utopic
removed: apport-bug
summary: - XFCE applications appear irresponsible after communicating with a daemon
+ Several XFCE applications appear irresponsible after communicating with
+ a daemon
Revision history for this message
In , Alberto Salvia Novella (es20490446e) wrote :

Several programs have a daemon mode call gtk_init() before fork()ing.

This is unsafe, and when it goes wrong this will typically manifest as the daemon hanging shortly after forking, and appearing to simply do nothing at all.

Please check this bug is not affecting PolicyKit.

Changed in policykit-1 (Ubuntu):
status: Confirmed → Triaged
Changed in gdk-pixbuf (Ubuntu):
status: Confirmed → Triaged
Changed in thunar (Ubuntu):
status: Confirmed → Triaged
Changed in xfce4-appfinder (Ubuntu):
status: Confirmed → Triaged
Changed in xfce4-power-manager (Ubuntu):
status: Confirmed → Triaged
Changed in xfce4-settings (Ubuntu):
status: Confirmed → Triaged
Changed in xfce4-volumed (Ubuntu):
status: Confirmed → Triaged
Changed in xfce4-volumed:
status: New → Confirmed
Changed in xfce4-volumed-pulse:
status: New → Confirmed
no longer affects: xfce4-volumed-pulse (Ubuntu)
Changed in hundredpapercuts:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Steve Dodier-Lazaro (sidi) wrote : Re: Several XFCE applications appear irresponsible after communicating with a daemon

Thanks for the triaging effort! As far as I know xfce4-volumed-pulse has a fix committed already though I'll let mrpouit confirm. The ALSA xfce4-volumed never had the issue.

Changed in xfce4-volumed:
status: Confirmed → Invalid
Changed in policykit-1:
importance: Unknown → High
status: Unknown → Confirmed
Changed in gdk-pixbuf:
importance: Unknown → High
status: Unknown → New
Changed in thunar:
importance: Unknown → High
status: Unknown → Confirmed
Changed in xfce4-appfinder:
importance: Unknown → High
status: Unknown → Confirmed
Changed in xfce4-power-manager:
importance: Unknown → High
status: Unknown → Confirmed
Changed in xfce4-settings:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
In , Eric Koegel (eric-koegel) wrote :

commit 216a5b750ccbe9fda98e0456a607230cd8c52303
Author: Eric Koegel <email address hidden>
Date: Thu Jun 26 19:46:46 2014 +0300

    Fork before gtk/dbus init

    https://mail.xfce.org/pipermail/xfce4-dev/2014-May/030715.html
    has the rational for the change.

http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=216a5b750ccbe9fda98e0456a607230cd8c52303

So it shouldn't have that issue anymore. Do you still have startup issues with xfpm using the code from git/master? We haven't done a dev release with the commit in yet.

Revision history for this message
In , Eric Koegel (eric-koegel) wrote :

Created attachment 5567
Fork before gtk/dbus init

Hey, found another fork bug report. This should fix it in xfsettingsd.

Revision history for this message
In , Eric Koegel (eric-koegel) wrote :

Moving to xfsettingsd.

Changed in xfce4-settings:
status: Confirmed → Fix Released
Revision history for this message
awol (awol99) wrote : Re: [Bug 1347272] Re: Several XFCE applications appear irresponsible after communicating with a daemon

A Thousand Thanks.

in English we would say "unresponsive" rather than "irresponsible".

On Tue, Jul 29, 2014 at 8:15 AM, Bug Watch Updater <
<email address hidden>> wrote:

> ** Changed in: xfce4-settings
> Status: Confirmed => Fix Released
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (973778).
> https://bugs.launchpad.net/bugs/1347272
>
> Title:
> Several XFCE applications appear irresponsible after communicating
> with a daemon
>
> Status in pixbuf library for gtk+:
> New
> Status in One Hundred Papercuts:
> Triaged
> Status in System policy:
> Confirmed
> Status in Thunar file manager:
> Confirmed
> Status in xfce4-appfinder:
> Confirmed
> Status in Xfce4 Power Manager:
> Confirmed
> Status in xfce4-settings:
> Fix Released
> Status in Volume management daemon for XFCE 4:
> Invalid
> Status in Volume management daemon for Xfce:
> Confirmed
> Status in “gdk-pixbuf” package in Ubuntu:
> Triaged
> Status in “policykit-1” package in Ubuntu:
> Triaged
> Status in “thunar” package in Ubuntu:
> Triaged
> Status in “xfce4-appfinder” package in Ubuntu:
> Triaged
> Status in “xfce4-power-manager” package in Ubuntu:
> Triaged
> Status in “xfce4-settings” package in Ubuntu:
> Triaged
> Status in “xfce4-volumed” package in Ubuntu:
> Triaged
>
> Bug description:
> Several programs in Xfce have a daemon mode call gtk_init() before
> fork()ing.
>
> This is unsafe, and when it goes wrong this will typically manifest as
> the daemon hanging shortly after forking, and appearing to simply do
> nothing at all.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gdk-pixbuf/+bug/1347272/+subscriptions
>

--
Sent from my recycled old computer.
[:C≡N:]− , I ≤ 2πrEħc ln 2

Revision history for this message
Alistair Buxton (a-j-buxton) wrote : Re: Several XFCE applications appear irresponsible after communicating with a daemon

Hi Alberto,

Thanks for compiling all this information. There's a couple of pieces missing though.

This bug doesn't happen as far as I know with vanilla Gtk. It happens when the Unity Gtk extensions (dbusmenu and overlay scrollbar) are loaded. They are Gtk plugins and one or both of them open dbus connections as soon as they are loaded. They are loaded at Gtk init and that dbus connection becomes invalid after the fork, but Gtk tries to reuse it anyway. That causes it to hang.

As a result of the above, this bug only happens if you have Unity installed alongside the affected software eg Xfce. So a good way to spot duplicates is to ask if the user also has Unity installed if they are not using it.

Another thing is that those Gtk extensions should not be loaded at all outside of Unity. There is a bug about that: https://bugs.launchpad.net/ubuntu/+source/xfce4-indicator-plugin/+bug/1307657

Finally, we don't have a metabug like this upstream at Xfce because bugzilla is not good at handling those types of bugs, but we are aware of the issue and there is a thread on the mailing list about it. https://mail.xfce.org/pipermail/xfce4-dev/2014-May/030715.html

The conclusion we reached is that even though this is ultimately caused by Unity extensions, each application should be fixed to fork *before* it calls Gtk init, because you never know what extra plugins might get loaded and subsequently break.

summary: - Several XFCE applications appear irresponsible after communicating with
- a daemon
+ Several XFCE applications appear unresponsive after communicating with a
+ daemon
no longer affects: xfce4-volumed-pulse (Ubuntu)
no longer affects: xfce4-volumed
Revision history for this message
Martin Spacek (mspacek) wrote :

@ Alistair,

I don't explicitly have Unity installed (I'm on Xubuntu 14.04), but a search via synaptic shows that I do have these Unity-related packages installed, possibly as dependencies for some piece of software I was compiling:

gir1.2-unity-5.0 7.1.4+14.04.20140210-0ubuntu1
libunity-protocol-private0 7.1.4+14.04.20140210-0ubuntu1
libunity-scopes-json-def-desktop 7.1.4+14.04.20140210-0ubuntu1
libunity9 7.1.4+14.04.20140210-0ubuntu1
unity-gtk-module-common 0.0.0+14.04.20140403-0ubuntu1
unity-gtk2-module 0.0.0+14.04.20140403-0ubuntu1
unity-gtk3-module 0.0.0+14.04.20140403-0ubuntu1

Also, I don't have any overlay-scrollbar packages installed, but I do have these dbusmenu packages installed:

gir1.2-dbusmenu-glib-0.4 12.10.3+14.04.20140612-0ubuntu1
libdbusmenu-qt-dev 0.9.3+14.04.20140314-0ubuntu1
libdbusmenu-qt2 0.9.3+14.04.20140314-0ubuntu1

Changed in gdk-pixbuf (Ubuntu):
status: Triaged → Invalid
no longer affects: gdk-pixbuf (Ubuntu)
no longer affects: gdk-pixbuf
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

@mspacek

The unity-gtk-module packages are the trouble makers in this particular case, per the "UBUNTU_MENUPROXY should not be set in Xfce" bug. But that's only half the problem and having those loaded in Xfce causes other problems. The late fork() problems can potentially be triggered by other bugs also, so both these bugs need to be independently fixed. As such, I've unset the duplicate.

Revision history for this message
Martin Spacek (mspacek) wrote :

Should bug #1222356 (** (apport-gtk:3020): WARNING **: Couldn't register with accessibility bus: Did not receive a reply.) perhaps be marked as a duplicate?

Revision history for this message
In , Eric Koegel (eric-koegel) wrote :

Thanks for confirming it Jani, making resolved.

Changed in xfce4-power-manager:
status: Confirmed → Fix Released
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

The string gtk_init does not appear in polkit codebase.

no longer affects: policykit-1 (Ubuntu)
no longer affects: policykit-1
Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

Alberto, the reports which are related to polkit/pkexec and have been marked as duplicate should be unlinked then, right?

Revision history for this message
Georg Altmann (george-george-net) wrote :

Any chance to get the bugfix into trusty?

xfce-bugs #11045 is fixed, see
https://bugzilla.xfce.org/show_bug.cgi?id=11045

commit 791f02416560f5ac75250a9a67f4e2a3d0ac6f7c
Author: Eric Koegel <email address hidden>
Date: Mon Jul 28 09:03:30 2014 +0300

http://git.xfce.org/xfce/xfce4-settings/commit/?id=791f02416560f5ac75250a9a67f4e2a3d0ac6f7c

Revision history for this message
Robin McCorkell (xenopathic) wrote :

Seconded for getting this into Trusty. This bug has caused me so much grief over the past few months...

Revision history for this message
In , Bluesabre-1 (bluesabre-1) wrote :

*** Bug 11036 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

Appfinder was ported to GDbus, so this problem should be solved: 4a065a10945c72c985e254ff1ef13df188f3e11e

Released in 4.11.0

Revision history for this message
Simon Steinbeiß (ochosi) wrote :

All this has been fixed via this SRU for trusty: https://launchpad.net/bugs/1307657

Furthermore this has all been taken care of upstream, so this should not cause any further troubles for anyone.

Changed in xfce4-appfinder (Ubuntu):
status: Triaged → Fix Released
Changed in xfce4-power-manager (Ubuntu):
status: Triaged → Fix Released
Changed in xfce4-settings (Ubuntu):
status: Triaged → Fix Released
Changed in xfce4-volumed (Ubuntu):
status: Triaged → Fix Released
Changed in xfce4-volumed-pulse:
status: Confirmed → Fix Released
Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

Where did you see that in the code? As far as I can see, thunar daemonizes only after init.

Changed in thunar (Ubuntu):
status: Triaged → Fix Released
Changed in hundredpapercuts:
status: Triaged → Fix Released
Changed in thunar:
status: Confirmed → Invalid
Changed in xfce4-appfinder:
status: Confirmed → Fix Released
Revision history for this message
In , Snild (snild) wrote : Re: [Bug 1347272]

Uhm, are you asking me? This was super-long ago, and I never really got all
the dbus stuff... Anyways, I don't remember. :)

//Snild
On Feb 22, 2015 9:45 PM, "Simon Steinbeiß" <email address hidden>
wrote:

> Appfinder was ported to GDbus, so this problem should be solved:
> 4a065a10945c72c985e254ff1ef13df188f3e11e
>
> Released in 4.11.0
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1048805).
> https://bugs.launchpad.net/bugs/1347272
>
> Title:
> Several XFCE applications appear unresponsive after communicating with
> a daemon
>
> Status in One Hundred Papercuts:
> Fix Released
> Status in Thunar file manager:
> Invalid
> Status in xfce4-appfinder:
> Fix Released
> Status in Xfce4 Power Manager:
> Fix Released
> Status in xfce4-settings:
> Fix Released
> Status in Volume management daemon for Xfce:
> Fix Released
> Status in thunar package in Ubuntu:
> Fix Released
> Status in xfce4-appfinder package in Ubuntu:
> Fix Released
> Status in xfce4-power-manager package in Ubuntu:
> Fix Released
> Status in xfce4-settings package in Ubuntu:
> Fix Released
> Status in xfce4-volumed package in Ubuntu:
> Fix Released
>
> Bug description:
> Several programs in Xfce have a daemon mode call gtk_init() before
> fork()ing.
>
> This is unsafe, and when it goes wrong this will typically manifest as
> the daemon hanging shortly after forking, and appearing to simply do
> nothing at all.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/hundredpapercuts/+bug/1347272/+subscriptions
>

Revision history for this message
In , Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

*** Bug 11037 has been marked as a duplicate of this bug. ***

Revision history for this message
Martin Spacek (mspacek) wrote :

Just thought I'd mention that this problem does seem to have gone away for me in trusty. Not sure when that happened, but I'm glad it's (apparently) fixed. Thanks!

Revision history for this message
Luke Schlather (luke2760) wrote :

Just upgraded to trusty and the problem is still here. I mostly notice it opening the xfrun4 prompt. I have noticed if I reboot it will sometimes be fine.

Apparently fixed in 4.11- https://bugzilla.xfce.org/show_bug.cgi?id=11043

Will 4.12 be coming to Trusty?

Revision history for this message
Lastique (andysem) wrote :

I'm having the problem in wily with xfce4-volumed - it doesn't react to multimedia volume keys.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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