apps-wont-open-due-to-maximum-clients-reached-error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| KDE 4 Backports |
Undecided
|
Unassigned | ||
| gnome-desktop |
Fix Released
|
Medium
|
||
| gnome-screensaver (Ubuntu) |
High
|
Ubuntu Desktop Bugs | ||
| Intrepid |
High
|
Ubuntu Desktop Bugs |
Bug Description
I start my computer, sit by it and work, play some game, or so. Then I go to bed, start a movie and fall asleep. When I wake up I get this message for every app I'm trying to start:
This is from update-manager:
Maximum number of clients reached/
warnings.
Maximum number of clients reachedTraceback (most recent call last):
File "/usr/bin/
gtk.
RuntimeError: could not open display
Related branches
tessonec (tessonec) wrote : | #1 |
tessonec (tessonec) wrote : | #2 |
I found a workaround in Hardy. It seems that the gsim-applet was respawning a lot, and it decreased (also) system performance (I was blaming the build of KDE 4.1.1
Jelle De Loecker (skerit) wrote : | #3 |
I'm running into the same problem ever since I upgraded to intrepid.
It's not gsim-applet, because I don't have kde 4 installed.
Matthew East (mdke) wrote : | #4 |
I also get this error in current intrepid. I think it is likely to be an xorg problem, so I'll assign that package for now. If I'm wrong, it can be reassigned.
Aloys (aloys-baillet) wrote : | #5 |
Same error, after a day of usage, no app will ever start again, have to restart X to get it to work. From an already running shell I get the following:
Maximum number of clients reachedError: cannot open display: :0.0
This started to appear after I upgraded to intrepid, happens in Gnome.
Roland Dreier (roland.dreier) wrote : | #6 |
I see this to on an Intrepid system (running gnome, not kde). After a while, no more X clients can be started, and I get the error 'Maximum number of clients reachedxlsclients: unable to open display ":0.0"'
However if I close some client, then I am able to start another client. And apparently X doesn't see very many clients, eg with a system in this state that is only able to open one more client, I get:
$ xlsclients
roland-conroe x-session-manager
roland-conroe gnome-settings-
roland-conroe gtk-window-
roland-conroe gnome-screensaver
roland-conroe gnome-panel
roland-conroe nautilus
roland-conroe update-notifier
roland-conroe gnome-power-manager
roland-conroe nm-applet
roland-conroe evolution-
roland-conroe applet.py
roland-conroe evolution-
roland-conroe trashapplet
roland-conroe multiload-applet-2
roland-conroe music-applet
roland-conroe gnome-terminal
roland-conroe notification-daemon
My guess would be some leak in the X server that doesn't fully free up clients when they exit.
Daniel Hobe (hobe) wrote : | #7 |
xrestop shows the problem very well. Over time there are a lot of clients with an id of '<unknown>' eventually there are enough of them to hit the 255 client limit.
I haven't been able to track down the responsible bit of software yet, but my environment really only has gnome + firefox (with more than a few plugins installed).
Changed in kde4-backports: | |
status: | New → Invalid |
Daniel Hobe (hobe) wrote : | #8 |
Here's how to recreate the problem:
When running gnome (you may need to install the xrestop package):
xrestop -b -m 1 | grep '<unknown>' | wc -l
Then trigger the screensaver:
gnome-screensav
Then run the xrestop command again. I see the number increase by 2 every time the screensaver starts. These windows never go away and eventually take up all the slots. It doesn't seem to matter which screensaver module you use. I don't see this when I trigger xscreensaver.
Roland Dreier (roland.dreier) wrote : | #9 |
Yes, I've been doing some debugging too, and in my setup gnome-screensaver is the culprit as well. Specifically it calls gnome_bg_
I'm now reading through the gnome-screensaver code to figure out why it calls gnome_bg_
RichardMBoos (richboos) wrote : | #10 |
I can confirm this running Intrepid and Gnome. Problem arises after the computer is left on for 1-2 days.
Roland Dreier (roland.dreier) wrote : | #11 |
So I've analyzed the gnome-screensav
However, when the ref count on this gdk pixmap drops to zero, gdk does not actually free the pixmap, because it has the is_foreign flag set (since it was created with gdk_pixmap_
However I'm not sure what a good fix for this is yet.
Dag Stenstad (dag-stenstad) wrote : | #12 |
As Daniel Hobe has mentioned, I also get a lot of <unknown> entries in xrestop. Attached is the output after 1 workday.
Changed in xorg: | |
importance: | Undecided → High |
Sebastien Bacher (seb128) wrote : | #13 |
the issue is an upstream one, could somebody send it to bugzilla.gnome.org?
Roland Dreier (roland.dreier) wrote : | #14 |
I'll file it on bugzilla.gnome.org.
Roland Dreier (roland.dreier) wrote : | #15 |
OK, filed as gnome bug 555701 (http://
Changed in gnome-desktop: | |
status: | Unknown → New |
Sebastien Bacher (seb128) wrote : | #16 |
Thank you for sending the bug to GNOME
Changed in gnome-desktop: | |
assignee: | nobody → desktop-bugs |
status: | Confirmed → Triaged |
Changed in gnome-desktop: | |
milestone: | none → ubuntu-8.10 |
It seems that the number of clients consumed by each GNOME ScreenSaver activation is equal to the number of monitors you have. Those with more than one monitor are getting bitten by this somewhat quicker!
A little digging gives the following:
libgnome-
The change to use this function seems to have landed in gnome-screensaver in rev 1434, which is since hardy - however this isn't exactly a one line change! :-(
That commit has the following ChangeLog entry:
* configure.ac:
* src/Makefile.am:
* src/debug-
* src/gs-manager.c (gs_manager_init),
(apply_
* src/gs-window-x11.c (gs_window_
(gs_window_
(spawn_on_window), (popup_
* src/gs-window.h:
Add support for showing the desktop background behind the
unlock dialog. Add dep on gnome-desktop and
pull in libbackground as an svn:external.
Still to-do:
1. add bg_preferences_
system defaults instead of user settings
2. process bg changes
3. fix clearing child windows to the pixmap
An obvious patch appears to be:
--- src/gs-
+++ src/gs-manager.c 2008-10-10 18:28:21.000000000 +0100
@@ -1281,9 +1281,9 @@
pixmap = gnome_bg_
- TRUE);
+ FALSE);
}
This will make gnome_bg_
gnome-screensaver (2.24.0-0ubuntu2) intrepid; urgency=low
* debian/
- Don't create the GNOME background pixmap with root=TRUE, since that
results in a permanent client connection and unfreeable foreign image;
the leak of these causes you to quickly run out of X clients, especially
on multiple monitors. LP: #263211.
Strange, this wasn't closed automatically
Changed in gnome-desktop: | |
status: | Triaged → Fix Released |
Sebastien Bacher (seb128) wrote : | #22 |
the bug was not closed by the changelog because the component were different
Changed in gnome-desktop: | |
status: | New → Fix Released |
Matthew Carpenter (matt-eisgr) wrote : | #23 |
Where is the KDE version of this? How many of these bugs can there be, since it just started impacting me within the past year... and I don't run Gnome... I run KDE starting with Kubuntu-
And how do I know which bug is impacting me, since there seem to be many which have the same symptoms...
Brion Swanson (brions) wrote : | #24 |
You might start by disabling your screen saver (though you can leave your power saving features on). Even before this bug patch was committed, I disabled the screen saver and stopped experiencing the problem.
This is just a helpful suggestion, not a verified solution by any means.
Matthew Carpenter (matt-eisgr) wrote : Re: [Bug 263211] Re: apps-wont-open-due-to-maximum-clients-reached-error | #25 |
On Thursday 30 October 2008, Brion Swanson wrote:
> You might start by disabling your screen saver (though you can leave
> your power saving features on). Even before this bug patch was
> committed, I disabled the screen saver and stopped experiencing the
> problem.
>
> This is just a helpful suggestion, not a verified solution by any means.
I'll try it.... but I rely on my screensave to save me from "oopses". Yes, I
realize cold-boot attacks render screen-savers less secure than otherwise
thought to be. But still, it provides some level of added safety.
What I want to know is why all these troubles started after upgrading. (I
think to Hardy??? I've lost track they've been plaguing me so long now).
It's become a part of life to close down valid windows. I never knew there
*was* a limit to the number of X clients a user could have running at once.
Point of interest, I run with two users logged in a lot (ie. :7 and :8 are
both setup to have login screens). When I hit the max on one, going to the
other allows me to work... as the other user of course. Yes, I have multiple
personality disorder and need two different users. long story.
Matthew Carpenter (matt-eisgr) wrote : | #26 |
In KDE, the knetworkmanager seems to increment the count of
xwininfo -root -children
every time you interact with the rt-click menu.
At first it raises the count a few... and when you make the menu disappear, it's always one greater that the count before...
Should this be added as a new bug? or have them plug into this bug?
Matthew Carpenter (matt-eisgr) wrote : | #27 |
This increase in numbers is consistent, and was caused simply by Right-Clicking on knetworkmanager and hitting escape... over and over again.
1425
1425
1425
1425
1426
1430
1434
1438
1442
1444
1448
1453
1458
1466
1472
1474
1474
1474
It seems that "Maximum clients reached" is more a symptom of it's own bug classification, which is indicative of any application not managing its X resources carefully.
All applications (in all distributions) should undergo testing to prove they have no "X resource leakage" so to speak. Clearly writing a desktop systray-applet that misses reclaiming an X window here and there doesn't seem like that big a deal.... but apparently many apps are causing a big problem.
How do we proceed???
Chris Purves (chris-northfolk) wrote : | #28 |
Are there any tips on how to troubleshoot this problem and isolate which application is not releasing resources. I am running kubuntu intrepid and when running xrestop see that the number of clients goes to 210 on startup.
Matthew Carpenter (matt-eisgr) wrote : | #29 |
On Saturday 22 November 2008, Chris Purves wrote:
> Are there any tips on how to troubleshoot this problem and isolate which
> application is not releasing resources. I am running kubuntu intrepid
> and when running xrestop see that the number of clients goes to 210 on
> startup.
I find that it's a hit or miss thing. I've not found an easy way to track
down what is causing the issue. The only thing I've been able to do is
use "xwininfo -root -children" (normally piped to wc -l) and "ps aux", and
start killing X apps owned by the current user and checking for large changes
to xwininfo. That's also how I found the fact that Koqueror processes were
not dying when I closed them.
I normally idle around 900 xclient listings at startup and I start having
problems around 2500-3000. Yes, I make use of many of KDE's utilities.
Chris Purves (chris-northfolk) wrote : | #30 |
I did try something similar, but for me all the extra clients were opened shortly after login, so not enough time to kill processes before they would spawn multiple instances. I found that I had 183 instances of python running after logging in to KDE. Removing as many startup apps as I could did not identify the problem app, but I found that creating and logging in to a new account didn't exhibit the multiple instances of python and xclients.
My solution was to rename ~/.kde and allow it to be regenerated. This has resolved the problem for me.
Matthew Carpenter (matt-eisgr) wrote : | #31 |
On Saturday 22 November 2008, Chris Purves wrote:
> I did try something similar, but for me all the extra clients were
> opened shortly after login, so not enough time to kill processes before
> they would spawn multiple instances. I found that I had 183 instances
> of python running after logging in to KDE. Removing as many startup
> apps as I could did not identify the problem app, but I found that
> creating and logging in to a new account didn't exhibit the multiple
> instances of python and xclients.
>
> My solution was to rename ~/.kde and allow it to be regenerated. This
> has resolved the problem for me.
Interesting. I wonder if you were running into a guidance-
in handling old configurations... That's the primary thing I know of that
uses Python after you log in. It's the tool which shows your battery power
as well as allows you to suspend/hibernate and change power consumption
profiles.
I may try that. It's a bit akin to reinstalling the os on Windows, without
all the hastel ;)
Matt
Henri Cook (henricook) wrote : | #32 |
I believe I have this problem in Intrepid, new things stop spawning - which also means if I go to system -> shutdown a box appears but all the buttons (restart/
w.r.t. the workaround suggested, I have at the moment about 10 unknown resources in xrestop, how can I relate them back to a process? e.g. how do i know what's causing them? I've tried killing gnome-screensaver which I suspect is the cause but the unknown resources remain?
Thanks,
H
Henri Cook (henricook) wrote : | #33 |
This report says fix released - where is this fix? How can i get it? I've now got this problem on my new laptop, it started as soon as I plugged it into a second screen this afternoon - my main three screen PC uses nvidia, this uses ATI but i've only ever had these symptoms when using more than one screen - can someone tell us what's going on?
This problem has started to affect me today.
I'm using a backport of KDE 4.4.1 on Karmic.
Applications in use are Skype, Jungledisk, Chromium, Firefox, Terminal and Dolphin.
All the sudden Dolphin can't open any of my files and if I try from the terminal I'm giving the message described in this bug.
Timo Aaltonen (tjaalton) wrote : | #35 |
interfasys: something in kde is leaking/creating client connections, and the limit (256) is reached. File a bug against kde.
Florent Viard (fviard) wrote : | #36 |
Hi,
I'm also affected by this bug with ubuntu 9.10.
Maybe it goes faster to trigger in my case as I have 2 monitors.
It could be related to kdelibs as i installed them to be able to use Kate.
And I noticed that kate used 1 client connection for each file opened as a tab in my kate window.
Closing a kate with 3 tabs reduced my xlsclients | wc -l from 44 to 38 removing 4 kates and 2 knotify4.
Isn't there a tweak to change xlsclients max value ? Because 56 looks really small regarding all the mandatories applications in my ubuntu system:
user-desktop kate
user-desktop gnome-session
user-desktop gnome-settings-
user-desktop seahorse-daemon
user-desktop notify-osd
user-desktop gnome-panel
user-desktop nautilus
user-desktop trashapplet
user-desktop update-notifier
user-desktop gdu-notificatio
user-desktop tracker-applet
user-desktop gnome-volume-
user-desktop gnome-power-manager
user-desktop nm-applet
user-desktop bluetooth-applet
user-desktop polkit-
user-desktop gtk-window-
user-desktop indicator-
user-desktop indicator-applet
user-desktop evolution-
user-desktop applet.py
user-desktop gstm
user-desktop thunderbird-bin
user-desktop xchat
user-desktop gnome-terminal
user-desktop putty
user-desktop firefox-bin
user-desktop '<unknown>'
user-desktop kded4
user-desktop kded4
user-desktop '<unknown>'
user-desktop knotify4
user-desktop knotify4
user-desktop '<unknown>'
user-desktop kwalletd
user-desktop kwalletd
user-desktop gedit
user-desktop LaCieNetworkAss
user-desktop grdc
user-desktop gnome-screensaver
user-desktop '<unknown>'
user-desktop kate
user-desktop kate
user-desktop kate
user-desktop kate
Florent Viard (fviard) wrote : | #37 |
It looks like that it is not really related to the kdelibs because even not using any kde apps after a fresh start the problem occured. Maybe the root cause is firefox cf:
http://
I have a lot of :
0x401417d "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
0x40138d3 "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
0x40138d0 "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
0x40138ca "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
0x40138c7 "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
0x40138c4 "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
0x401376f "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
0x40118ea "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
0x401179b "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
0x4011793 "Firefox": ("Popup" "Namoroka") 200x200+0+0 +0+0
in my :
xwininfo -root -children
but there is also 10s of lines related to the applets:
0x3c00001 "applet.py": ("applet.py" "Applet.py") 10x10+10+10 +10+10
0x1a001d8 (has no name): () 16x36+7+-13 +7+-13
0x3000003 "evolution-
0x3000001 "evolution-
0x1a001d0 (has no name): () 16x36+7+-13 +7+-13
0x2000001 "evolution-
0x1a001cb (has no name): () 16x36+7+-13 +7+-13
0x1e000b5 "File Manager": () 10x10+-100+-100 +-100+-100
0x1c000a4 "Tableau de bord": () 10x10+-100+-100 +-100+-100
0x3800003 "indicator-
0x1a00016 (has no name): () 2x1020+2558+2 +2558+2
0x1a00015 (has no name): () 2x1020+0+2 +0+2
0x3800001 "indicator-
0x1a00138 (has no name): () 16x36+7+-13 +7+-13
0x1e00003 "File Manager": () 10x10+-100+-100 +-100+-100
0x2600180 (has no name): () 1x1+-100+-100 +-100+-100
0x2600046 "gtk-window-
0x2a00003 "gnome-
0x1c00035 (has no name): () 10x10+0+0 +0+0
0x1a0011a (has no name): () 16x36+-3+-23 +-3+-23
0x2600003 (has no name): () 1x1+-100+-100 +-100+-100
0x2600001 "gtk-window-
0x1a00118 (has no name): () 16x36+7+-13 +7+-13
0x3600001 "polkit-
0x1a00117 (has no name): () 16x36+7+-13 +7+-13
0x2a00001 "gnome-
0x1a00116 (has no name): () 16x36+7+-13 +7+-13
0x2400001 "Tracker": ("tracker-applet" "Tracker-applet") 10x10+10+10 +10+10
0x1a00114 (has no name): () 16x36+7+-13 +7+-13
0x3400001 "gnome-
djlj (spam-vsevjednom) wrote : | #38 |
Hello, I got a same problem after update from Karmic to Lucid.
Maximum number of clients reachedxwininfo: unable to open display ':0.0'
Alloc (christian-illy) wrote : | #39 |
Not fixed in Ubuntu 10.04 Lucid. Is there any way (besides disabling the screensaver) to avoid this? Like manually removing the pixmaps/<unknown>'s from X?
Changed in gnome-screensaver (Ubuntu Intrepid): | |
status: | Fix Released → Incomplete |
status: | Incomplete → Fix Released |
Changed in gnome-screensaver (Ubuntu): | |
status: | Fix Released → Incomplete |
Chris Coulson (chrisccoulson) wrote : | #40 |
Please don't reopen old bugs. This particular bug was fixed a long time ago, and it's most likely that you are experiencing a completely unrelated issue
Changed in gnome-screensaver (Ubuntu): | |
status: | Incomplete → Fix Released |
Changed in gnome-screensaver (Ubuntu): | |
status: | Fix Released → New |
Changed in gnome-screensaver (Ubuntu): | |
status: | New → Fix Released |
Changed in gnome-desktop: | |
importance: | Unknown → Medium |
I can confirm this bug.
Running kde 4.1.1
[code]
[~] xlsclients | wc -l
Maximum number of clients reachedxlsclients: unable to open display ":0.0"
[~] xwininfo -root -children
Maximum number of clients reachedxwininfo: unable to open display ':0.0'
[/code]
I am willingful to add more information, but I do not know exactly what to do.