x-session manager eats 100% CPU, nautilus won't start, applications won't start

Bug #107950 reported by Wouter
60
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Ubuntu
Expired
Undecided
Unassigned

Bug Description

this is a new install of feisty, please help

Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in recently. We were wondering if this is still and issue for you? Thanks in advance.

Revision history for this message
Brian Murray (brian-murray) wrote :

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and feel free to submit bug reports in the future.

Revision history for this message
Yann (tatrefthekiller) wrote :

I think I have the same problem : I have 2 processes eating 100 % CPU :
* x-session-manager (around 70%) owned by me.
* gdm (25%) owned by root.

I don't know when it begins, I don't do anything special. I'm not able to start any application. I can't stop the two processes with CTRL-ALT-BACKSPACE.

I find nothing in xorg.0.log or systemlog.

I'm running Intrepid, all up to date (backports activated).

Tell me if you need more info.

Revision history for this message
Yann (tatrefthekiller) wrote :

Sorry, I don't know how I can edit...

I can kill x-session-manager : it has the same effect as CTRL-ALT-BACKSPACE.

Revision history for this message
André (andre-goerres) wrote :

I have the same problem, x-session-manager around 75% and gdm around 25% CPU usage. As an effect, clicked links anywhere outside the browser doesn't open a new tab in firefox. Unlike Yann I still can open new programs.

The problem mostly occurs over night after having my pc on less than 2 days. Till last week I needn't restart my pc (or X) for weeks.

I couldn't find anything of interest in the logfiles.

Revision history for this message
André (andre-goerres) wrote :

Huh, I just found out, that Amarok caused the problem right now. I don't know, if it was always Amarok, but killing Amarok brought the CPU usage back to ~0% and opened the clicked links.

Revision history for this message
Yann (tatrefthekiller) wrote :

It could be the cause : I'm using Amarok too. I'll try to kill Amarok next time it appends.
Thanks for the tip.

Revision history for this message
André (andre-goerres) wrote :

Oh sorry, I forgot to mention, that I'm using Amarok 2 with Ubuntu 8.10 (Gnome).

Revision history for this message
Francis (ohmer) wrote :

I have the same problem on 8.10. Not using Amarok. When it crashes, I think X-Chat always have the focus. The X-Chat window become gray and irresponsible. The GUI is not frozen completly, I can right click on my system monitor applet and open the system monitor application.

On two separates crashes, I remarked briefly apt-cache in the process list. When I login again into gnome. update-manager say there is new updates availables. Update-manager is configured to install automatically new security updates without confirmation. Maybe it's related?

Hope that can help to resolve that bug!

Revision history for this message
Zer0wL (zeroowl) wrote :

I have the same problem for few weeks now
Ubuntu 8.10
Also I am using Amarok 2.0
But killing it dosn't help me.

When I run strace on x-session-manager
it shows this message all the time, in speed of hundred per second, I think this is a problem.

accept(9, 0x7fff603046f0, [4294967406]) = -1 EMFILE (Too many open files)
write(2, "_IceTrans", 9) = 9
write(2, "SocketUNIXAccept: accept() faile"..., 34) = 34
read(3, 0x83a774, 4096) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=10, events=POLLIN}, {fd=14, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=17, events=POLLIN|POLLPRI}, {fd=18, events=POLLIN|POLLPRI}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}, {fd=23, events=POLLIN}, {fd=24, events=POLLIN}, {fd=25, events=POLLIN}, {fd^CIN|POLLPRI}, {fd=17, events=POLLIN|POLLPRI}, {fd=18, events=POLLIN|POLLPRI}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}, {fd=23, events=POLLIN}, {fd=24, events=POLLIN}, {fd=25, events=POLLIN}, {fd=27, events=POLLIN}, {fd=28, events=POLLIN}, {fd=29, events=POLLIN}, {fd=31, events=POLLIN}, {fd=32, events=POLLIN}, {fd=33, events=POLLIN}, {fd=54, events=POLLIN}, {fd=274, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN, revents=POLLIN}], 22, -1) = 1

The exact same problem is described here:
https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/58171
And there is work-around too:
As a temporary workaround I have set the limit of open files to a very large value.

I am going to try it by myslef.. and write here the results.

Revision history for this message
Zer0wL (zeroowl) wrote :

After some more tests,
It looks like for each new open window in X
x-session-manager makes new connection to
/tmp/.ICE-unix/{PID of x-session-manager}

It could be followed by runing this command
lsof -p `ps -e | grep x-session | cut -d" " -f1` | grep ICE-unix | wc -l
It will show how many times it open this file..
And it almost never closes it...

So set open file limit to 65000, helps only for few days, depends on you usage of the machine.
If 1024 was enough for me for 2-3 days, 65k will work for few month ;-) Good!

