After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588438 - awn uses 100% cpu with gtk+ 2.17.3 (csw)
awn uses 100% cpu with gtk+ 2.17.3 (csw)
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
csw
Depends on:
Blocks:
 
 
Reported: 2009-07-13 09:53 UTC by Sebastien Bacher
Modified: 2009-08-14 12:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
downstream bug-buddy stacktrace (13.20 KB, text/plain)
2009-07-20 17:19 UTC, Mark Lee
Details
Full backtrace (15.62 KB, text/plain)
2009-07-20 19:29 UTC, Michal Hruby
Details
callgrind profile file (516.39 KB, application/x-gzip)
2009-07-20 20:45 UTC, Michal Hruby
Details

Description Sebastien Bacher 2009-07-13 09:53:27 UTC
the bug has been opened on https://bugs.launchpad.net/bugs/398008

"when awn is opened, cpu usage raises to 100% which leave the system completly unoperable

a lot of errors in .xsession-errors:

(awn:20360): Gdk-CRITICAL **: gdk_region_destroy: assertion `region != NULL' failed

The same problem with the version from:

http://ppa.launchpad.net/awn-testing/ppa/ubuntu"

the issue is still there using gtk 2.17.4
Comment 1 Matthias Clasen 2009-07-20 04:54:26 UTC
It would be nice if you could get a stacktrace from where those assertions occur.
Comment 2 Mark Lee 2009-07-20 17:19:58 UTC
Created attachment 138832 [details]
downstream bug-buddy stacktrace

Here's a stacktrace (created via bug-buddy) from the downstream bug.
Comment 3 Matthias Clasen 2009-07-20 17:25:51 UTC


  • #11 ??
  • #12 ??

these two would be most helpful in figuring out where the problem lies...
any chance you can repeat that with awn debuginfo ?
Comment 4 Michal Hruby 2009-07-20 17:42:08 UTC
One of missing functions will be configure-event callback.
Comment 5 Michal Hruby 2009-07-20 19:29:42 UTC
Created attachment 138846 [details]
Full backtrace
Comment 6 Michal Hruby 2009-07-20 20:45:59 UTC
Created attachment 138853 [details]
callgrind profile file

I think this callgrind produced file can shed more light on the real issue - if you view it (using kcachegrind for example), you can see that most time is spent in gdk_cairo_set_source_pixbuf, which is called in somewhere in the expose-event callback, in fact the expose-event is called over 3400 times, but there was no reason for so many exposes - but please note that the widget which was being exposed has in the parent hierarchy a widget on which gdk_window_set_composited(widget, TRUE) was called, this is probably the reason of the never-ending exposes.
Comment 7 Alexander Larsson 2009-07-21 22:04:40 UTC
The critical errors are from bug 589275 (fixed).
Comment 8 Michal Hruby 2009-08-07 13:21:20 UTC
After additional testing the actual issue was identified - the never-ending redraws are caused by a gdk_window_raise() call inside expose-event callback.

This python script demonstrates it (works on in GTK versions prior to 2.17.3, 100% cpu in latest versions):

import gtk

win = gtk.Window()
label = gtk.Label("non-empty label")
win.add(label)

def expose_cb(widget, event):
  widget.window.raise_()
  return False

win.connect("expose-event", expose_cb)
win.show_all()
gtk.main()
Comment 9 Matthias Clasen 2009-08-07 13:26:49 UTC
I guess it should be clear that that is not a good idea...

Comment 10 Michal Hruby 2009-08-07 13:29:47 UTC
I agree, but it's still a regression.
Comment 11 Alexander Larsson 2009-08-10 13:47:20 UTC
Fixed in git master
Comment 12 Sebastien Bacher 2009-08-14 12:53:54 UTC
users have confirmed that the fix is working

Comment 13 Sebastien Bacher 2009-08-14 12:54:32 UTC
(using the 2.17.7 tarball version)
Comment 14 Sebastien Bacher 2009-08-14 12:57:58 UTC
the bug is fixed in git now