Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72589 - Xlib complains that Maximum number of clients reached.
Summary: Xlib complains that Maximum number of clients reached.
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-26 17:10 UTC by Daniel Milne
Modified: 2010-12-02 20:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xrestop -b (myxres,83.77 KB, text/plain)
2005-03-31 11:04 UTC, John Nilsson
Details
xwininfo -root -children -all (myxwininfo,98.93 KB, text/plain)
2005-03-31 11:05 UTC, John Nilsson
Details
xloadimage.4.1.resource.patch (xloadimage.4.1.resource.patch,1.08 KB, patch)
2005-10-30 09:47 UTC, Krzysztof Pawlik (RETIRED)
Details | Diff
xloadimage-4.1.resource.patch (xloadimage.4.1.resource.patch,1.28 KB, patch)
2006-01-04 15:00 UTC, Krzysztof Pawlik (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Milne 2004-11-26 17:10:32 UTC
Starting an X program, fails with the message (on my 3rd X server):

Xlib: connection to ":2.0" refused by server
Xlib: Maximum number of clients reached
xterm Xt error: Can't open display: :2

Reproducible: Sometimes
Steps to Reproduce:
1.Start a few X programs such as Firefox, Thunderbird.
2. (Unknown step)
3.Start another X program, such as xmms.

Actual Results:  
$ xmms
Xlib: connection to ":2.0" refused by server
Xlib: Maximum number of clients reached

** CRITICAL **: Unable to open display


Expected Results:  
Programs start as requested. 

This has been happening with different versions of xorg-x11 in XFCE4, although
I've reproduced it in KDE and Gnome. Sometimes, I have only Firefox, Thunderbird
and Konsole running when it complains.


# emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.4, glibc-2.3.4.20041102-r0,
2.6.9-mm1 i686)
=================================================================
System uname: 2.6.9-mm1 i686 AMD Athlon(tm) processor
Gentoo Base System version 1.6.6
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon -Os -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3.2/share/config/usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://mirror.pacific.net.au/linux/Gentoo ftp://gentoo.ccccom.com
http://gentoo.mirrors.pair.com/ ftp://mirrors.tds.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="3dnow X aalib adns alsa apache2 apm arts avi berkdb bitmap-fonts bonobo cdr
crypt cups curl dba directfb dvd encode esd f77 fam ffmpeg flac flash foomaticdb
fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile
imagemagick imap imlib innodb jabber java jpeg junit kde ldap libg++ libwww lirc
mad maildir mikmod mmx motif mozilla mpeg mpeg4 mysql nas ncurses nls nptl
nvidia offensive oggvorbis openal opengl openssh pam pdflib perl png postgres
python qt quicktime readline samba sdl session slang sml2 speex spell sqlite ssl
svga tcltk tcpd tiff truetype usb v4l wmf x86 xine xinerama xml xml2 xmms xv
xvid yahoo zlib zvbi"
Comment 1 Jasmin Buchert 2005-03-05 23:44:00 UTC
I had the same problem 2 or 3 times now. xrestop showed ~254 clients (255 is the maximum I think). I had the feeling it has something to do with Mozilla or Firefox. So I restartet X and tried to reproduce it with Mozilla/Firefox but everything's okay so far...
Comment 2 Jonas Ådahl 2005-03-10 04:27:54 UTC
I can too reproduce this error, running gnome with firefox and several other programs.
Comment 3 John Nilsson 2005-03-31 11:03:16 UTC
I have this problem too.

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r4 i686)
=================================================================
System uname: 2.6.11-gentoo-r4 i686 AMD Athlon(TM) XP 1900+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Mar 19 2005, 10:02:44)]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -ftracer -funit-at-a-time -frename-registers -fweb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -ftracer -funit-at-a-time -frename-registers -fweb -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://ftp.du.se/pub/os/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="sv_SE.utf8"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X a52 aac alsa avi berkdb cdr crypt evo flac gdbm gif gnome gstreamer gtk gtk2 hal jikes jpeg mad mmx mono mozilla mpeg nptl oggvorbis opengl png python spell sse ssl svg threads tiff truetype unicode xml2 xv zlib linguas_en"Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
Comment 4 John Nilsson 2005-03-31 11:04:15 UTC
Created attachment 54950 [details]
xrestop -b
Comment 5 John Nilsson 2005-03-31 11:05:15 UTC
Created attachment 54951 [details]
xwininfo -root -children -all
Comment 6 John Nilsson 2005-03-31 11:06:18 UTC
What can I do to diagnose this problem?
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2005-03-31 11:47:09 UTC
You may wish to file this upstream at bugs.freedesktop.org.
Comment 8 John Nilsson 2005-04-02 03:08:43 UTC
1.Start a few X programs such as Firefox, Thunderbird.
2. (Unknown step)
3.Start another X program, such as xmms.