Looks like a bug in gnome for me.

Revision history for this message
Francis (ohmer) wrote :

On my comment on December 22 I said:
"On two separates crashes, I remarked briefly apt-cache in the process list. When I login again into gnome. update-manager say there is new updates availables. Update-manager is configured to install automatically new security updates without confirmation. Maybe it's related?"

Since I disabled the search for updates on update-manager, this bug didn't occurred again... I think the bug's source is there.

Revision history for this message
Reid K (rnk-mit) wrote :

This situation has happened to me twice. I'm using GNOME, Amarok 2, and I have update-manger set to check for updates but not to install them. I have the same symptom with the thousand ICE-unix file descriptors being opened. I just left my machine on for one night, with the focus on amarok. I restarted my machine yesterday for the same reason.

Revision history for this message
André (andre-goerres) wrote :

Since I have set my open file limit to 65k, the problem hasn't occured again.

Revision history for this message
Reid K (rnk-mit) wrote :
Download full text (3.3 KiB)

Another interesting tidbit. I went to my home directory, and ran 'ls -ltr' to see the file I just put there. Sitting in front of it was a file called .xsession-errors. That was suspicious, since xsession-manager is the process that is flipping out. Looking at the contents, it seems that all kinds of errors are being generated by amarok 2 on various focus events. Additionally, compiz seems to be logging some errors about a non-existant animation on window focus events, but that seems unrelated. Here's a short sample:

QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
amarok(7181) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(7181) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
QPainter::begin: Cannot paint on a null pixmap
QPainter::save: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::restore: Unbalanced save/restore
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
/usr/bin/compiz.real (animation) - Error: Animation settings mismatch in "Animation Selection" list for Focus event.
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
amarok(7181) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
/usr/bin/compiz.re...

Read more...

Revision history for this message
Julien SALMON (juliensalmon) wrote :

Hi

I've got the same issue with x-session-manager eating 70% of the CPU resource. It occurs after a few hours, and it seems to happen only when Amarok 2 is opened.
I'd like to try the solution mentionned that consists in modifying the open file limit, but unfortunately I don't know how to do that.
Could anybody help me ?

Thanks !

Revision history for this message
Reid K (rnk-mit) wrote :

I did an apt-get update and upgrade, and the problem went away. It must have been a buggy version of amarok 2 or compiz or xsession-manager or Qt or something. Is this still a problem for others?

Revision history for this message
Julien SALMON (juliensalmon) wrote :

I tried to do an update & upgrade but it installed nothing new...
Just for the info, I'm using the Nightly developpment version of Amarok 2. I'm thinking of reporting the bug on the developper blog. I'll tell you if anything comes out of it !

Revision history for this message
Dave Fine (finerrecliner) wrote :

