Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 287384 - x11-libs/libxcb-1.4-r1 infinite CPU-consuming loop on closing www-client/mozilla-firefox-3.5.3
Summary: x11-libs/libxcb-1.4-r1 infinite CPU-consuming loop on closing www-client/mozi...
Status: RESOLVED DUPLICATE of bug 277726
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-02 17:54 UTC by Jaak Ristioja
Modified: 2009-12-12 08:38 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaak Ristioja 2009-10-02 17:54:17 UTC
This prevents the firefox process from exiting and "uses all CPU".

(gdb) bt
#0  _xcb_out_send (c=0x7ff903690000, vector=0x7fff782cf980, count=0x7fff782cf97c) at xcb_out.c:337
#1  0x00007ff8fb78a375 in xcb_writev (c=0x7ff903690000, vector=0x7fff782cf9d0, count=3, requests=1) at xcb_out.c:286
#2  0x00007ff8ffc1c23e in _XSend (dpy=0x7ff90368f000, data=<value optimized out>, size=2) at xcb_io.c:332
#3  0x00007ff8ffc0a2d8 in XQueryExtension (dpy=0x7ff90368f000, name=0x7ff900111140 "RENDER", major_opcode=0x7fff782cfaa4, first_event=0x7fff782cfaa8,
    first_error=0x7fff782cfaac) at QuExt.c:50
#4  0x00007ff8ffbfeabf in XInitExtension (dpy=0x7ff903690018, name=0xffffffff <Address 0xffffffff out of bounds>) at InitExt.c:49
#5  0x00007ff8fff0f072 in XRenderFindDisplay (dpy=0x7ff90368f000) at Xrender.c:202
#6  0x00007ff8fff0cbfe in XRenderFreePicture (dpy=0x7ff903690018, picture=4294967295) at Picture.c:232
#7  0x00007ff8f5227624 in QX11PixmapData::release (this=0x7ff8e591f6d0) at image/qpixmap_x11.cpp:1206
#8  0x00007ff8f5227d37 in ~QX11PixmapData (this=0x7ff903690018) at image/qpixmap_x11.cpp:1182
#9  0x00007ff8f521a1fe in QPixmap::deref (this=0x7ff8e64044c0) at image/qpixmap.cpp:1322
#10 0x00007ff8f521c697 in ~QPixmap (this=0x7ff903690018) at image/qpixmap.cpp:332
#11 0x00007ff8f521ec33 in ~QDetachedPixmap (this=0x7ff903690018) at image/qpixmapcache.cpp:97
#12 0x00007ff8f521ec9f in ~QPMCache (this=0x7ff8ea5731f0) at src/corelib/tools/qcache.h:138
#13 0x00007ff8f521e935 in ~QGlobalStaticDeleter (this=0x7ff8f5a9b9a8) at src/corelib/global/qglobal.h:1628
#14 0x00007ff903a56a1d in *__GI_exit (status=0) at exit.c:75
#15 0x00007ff903a405cd in __libc_start_main (main=0x4022ce <mmap@plt+414>, argc=2, ubp_av=0x7fff782cfd08, init=0x411620, fini=<value optimized out>,
    rtld_fini=<value optimized out>, stack_end=0x7fff782cfcf8) at libc-start.c:258
