Fast user switch applet causes high processor load

Bug #84226 reported by Holger Berndt
20
Affects Status Importance Assigned to Milestone
fast-user-switch-applet
Fix Released
Critical
fast-user-switch-applet (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

Binary package hint: fast-user-switch-applet

On Feisty, since a recent upgrade, the fast user switch applet causes 50% processor load on my AMD64 dual core when it is added to a gnome panel.

Revision history for this message
Jochen Martin Eppler (jochen-eppler) wrote :

see also bug #84944

Changed in fast-user-switch-applet:
assignee: nobody → desktop-bugs
status: New → Triaged
Changed in fast-user-switch-applet:
status: Unknown → Confirmed
Revision history for this message
Christoph Konersmann (c-k-upb) wrote :

This bug reapears on Ubuntu Gutsy (amd64).

HW: Intel Core2Duo 2x2,0GHz, 2GB RAM, 500GB SATA-HD
About 6 computers of the same system configuration.

The Installation is Gutsy for amd64 with newest packages for now (02.Okt. @ 15:49).

On login of a newly created user, the login hangs and "top" reports ~100% cpu-usage on one core. If f-u-s-a is removed from the panel all is ok. Readding the applet causes high cpu-usage again.

Revision history for this message
William F Pearson (wfpearson) wrote :

I can confirm it. Gutsy x386. Very frustrating because this is a laptop with no need to fast user switch.

Changed in fast-user-switch-applet:
importance: Undecided → Medium
Revision history for this message
Matthew Gregg (mcg) wrote :

I have both a Core2Duo running 64bit and a older P4 running 32 bit up to date Gutsy. Neither machine exhibits this problem. Both were upgraded from Fiesty.

Revision history for this message
Christoph Konersmann (c-k-upb) wrote : Re: [Bug 84226] Re: Fast user switch applet causes high processor load

The strace output while running is nothing more than

Process 6928 attached - interrupt to quit
brk(0x1213000) = 0x1213000
brk(0x1234000) = 0x1234000
[...]
Process 6928 detached

Revision history for this message
Christoph Konersmann (c-k-upb) wrote :

Hm, maybe this high CPU usage is caused by the userdatabase? All systems are connected to a ldap, kerberos, AFS infrastructure with many user entries. Does this applet preload all users available from "getent passwd"?

Revision history for this message
William F Pearson (wfpearson) wrote :

Christoph: That's an interesting question because "getent passwd" loads every user on my Win 2k3 domain. This machine is authenticated to the domain controller via Samba ADS.

# getent passwd
...
real 0m2.246s
user 0m0.016s
sys 0m0.012s

#time getent passwd |wc -l
3964

Thats a lot of users!

Is there a way to limit fast-user-switch to local users only? Certain proprietary applications require me to be authenticated to the domain or I wouldn't need Samba ADS at all.

Revision history for this message
Tassos Bassoukos (abassouk) wrote :

This happens at my installation too (getent gives ~10k registered users). When logging with a local user and the network disabled all is ok, but if the network is enabled the panel freezes on login and the fast-user-switch-applet task runs at 100%. Now, I can't remove the package as ubuntu-desktop depends on it, and while I've removed the applet from the default environment, there is no easy way to remove it from users desktops automatically on login...

Revision history for this message
Marcel Schaal (marcelschaal) wrote :

We can confirm this bug having about 2500 users. Also we don't want to remove ubuntu-desktop because other packages may get removed by apt-get autoremove.

Revision history for this message
puntium (puntium) wrote :

Can also confirm similar behavior on a NIS-based system with 6000+ users. fast-user-switch applet takes up all CPU, and locks up the gnome panel.

Revision history for this message
Mike Peters (mike-ice2o) wrote :

I'm seeing something similar on Gutsy (AMD64) with only 4 local users. CPU usage goes to 100% as soon as I select another user from the list.

strace shows the following when I try the user switch:

sendto(19, "FLEXI_XSERVER_USER ozlem\n", 25, MSG_NOSIGNAL, NULL, 0) = 25
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=12, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=13, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|POLLPRI}, {fd=18, events=POLLIN}, {fd=17, events=POLLIN|POLLPRI}], 12, 0) = 0
read(19, 0x7fff4f646c9f, 1) = -1 EAGAIN (Resource temporarily unavailable)

Is the \n supposed to be there with the user name in the call to FLEXI_XSERVER_USER?

Changed in fast-user-switch-applet:
status: Confirmed → Fix Released
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Fixed upstream, thanks.

Changed in fast-user-switch-applet:
status: Triaged → Fix Committed
Revision history for this message
Wouter Stomp (wouterstomp-deactivatedaccount) wrote :

Fixed: this should now be in ubuntu.

Changed in fast-user-switch-applet:
status: Fix Committed → Fix Released
Changed in fast-user-switch-applet:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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