I'm not running Firefox or Thunderbird and unknown step seems to be "leave computer on for a few days".

I do run thins:
john@newkid ~ $ ps -U john -u john u
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
john      7747  0.0  0.4   3908  2148 ?        Ss   Mar27   1:52 /usr/sbin/famd -T 0 -c /etc/fam.conf
john      8882  0.0  0.1   3124   872 ?        Ss   Mar27   0:00 ssh-agent
john     10722  0.0  1.8  20600  9468 ?        Ss   Mar31   0:01 gnome-session
john     10783  0.0  0.1   2632   752 ?        S    Mar31   0:00 /usr/bin/dbus-launch --sh-syntax --exit-with-session
john     10784  0.0  0.2   3424  1248 ?        Ss   Mar31   0:00 dbus-daemon-1 --fork --print-pid 8 --print-address 6 --session
john     10788  0.0  1.8  11892  9396 ?        S    Mar31   0:01 /usr/libexec/gconfd-2 5
john     10791  0.0  0.1   2416   992 ?        S    Mar31   0:00 /usr/bin/gnome-keyring-daemon
john     10793  0.0  0.6   6520  3164 ?        Ss   Mar31   0:00 /usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=19
john     10795  0.0  1.7  21900  9060 ?        S    Mar31   0:03 /usr/libexec/gnome-settings-daemon --oaf-activate-iid=OAFIID:GNOME_SettingsDaemon --oaf-ior-john     10804  0.0  0.3   3952  2052 ?        S    Mar31   0:02 xscreensaver -nosplash
john     10815  0.0  0.6  10512  3100 ?        Ss   Mar31   0:01 gnome-smproxy --sm-client-id default0
john     10821  0.0  1.4  13344  7688 ?        Ss   Mar31   0:08 /usr/bin/metacity --sm-client-id=default1
john     10834  0.0  2.5  31452 12948 ?        Ssl  Mar31   0:03 gnome-panel --sm-client-id default2
john     10836  0.0  3.6  41416 18752 ?        Ssl  Mar31   0:02 nautilus --no-default-window --sm-client-id default3
john     10840  0.0  0.8  18836  4248 ?        Sl   Mar31   0:00 /usr/libexec/gnome-vfs-daemon --oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Factory --oaf-ior-fjohn     10842  0.0  2.0  21372 10820 ?        S    Mar31   0:08 /usr/libexec/wnck-applet --oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-fd=30
john     10844  0.0  1.6  29448  8576 ?        Sl   Mar31   0:00 /usr/libexec/trashapplet --oaf-activate-iid=OAFIID:GNOME_Panel_TrashApplet_Factory --oaf-iorjohn     10858  0.0  0.1   2328   768 ?        S    Mar31   0:00 /usr/libexec/mapping-daemon
john     10861  0.0  2.1  21076 10992 ?        S    Mar31   0:00 /usr/libexec/gdict-applet --oaf-activate-iid=OAFIID:GNOME_GDictApplet_Factory --oaf-ior-fd=2john     10863  0.0  1.7  19720  9216 ?        S    Mar31   0:00 /usr/libexec/mini_commander_applet --oaf-activate-iid=OAFIID:GNOME_MiniCommanderApplet_Factojohn     10867  0.0  1.8  20136  9760 ?        S    Mar31   0:00 /usr/libexec/notification-area-applet --oaf-activate-iid=OAFIID:GNOME_NotificationAreaAppletjohn     10873  0.0  2.3  55740 12020 ?        Sl   Mar31   0:02 /usr/libexec/clock-applet --oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf-ior-fd=3john     10875  0.0  1.7  19368  8808 ?        S    Mar31   2:12 /usr/libexec/multiload-applet-2 --oaf-activate-iid=OAFIID:GNOME_MultiLoadApplet_Factory --oajohn     10909  0.0  0.6  19228  3312 ?        Ss   Mar31   0:04 mono --debug /usr/lib/tomboy/Tomboy.exe
john     10940  0.0  4.2  60996 22188 ?        Sl   Mar31   0:08 mono --debug /usr/lib/tomboy/Tomboy.exe --tray-icon
john     10945  0.0  3.7  37924 19172 ?        Sl   Mar31   0:59 gaim
john     10960  0.0  1.5  75908  8240 ?        Sl   Mar31   0:00 /usr/libexec/evolution-data-server-1.2 --oaf-activate-iid=OAFIID:GNOME_Evolution_DataServer_john     10970  0.0  1.9  79428 10064 ?        Sl   Mar31   0:00 /usr/libexec/evolution/2.2/evolution-alarm-notify --oaf-activate-iid=OAFIID:GNOME_Evolution_john     11147  0.0  3.3  37164 17308 ?        Rl   Mar31   0:08 gnome-terminal
john     11148  0.0  0.1   2340   688 ?        S    Mar31   0:00 gnome-pty-helper
john     11149  0.0  0.4   4384  2148 pts/0    Ss   Mar31   0:00 bash
john     11167  0.0  0.5   7164  2764 ?        S    Mar31   0:00 /usr/X11R6/bin/Xnest :20 -audit 0 -name Xnest -auth /tmp/.gdmPxnvzA -nolisten tcp -fp unix/:john     11213  0.0  0.5   5736  2628 ?        Ss   Mar31   0:00 /usr/bin/xterm -geometry 80x24-0-0
john     11224  0.0  0.3   3284  1920 pts/1    Ss+  Mar31   0:00 bash
john     11486  0.0  0.4   4384  2132 pts/2    Ss   Mar31   0:00 bash
john     11520  0.0  0.3   3460  1768 pts/2    S+   Mar31   0:00 ssh mythtv@minibox
john     25362  2.4  6.5 101892 33656 ?        Sl   12:51   0:16 epiphany
john     25367  0.0  0.0      0     0 ?        Z    12:51   0:00 [netstat] <defunct>
john     25428  0.0  0.1   2836   980 pts/0    R+   13:02   0:00 ps -U john -u john u

