Firefox, GIMP unusuable slow by root running kubuntu

Bug #667479 reported by Michael B
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libcanberra (Debian)
New
Undecided
Unassigned
libcanberra (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: kubuntu-desktop

Problem:
Logged in as root both, GIMP and Firefox were unusuable slow when a top-level menu entry (Files...) was activated (mouse-click) though browsing was fluently possible.
It took about 5 seconds or more until the pull-down menu content appeared and the same time to select one of those entries (like "Open file", "Print", etc.)
The reason was that libcanberra was loaded on every trigger of a menu entry, with every click on a menu button, looked up several symbols and then was finalized (unloaded)
Starting firefox from console with "export LD_DEBUG=files", "firefox" showed the time consuming action:

---quote start---
     opening file=/usr/lib/libcanberra-0.22/libcanberra-pulse.so [0]; direct_opencount=1
     /usr/lib/libcanberra-0.22/libcanberra-pulse.so: error: symbol lookup error: undefined symbol: libcanberra_pulse_LTX_pulse_driver_open (fatal)
     ...
     /usr/lib/libcanberra-0.22/libcanberra-pulse.so: error: symbol lookup error: undefined symbol: libcanberra_pulse_LTX_driver_playing (fatal)
     calling fini: grep [0]
     ...
     calling fini: /usr/lib/libcanberra-0.22/libcanberra-pulse.so [0]
     file=/usr/lib/libcanberra-0.22/libcanberra-pulse.so [0]; destroying link map
---quote end---

Different from that is how the same activity was handled as regular user:

---quote start---
     calling init: /usr/lib/libcanberra-0.22/libcanberra-pulse.so
     /usr/lib/libcanberra-0.22/libcanberra-pulse.so: error: symbol lookup error: undefined symbol: libcanberra_pulse_LTX_pulse_driver_open (fatal)
      ...
     /usr/lib/libcanberra-0.22/libcanberra-pulse.so: error: symbol lookup error: undefined symbol: libcanberra_pulse_LTX_driver_playing (fatal)
---quote end---

No unloading/finalisation of the library/symbols. For that non-root user the libcanberra was loaded just once much earlier in the start-up phase of firefox and was not finalized in conjunction with a menu-button-click:

---quote start---
     calling init: /usr/lib/libcanberra.so.0
     calling init: /usr/lib/libcanberra-gtk.so.0
     calling init: /usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so
---quote end---

As the complete console debug-output shows, the strategy of firefox as root is to load libraries and symbols lazy on request while firefox run as non-root preloaded the libraries.

Workaround:
Purge the libcanberra-gtk-module package to let GIMP run as root smoothly, and additionally to purge the canberra-pulse package to let firefox become usable again.

Environment:
Installed ubuntu 10.04,
switched to kubuntu having root- and one user account installed,
created a new user account under kubuntu.
Audio is default pulseaudio.

The behaviour was independent of different deskstop styles, GTK-widget sets or other tunings in the system-settings and GIMP was unused so far as root and as non-root.
Also tried a different Firefox Theme.
There are no defect or packages or unresolved dependencies.
Setting the environment variable "GTK_MODULES" (was preset to "libcanberra-gtk-module") to the empty string or unsetting it at all had no effect.
The system is freshly installed, this workaround was my last action in fine-tuning (so far).

Reflection:
The libcanberra-gtk-module is described as an automatic hook for applications using GTK and it seems it was the origin trigger which finally caused the repeated load/unload.
But Firefox was still was still misfunctioning without that module while GIMP was smooth to handle again.
Both packages are marked as ubuntu supported, they caused no conflicts when installed - and all other programs if have run so far were not affected when run as root.
There was never a sound in conjuction with menu actions though system sounds and audio play are working.

Lasting problems/questions:
Firefox run as root acted different in loading libraries as root and non-user.
GIMP, definitely in delivery state, acted different too.
If there should be a possibility, which i am not aware of, to configure root vs. non-root behaviour of Firefox and GIMP this way it could be better, more obviously, documented.
Since both applications were affected, it seems the reason is neither firefox nor GIMP.

affects: kubuntu-meta (Ubuntu) → libcanberra (Ubuntu)
Revision history for this message
Andreas Mohr (andi) wrote :

Same issue occurring on Debian testing (Wheezy), libcanberra-pulse 0.28-1 (e.g. while using iceweasel 3.6.18-1), menus take >> 5 seconds to open (on an Athlon XP).

Since it appeared to be quite difficult to gather reference information about this phenomenon, let me add these
keywords: iceweasel menu stall delay lockup timeout slow futex ETIMEDOUT mouse strace
socket(): Address family not supported by protocol
(some of those messages/keywords likely are not related, but they may occur nearby, e.g. in strace logs,
and thus are the ones that affected people will search for)

Uninstalling, restarting iceweasel makes menus work, reinstalling, restarting iceweasel makes it stall again --> clearly an issue that occurs when having libcanberra-pulse in the browser address space.

Note that on Debian here, it is NOT just root that is affected, several tested user accounts had issues.

IMNSHO this is a very annoying kind of a usability issue in a widely used variant (iceweasel) of a very frequently used application type (browser), thus it would be nice if it could get elevated (well, in case of further documented damage for many other users, that is, which would indicate higher priority).
At least the usability loss is so severe that the only way out is to simply (and, well, fatally) uninstall libcanberra-pulse and regain some tiny shreds (the bug isn't fixed yet...) of peace of mind.

Thanks, and kudos to the OP for a very detailed report!

Changed in libcanberra (Ubuntu):
status: New → Confirmed
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.