#16 0x0000000000402169 in ?? ()
#17 0x00007fff782cfcf8 in ?? ()
#18 0x000000000000001c in ?? ()
#19 0x0000000000000002 in ?? ()
#20 0x00007fff782d14d7 in ?? ()
#21 0x00007fff782d14fa in ?? ()
#22 0x0000000000000000 in ?? ()
(gdb) f
#0  _xcb_out_send (c=0x7ff903690000, vector=0x7fff782cf980, count=0x7fff782cf97c) at xcb_out.c:337
337         while(ret && *count)
(gdb) s
338             ret = _xcb_conn_wait(c, &c->out.cond, vector, count);
(gdb) s
_xcb_conn_wait (c=0x7ff903690000, cond=0x7ff9036910d0, vector=0x7fff782cf980, count=0x7fff782cf97c) at xcb_conn.c:263
263     {
(gdb) s
272         if(count ? c->out.writing : c->in.reading)
(gdb) s
85        return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
(gdb) s
281         fd.events = POLLIN;
(gdb) s
286         ++c->in.reading;
(gdb) s
280         fd.fd = c->fd;
(gdb) s
289         if(count)
(gdb) s
291             fd.events |= POLLOUT;
(gdb) s
292             ++c->out.writing;
(gdb) s
303         pthread_mutex_unlock(&c->iolock);
(gdb) s
280         fd.fd = c->fd;
(gdb) s
303         pthread_mutex_unlock(&c->iolock);
(gdb) s
__pthread_mutex_unlock (mutex=0x7ff903690018) at pthread_mutex_unlock.c:268
268       return __pthread_mutex_unlock_usercnt (mutex, 1);
(gdb) fin
Run till exit from #0  __pthread_mutex_unlock (mutex=0x7ff903690018) at pthread_mutex_unlock.c:268
0x00007ff8fb789b42 in _xcb_conn_wait (c=0x7ff903690000, cond=<value optimized out>, vector=0x7fff782cf980, count=0x7fff782cf97c) at xcb_conn.c:303
303         pthread_mutex_unlock(&c->iolock);
Value returned is $18 = 22
(gdb) s
306         ret = poll(&fd, 1, -1);
(gdb) s
*__GI___poll (fds=0x7fff782cf8f0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:69
69      {
(gdb) fin
Run till exit from #0  *__GI___poll (fds=0x7fff782cf8f0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:69
0x00007ff8fb789b5a in _xcb_conn_wait (c=0x7ff903690000, cond=<value optimized out>, vector=0x7fff782cf980, count=0x7fff782cf97c) at xcb_conn.c:306
306         ret = poll(&fd, 1, -1);
Value returned is $19 = 1
(gdb) s
310         } while (ret == -1 && errno == EINTR);
(gdb) s
311         if (ret < 0)
(gdb) s
316         pthread_mutex_lock(&c->iolock);
(gdb) s
__pthread_mutex_lock (mutex=0x7ff903690018) at pthread_mutex_lock.c:43
43      {
(gdb) fin
Run till exit from #0  __pthread_mutex_lock (mutex=0x7ff903690018) at pthread_mutex_lock.c:43
_xcb_conn_wait (c=0x7ff903690000, cond=<value optimized out>, vector=0x7fff782cf980, count=0x7fff782cf97c) at xcb_conn.c:318
318         if(ret)
Value returned is $20 = 22
(gdb) s
321             if((fd.revents & POLLIN) == POLLIN)
(gdb) s
328             if((fd.revents & POLLOUT) == POLLOUT)
(gdb) s
335         if(count)
(gdb) s
336             --c->out.writing;
(gdb) s
337         --c->in.reading;
(gdb) s
340     }
(gdb) s
_xcb_out_send (c=0x7ff903690000, vector=0x7fff782cf980, count=0x7fff782cf97c) at xcb_out.c:337
337         while(ret && *count)


Portage 2.1.6.13 (default/linux/amd64/2008.0/developer, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.31-gentoo-r1-arm x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r1-arm-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8700_@_2.53GHz-with-gentoo-1.12.11.1
Timestamp of tree: Thu, 01 Oct 2009 18:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -msse4.1 -ggdb"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-O2 -pipe -march=core2 -msse4.1 -ggdb"
FEATURES="ccache collision-protect cvs distlocks fixpackages installsources multilib-strict parallel-fetch protect-owned sandbox sfperms sign splitdebug strict unmerge-orphans userfetch userpriv usersandbox usersync"
LDFLAGS="-Wl,-O1"
LINGUAS="en et et_EE"
MAKEOPTS="-j3"
USE="X a52 aac acl acpi alsa amd64 apache2 aspell berkdb bindist boost bzip2 cairo caps cdr cli consolekit cracklib crypt cups dbus directfb doc dri dts dvd dvdr dvdread eds emboss encode evo exif faac faad fam fbcon ffmpeg firefox flac fortran gdbm gif git glitz gmp gnuplot gnutls gpm gstreamer gtk hal hdri htmlhandbook iconv icu idn imagemagick ipv6 isdnlog jpeg kde kontact kpathsea laptop latex lcms libnotify lua lzo mad mailwrapper md5sum midi mikmod mmx mng modules mp3 mp4 mpeg mpi mudflap multilib mysql ncurses networkmanager nptl nptlonly ogg openal openexr opengl openmp pam pcre pdf perl phonon pic plasma png postgres ppds pppd python qt3support qt4 readline reflection schroedinger sdl semantic-desktop session smp snmp source spell spl sqlite sse sse2 ssl ssse3 startup-notification static subversion svg sysfs tcpd theora threads thunar tiff truetype ucs2 unicode usb vorbis webkit x264 xattr xcb xcomposite xetex xft xml xorg xprint xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en et et_EE" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" USERLAND="GNU" VIDEO_CARDS="fbdev intel vesa i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rémi Cardona (RETIRED) gentoo-dev 2009-10-03 08:03:46 UTC
Qt in firefox??? I think you're confusing things...
Comment 2 Jaak Ristioja 2009-10-03 13:02:56 UTC
(In reply to comment #1)
> Qt in firefox??? I think you're confusing things...
> 

No, I use x11-themes/gtk-engines-qt.
Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2009-10-03 21:56:26 UTC
Can you reproduce with a standard gtk theme?
Comment 4 Jaak Ristioja 2009-10-05 08:14:54 UTC
(In reply to comment #3)
> Can you reproduce with a standard gtk theme?
I won't try - would be too much trouble for me, given that the problem itself is quite certainly in libxcb and not in qt/gtk+/firefox.
Comment 5 Rémi Cardona (RETIRED) gentoo-dev 2009-10-05 09:27:41 UTC
Alright then, thanks for your cooperation.

Closing
Comment 6 Mart Raudsepp gentoo-dev 2009-10-05 09:43:14 UTC
except I can say with the same amount of certainty that the problem is in gtk-engines-qt because it happens in freeing a QPixmap...
Comment 7 Jaak Ristioja 2009-10-05 10:24:21 UTC
(In reply to comment #5)
> Alright then, thanks for your cooperation.
> 
> Closing
> 

Fine then! Please walk me through the process of how I can switch to a standard gtk theme.
Comment 8 Jaak Ristioja 2009-10-05 10:33:04 UTC
(In reply to comment #6)
> except I can say with the same amount of certainty that the problem is in
> gtk-engines-qt because it happens in freeing a QPixmap...
> 

I think the problem is in libxcb, which incidentally is used by Qt which is incidentally used by gtk-engines-qt, which in my case was used by firefox. This caused the bug to occur. I don't think that a bug in gtk-engines-qt can cause an infinite loop in libxcb. I find it more likely that the bug is in libxcb code, and the code on top of it (Qt, gtk-engines-qt, firefox) just happened to trigger it.
Comment 9 Rémi Cardona (RETIRED) gentoo-dev 2009-10-05 11:31:40 UTC
(In reply to comment #8)
> Fine then! Please walk me through the process of how I can switch to a standard
> gtk theme.

I have no idea how you configured that theme, _you_ were the one to set it up in the first place so you should be able to do this on your own.

And we know for a fact that gtk-engines-qt is a broken piece of code that only works when it wants to.

As for libxcb, indeed it has had bugs (and probably will have others) but it also helped find bugs in other libraries such as gtk, qt, openoffice and others.

So please reopen this bug once you've tested with a standard gtk theme.

Thanks
Comment 10 Jaak Ristioja 2009-10-05 11:48:52 UTC
(In reply to comment #9)
> So please reopen this bug once you've tested with a standard gtk theme.

When I commented out some lines in ~/.gtkrc-2.0 and ~/.gtkrc-2.0-kde4 which mentioned the qt theme, the bug did not occur, as was expected.
Comment 11 Rémi Cardona (RETIRED) gentoo-dev 2009-10-05 11:57:50 UTC
Probably a gtk-engines-qt bug then or maybe even a firefox bug. I doubt Qt would have issues, we'd probably have heard about it by now.

Thanks
Comment 12 Chris Ribble 2009-10-19 21:33:23 UTC
I am having the same problem after upgrading to mozilla-firefox-3.5.2-r3 (since it is now marked stable on amd64.

This is really annoying because every time I close firefox I have a whole CPU pegged to 100% usage.

I can confirm that the issue does not occur when I load firefox without gtk-engines-qt.

(In reply to comment #11)
> Probably a gtk-engines-qt bug then or maybe even a firefox bug. I doubt Qt
> would have issues, we'd probably have heard about it by now.
> 
> Thanks
> 

Comment 13 Michael Mair-Keimberger (iamnr3) 2009-10-25 10:41:25 UTC
I have the same issue since i've upgraded to the latest mozilla-firefox which is now stable. I've tried mozilla-firefox-3.5.3 too, but it happens also there.

As already mentioned, its really annoying ;)

I also can confirm that it doesn't happen when i load firefox without gtk-engines-qt.

(In reply to comment #12)
> I am having the same problem after upgrading to mozilla-firefox-3.5.2-r3 (since
> it is now marked stable on amd64.
> 
> This is really annoying because every time I close firefox I have a whole CPU
> pegged to 100% usage.
> 
> I can confirm that the issue does not occur when I load firefox without
> gtk-engines-qt.
> 
> (In reply to comment #11)
> > Probably a gtk-engines-qt bug then or maybe even a firefox bug. I doubt Qt
> > would have issues, we'd probably have heard about it by now.
> > 
> > Thanks
> > 
> 

Comment 14 Jaak Ristioja 2009-12-12 08:38:43 UTC
I'm still certain this is rather a bug in x11-libs/libxcb-1.4-r1 (see comment #8).

Btw, this also happens with thunderbird-3.0.

*** This bug has been marked as a duplicate of bug 277726 ***