Xnest with xterm and bash doesnt leak (xrestop only shows 3 resources on that server)
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2005-04-03 20:56:54 UTC
I think I said, file it upstream, not, comment more on this. Nothing's going to happen on this bug unless you do it yourself, as long as it's a Gentoo bug and not an upstream one.
Comment 10 John Nilsson 2005-04-07 03:58:02 UTC
At this point, we don't know if it's a gentoo specific bug or not, and as other here had the same problem I was hoping to get som info to compare with.

If I then manage to track down the bug I could file it upstream.
Comment 11 John Nilsson 2005-04-07 04:07:03 UTC
Ok, done.
https://bugs.freedesktop.org/show_bug.cgi?id=2920
Comment 12 Joshua Baergen (RETIRED) gentoo-dev 2005-04-07 12:43:07 UTC
Thanks :)
Comment 13 Sebastian Biallas 2005-04-12 19:01:20 UTC
Is it possible that this is a Mozilla/Firefox issue? I have the very same problem and it happens always while browsing)

(see https://bugzilla.mozilla.org/show_bug.cgi?id=179369 for a older reference)
Comment 14 Garrison 2005-10-02 10:50:13 UTC
Apparently the upstream author is trying to kick this back down

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=325689

Maybe it's fixed in 2.6.5?
Comment 15 Joshua Baergen (RETIRED) gentoo-dev 2005-10-08 22:25:09 UTC
Updating URL to reflect that we're now tracking there.

Activity seems to indicate it's an xloadimage problem; re-assigning.
Comment 16 Joshua Baergen (RETIRED) gentoo-dev 2005-10-08 22:26:19 UTC
desktop-misc, I'll leave re-naming and status of bug up to you, if you so desire.
Comment 17 Krzysztof Pawlik (RETIRED) gentoo-dev 2005-10-30 09:47:43 UTC
Created attachment 71741 [details, diff]
xloadimage.4.1.resource.patch

With this patch applied I couldn't see the leak, but it requires more testing.
Comment 18 Krzysztof Pawlik (RETIRED) gentoo-dev 2005-11-10 13:52:02 UTC
Daniel - could You test the patch?
Comment 19 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-01-04 14:50:46 UTC
Waiting for test.
Comment 20 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-01-04 15:00:35 UTC
Created attachment 76190 [details, diff]
xloadimage-4.1.resource.patch

Corrected patch.