I also have this problem. x-session-manager eating ~75% of my CPU, and no new programs launching :(

i have amarok 2 installed on ubuntu 8.10.

Revision history for this message
jpfle (jpfle) wrote :

I confirm this bug on Ubuntu 8.10 (64-bit) and Gnome 2.24.1.

x-session-manager eats around 75% and gdm around 25% CPU usage. I can't open any application.

I don't have Amorok 2, but Amarok 1.4.10.

How to supply more information?

Revision history for this message
Dave Fine (finerrecliner) wrote :

i stopped using amarok 2 for about a week, and the problem went away (used banshee as a replacement).

then i started up amarok 2 again just to see what would happen...about a day later the symptoms for this bug started again. I'm going to drop amarok 2 until an update is made :(

Revision history for this message
Tremaine Lea (tremaine) wrote :

I am also experiencing this issue with x-session-manager taking 75% or more of the CPU, and being unable to launch applications as a result. Only restarting X brings things back to a usable state.

Running x86_64 Intrepid Ibex 8.10, completely current.

@quad:~$ uname -a
Linux quad 2.6.27-11-generic #1 SMP Thu Jan 29 19:28:32 UTC 2009 x86_64 GNU/Linux

With two terminal sessions, firefox and evolution open:

date ; lsof -p `ps -e | grep x-session | cut -d" " -f1` | grep ICE-unix | wc -l
Thu Mar 12 22:51:20 MDT 2009
14

After opening Amarok 1.4
date ; lsof -p `ps -e | grep x-session | cut -d" " -f1` | grep ICE-unix | wc -l
Thu Mar 12 22:52:09 MDT 2009
18

After pressing play in Amarok:
date ; lsof -p `ps -e | grep x-session | cut -d" " -f1` | grep ICE-unix | wc -l
Thu Mar 12 22:53:18 MDT 2009
20

With no further action on my part:
 date ; lsof -p `ps -e | grep x-session | cut -d" " -f1` | grep ICE-unix | wc -l
Thu Mar 12 22:55:00 MDT 2009
24

date ; lsof -p `ps -e | grep x-session | cut -d" " -f1` | grep ICE-unix | wc -l
Thu Mar 12 22:57:11 MDT 2009
28

I quit Amarok at this point.

strace -Ff -tt -p 27023 2>&1 | tee strace-amarok.log attached

Revision history for this message
Tremaine Lea (tremaine) wrote :

Having to restart X at this point so I can open apps.

75% usage
17684 my-user 20 0 166m 11m 6484 S 75 0.3 357:05.33 x-session-manag

@quad:~$ date ; lsof -p `ps -e | grep x-session | cut -d" " -f1` | grep ICE-unix | wc -l
Sat Mar 14 12:55:20 MDT 2009
1002

Is anyone looking at this? What further information can anyone provide to help move this forward?

Revision history for this message
Alex Forencich (alex-alexelectronics) wrote :

There is most definitely a problem with something not closing connections. After a fresh reboot, lsof -n | grep /tmp/.ICE-unix/5724 | wc --lines reads 10. After starting Firefox, Thunderbird, Amarok, Kopete, and Eclipse, it reads 18. Closing and restarting Amarok pushes it to 21. Three instances should have been closed when Amarok was shut down, but they weren't. Also, the count would increase slowly over time when Amarok was left running in the backround. However, it seems like this bug might not be consistent - I started anki and it added one, then I closed it and the count fell by one. Same for gedit. Kopete didn't release its connection when it was restarted. Nor did piklab or openoffice. Maybe this is a compatibility problem with KDE or Qt apps running in gnome? It would appear that Gnome apps either successfully close the connection when they exit, or they don't open one in the first place. For example, gimp doesn't even seem to open one - the count doesn't change.

One odd thing I noticed: amarok only has problems with opening extra connections on my 32 bit machine and not on my 64 bit machine. They should be running pretty much the same software. However, the 64 bit machine does has the same problem with leaving connections open.

Revision history for this message
Tyler Ham (tylerh11) wrote :

I'm having the same problem with Amarok 1.4.10 on Ubuntu 8.10 (64-bit). Are there any logs or messages I could post that would be helpful in finding a solution?

Revision history for this message
sommerkom (sommerkom) wrote :

I can confirm this very serious bug with Ubuntu 8.10.

Revision history for this message
charles.fg (charles-fg) wrote :

I'm also have this problem in my intrepid 32-bit using Amakok 1.4.10.
And just restarting X takes the system to a normal level.

Revision history for this message
John McCabe-Dansted (gmatht) wrote :

I can confirm this on Ubuntu 9.04 32bit, running in a VirtualBox virtual machine. I am not running Amarok, I am running a test script that opens and closes LyX thousands of times while sending it random keypresses. I will try to determine exactly what causes the problem.

Revision history for this message
ve7it (ve7it) wrote :

Running Ubuntu 9.04, x-session manager using 100% cpu time... this problem was tracked down to the remote desktop (vino) server. By examining .xsession-errors in the users directory, I saw lots of messages saying that the vino server was already running. It turns out that 2 configurations are trying to start the remote desktop and a fight continues until the user logs out. Under system/preferences/startup I had remote desktop checked. I also had remote desktop setup through the system/preferences remote desktop menu option. I fixed the problem by unchecking the system/preferences/startup remote desktop option and rebooting. The cpu usage dropped back to normal 1 to 2% idle and remote desktop still works.
It seems like too many gui apps are trying to control process startup... this problem may exist for other applications besides the vino server. The key to tracking it down was the messages in ..xsession-errors.
cheers
Lawrence Glaister VE7IT

Revision history for this message
David Decotigny (daviddecotigny) wrote :

Same problem for me: intrepid x86_64 (up-to-date from today) after 2 days up. Never happened before, even with longer uptimes. I confirm the problem seems to be related to this funky poll() on thousands of files. And, err, well, I don't have thousands of windows showing up on my desktop.

Looking at strace on x-session-manager shows the "too many open files" error, and an -EAGAIN on some read. lsof gave 1101 instances of opened ICE sockets.

Amarok was running. It helped killing it but was not enough. At some point, I had to kill pidgin too, then firefox. Doing 'sysctl -w fs.file-max=1000000' didn't help. Chose to reboot the machine.

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for reporting this bug.

I cannot confirm on Lucid or Maverick. Is this still an issue?

Revision history for this message
Zer0wL (zeroowl) wrote :

Not an issue for me anymore
Ubuntu 10.4

Revision history for this message
André (andre-goerres) wrote :

For me neither (Ubuntu 10.04).

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Ubuntu because there has been no activity for 60 days.]

Changed in ubuntu:
status: Incomplete → Expired
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.