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"
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...
I can too reproduce this error, running gnome with firefox and several other programs.
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
Created attachment 54950 [details] xrestop -b
Created attachment 54951 [details] xwininfo -root -children -all
What can I do to diagnose this problem?
You may wish to file this upstream at bugs.freedesktop.org.
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)
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.
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.
Ok, done. https://bugs.freedesktop.org/show_bug.cgi?id=2920
Thanks :)
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)
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?
Updating URL to reflect that we're now tracking there. Activity seems to indicate it's an xloadimage problem; re-assigning.
desktop-misc, I'll leave re-naming and status of bug up to you, if you so desire.
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.
Daniel - could You test the patch?
Waiting for test.
Created attachment 76190 [details, diff] xloadimage-4.1.resource.patch Corrected patch.