#860 Geany hogs CPU while idle

closed-invalid
nobody
General (289)
5
2012-08-23
2012-05-18
machinegodzilla
No

Geany 0.21, en_US.UTF-8
GTK 2.24.8, GLib 2.30.2
Linux 3.3.0-4.fc16.x86_64 GNU/Linux

Geany hogs CPU while idle.

This happens to me all the time, I edit a file, move to another task while keeping Geany running, and after a while my system monitor starts showing 50% usage on both cores.

It's hard to reproduce but I found one case causing similar behaviour. Open Geany, go to Edit -> Preferences and stay there. Sometimes instantaneously, sometimes after a while Geany will hog the processor forever.

Below is a fragment of log taken with top (9th column is CPU usage). Around 0:05.57 I opened the Preferences and stayed there until 0:29.59, then around 0:31.80 I repeated the process and Geany has kept busy since then.

8608 user 20 0 842m 26m 13m S 0.0 0.2 0:00.42 geany
8608 user 20 0 842m 27m 13m S 2.0 0.2 0:00.48 geany
8608 user 20 0 842m 27m 13m S 7.0 0.2 0:00.69 geany
8608 user 20 0 843m 27m 13m S 3.0 0.2 0:00.78 geany
8608 user 20 0 843m 28m 13m S 2.7 0.2 0:00.86 geany
8608 user 20 0 843m 28m 13m S 5.7 0.2 0:01.03 geany
8608 user 20 0 843m 28m 13m S 3.7 0.2 0:01.14 geany
8608 user 20 0 846m 30m 14m S 17.6 0.3 0:01.67 geany
8608 user 20 0 846m 30m 14m S 47.6 0.3 0:03.10 geany
8608 user 20 0 846m 30m 14m S 13.0 0.3 0:03.49 geany
8608 user 20 0 846m 30m 14m S 0.3 0.3 0:03.50 geany
8608 user 20 0 846m 30m 14m S 2.0 0.3 0:03.56 geany
8608 user 20 0 846m 30m 14m S 0.0 0.3 0:03.56 geany
8608 user 20 0 846m 30m 14m S 0.0 0.3 0:03.56 geany
8608 user 20 0 846m 30m 14m S 4.0 0.3 0:03.68 geany
8608 user 20 0 846m 30m 14m S 0.0 0.3 0:03.68 geany
8608 user 20 0 846m 31m 14m S 8.7 0.3 0:03.94 geany
8608 user 20 0 847m 31m 14m S 8.0 0.3 0:04.18 geany
8608 user 20 0 847m 31m 14m S 5.7 0.3 0:04.35 geany
8608 user 20 0 847m 31m 14m S 40.6 0.3 0:05.57 geany
8608 user 20 0 847m 31m 14m S 46.9 0.3 0:06.98 geany
8608 user 20 0 847m 31m 14m R 47.7 0.3 0:08.41 geany
8608 user 20 0 847m 31m 14m S 47.3 0.3 0:09.83 geany
8608 user 20 0 847m 31m 14m S 47.3 0.3 0:11.25 geany
8608 user 20 0 847m 31m 14m S 47.6 0.3 0:12.68 geany
8608 user 20 0 847m 31m 14m R 47.3 0.3 0:14.10 geany
8608 user 20 0 847m 31m 14m R 47.3 0.3 0:15.52 geany
8608 user 20 0 847m 31m 14m R 46.6 0.3 0:16.92 geany
8608 user 20 0 847m 31m 14m S 46.6 0.3 0:18.32 geany
8608 user 20 0 847m 31m 14m S 45.6 0.3 0:19.69 geany
8608 user 20 0 847m 31m 14m S 47.3 0.3 0:21.11 geany
8608 user 20 0 847m 31m 14m R 47.6 0.3 0:22.54 geany
8608 user 20 0 847m 31m 14m R 46.0 0.3 0:23.92 geany
8608 user 20 0 847m 31m 14m S 47.6 0.3 0:25.35 geany
8608 user 20 0 847m 31m 14m R 47.0 0.3 0:26.76 geany
8608 user 20 0 847m 31m 14m S 47.3 0.3 0:28.18 geany
8608 user 20 0 847m 31m 14m S 47.0 0.3 0:29.59 geany
8608 user 20 0 847m 31m 14m S 6.3 0.3 0:29.78 geany
8608 user 20 0 847m 31m 14m S 2.0 0.3 0:29.84 geany
8608 user 20 0 847m 31m 14m S 0.0 0.3 0:29.84 geany
8608 user 20 0 847m 31m 14m S 0.0 0.3 0:29.84 geany
8608 user 20 0 847m 31m 14m S 1.3 0.3 0:29.88 geany
8608 user 20 0 847m 31m 14m S 3.7 0.3 0:29.99 geany
8608 user 20 0 848m 32m 14m R 13.7 0.3 0:30.40 geany
8608 user 20 0 848m 32m 14m S 46.6 0.3 0:31.80 geany
8608 user 20 0 848m 32m 14m R 43.6 0.3 0:33.11 geany
8608 user 20 0 848m 32m 14m R 46.9 0.3 0:34.52 geany
8608 user 20 0 848m 32m 14m S 48.6 0.3 0:35.98 geany
8608 user 20 0 848m 32m 14m R 48.6 0.3 0:37.44 geany
8608 user 20 0 848m 32m 14m R 48.3 0.3 0:38.89 geany
8608 user 20 0 848m 32m 14m R 48.3 0.3 0:40.34 geany
8608 user 20 0 848m 32m 14m R 48.3 0.3 0:41.79 geany
8608 user 20 0 848m 32m 14m R 44.0 0.3 0:43.11 geany
8608 user 20 0 848m 32m 14m S 48.0 0.3 0:44.55 geany
8608 user 20 0 848m 32m 14m S 48.6 0.3 0:46.01 geany
8608 user 20 0 848m 32m 14m S 48.7 0.3 0:47.47 geany
8608 user 20 0 848m 32m 14m R 48.3 0.3 0:48.92 geany
8608 user 20 0 848m 32m 14m R 48.6 0.3 0:50.38 geany
8608 user 20 0 848m 32m 14m S 47.9 0.3 0:51.82 geany

Discussion

1 2 > >> (Page 1 of 2)
  • Lex Trotman
    Lex Trotman
    2012-05-19

    Can't reproduce on current Git version Gtk 2.24.10 Glib 2.30.2.

    Can you try the current Git version?

     
  • I don't know which one is considered the current version.

    Tried with:

    - Geany 0.19, GTK+ 2.24.8, GLib 2.30.3 (en_US.UTF-8) (https://sourceforge.net/projects/geany/files/geany/0.19/), and
    - Geany 0.20.1, en_US.UTF-8, GTK 2.24.8, GLib 2.30.3, GIO (https://github.com/geany/geany/tree/0.20)

    and it is the same in both cases.

    As I said before, there doesn't seem to be a single way to reproduce but usually one of these does the trick:

    - go to Edit -> Preferences, stay there and wait
    - go to Edit -> Preferences and click on some tab
    - go to Edit -> Preferences, click on some tabs, and close the window

     
  • Current version is 1.22., and it can be found on Geany's website: http://www.geany.org/Download (or on GitHub at https://github.com/geany/geany/tree/1.22.0\). The development version source code as well as nightly builds can be get from http://www.geany.org/Download/Git too.

    However it seems that others are suffering from the same issue even with the latest version (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682153, https://bugzilla.novell.com/show_bug.cgi?id=767966\).

    Could you please try to run Geany inside a debugger (e.g. gdb), pause Geany when it uses too much CPU (^C from gdb console) and get a backtrace (bt from gdb console)? This might help a little tracking the issue down it you can break at the correct time (a bit of luck could be required). Another better technique (but that needs a rebuild) might be to build Geany with profiling support (-pg) and then send us the generated gprof profile (http://www.cs.utah.edu/dept/old/texinfo/as/gprof.html)

     
  • Matthew Brush
    Matthew Brush
    2012-07-27

    @machinegodzilla can you say what GTK+ theme you are using (or better yet try to reproduce with another (basic) GTK+ theme)? I've had problems with CPU being pegged by the GTK+ theme(-engine), I'm wondering if this might be the difference between the people who can and can not reproduce this. I left Geany 0.20 running all day today with the preferences dialog open and the CPU% stayed between 0% and 1% depending if I was clicking stuff in it or not.

     
  • Boris Hollas
    Boris Hollas
    2012-08-04

    I have the same problem with geany-1.22 on Debian wheezy (reported here:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682153&archived=False&mbox=no\)

    No plugins are installed, the default config has not been changed. I use libgtk2.0-0.

    Right now, geany is running without a file loaded and all tabs are closed:

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1796 root 20 0 198m 29m 9500 S 56.2 1.6 35:10.30 Xorg
    19165 boris 20 0 379m 19m 13m S 46.6 1.0 0:04.84 geany

    This also happens with geany 0.22 on my system.

     
  • Boris Hollas
    Boris Hollas
    2012-08-04

    I have the same problem with geany-1.22 on Debian wheezy (reported here:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682153&archived=False&mbox=no\)

    No plugins are installed, the default config has not been changed. I use libgtk2.0-0.

    Right now, geany is running without a file loaded and all tabs are closed:

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1796 root 20 0 198m 29m 9500 S 56.2 1.6 35:10.30 Xorg
    19165 boris 20 0 379m 19m 13m S 46.6 1.0 0:04.84 geany

    This also happens with geany 0.22 on my system.

     
  • GTK+ theme? No idea. How can I check that?

    This time tried with Geany 1.22, en_US.UTF-8 GTK 2.24.8, GLib 2.30.3 for a change.

    Profile:

    http://www.mediafire.com/file/jjux3pg3hr44058/gmon.out

    Debug:

    > gdb ~/incoming/geany-git-1.22/src/geany GNU gdb (GDB) Fedora (7.3.50.20110722-13.fc16) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-redhat-linux-gnu".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /home/machinegodzilla/incoming/geany-git-1.22/src/geany...done.
    (gdb) run
    Starting program: /home/machinegodzilla/incoming/geany-git-1.22/src/geany
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib64/libthread_db.so.1".
    Detaching after fork from child process 28321.
    Detaching after fork from child process 28322.
    Detaching after fork from child process 28323.
    Detaching after fork from child process 28325.
    [New Thread 0x7fffe47b5700 (LWP 28326)]
    ^C
    Program received signal SIGINT, Interrupt.
    0x000000316aee85c3 in poll () from /lib64/libc.so.6
    Missing separate debuginfos, use: debuginfo-install glibc-2.14.90-24.fc16.6.x86_64 oxygen-gtk-1.1.6-1.fc16.x86_64 vte-0.28.2-2.fc16.x86_64
    (gdb) bt
    #0 0x000000316aee85c3 in poll () from /lib64/libc.so.6
    #1 0x000000316e608ba2 in _xcb_conn_wait (c=0x8697d0, cond=<optimized out>, vector=0x0, count=0x0) at xcb_conn.c:321
    #2 0x000000316e60a16f in xcb_wait_for_reply (c=0x8697d0, request=684408, e=0x7fffffffc0e8) at xcb_in.c:378
    #3 0x00000038c5a45ced in _XReply (dpy=0x868580, rep=0x7fffffffc140, extra=0, discard=0) at xcb_io.c:541
    #4 0x00000038c5a2a65b in XGetWindowProperty (dpy=0x868580, w=90177621, property=329, offset=0, length=9223372036854775807, delete=<optimized out>, req_type=4, actual_type=0x7fffffffc1f8, actual_format=
    0x7fffffffc21c, nitems=0x7fffffffc200, bytesafter=0x7fffffffc208, prop=0x7fffffffc210) at GetProp.c:61
    #5 0x00000034a2a77c35 in IA__gdk_window_get_type_hint (window=<optimized out>) at gdkwindow-x11.c:2109
    #6 0x00007ffff1395860 in Oxygen::Gtk::gdk_window_nobackground(_GdkDrawable*) () from /usr/lib64/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
    #7 0x00007ffff1406970 in ?? () from /usr/lib64/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
    #8 0x00000034a2492de9 in gtk_window_paint (widget=<optimized out>, area=<optimized out>) at gtkwindow.c:6625
    #9 0x00000034a2492e75 in gtk_window_expose (widget=0xa12440 [GtkWindow], event=0x7fffffffcc10) at gtkwindow.c:6634
    #10 0x00000034a234ed03 in _gtk_marshal_BOOLEAN__BOXED (closure=0x887a50, return_value=0x7fffffffc8b0, n_param_values=<optimized out>, param_values=0xd5b0c0, invocation_hint=<optimized out>,
    marshal_data=<optimized out>) at gtkmarshalers.c:86
    #11 0x000000386840ea44 in g_closure_invoke (closure=0x887a50, return_value=0x7fffffffc8b0, n_param_values=2, param_values=0xd5b0c0, invocation_hint=<optimized out>) at gclosure.c:774
    #12 0x0000003868420b7c in signal_emit_unlocked_R (node=<optimized out>, detail=0, instance=0xa12440, emission_return=0x7fffffffca10, instance_and_params=0xd5b0c0) at gsignal.c:3310
    #13 0x0000003868429f33 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=<optimized out>) at gsignal.c:3013
    #14 0x000000386842a302 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3060
    #15 0x00000034a2483f41 in gtk_widget_event_internal (widget=0xa12440 [GtkWindow], event=0x7fffffffcc10) at gtkwidget.c:4999
    #16 0x00000034a234ceb0 in IA__gtk_main_do_event (event=0x7fffffffcc10) at gtkmain.c:1609
    #17 0x00000034a2a45b94 in _gdk_window_process_updates_recurse (window=0x87f5a0 [GdkWindow], expose_region=0xd5aa70) at gdkwindow.c:5429
    #18 0x00000034a2a40733 in gdk_window_process_updates_internal (window=0x87f5a0 [GdkWindow]) at gdkwindow.c:5588
    #19 0x00000034a2a42a71 in IA__gdk_window_process_all_updates () at gdkwindow.c:5696
    #20 0x00000034a2a42ad9 in gdk_window_update_idle (data=<optimized out>) at gdkwindow.c:5322
    #21 0x00000034a2a1ea46 in gdk_threads_dispatch (data=0xd4c640) at gdk.c:512
    #22 0x0000003867c44f3d in g_main_dispatch (context=0x881a50) at gmain.c:2441
    #23 g_main_context_dispatch (context=0x881a50) at gmain.c:3011
    #24 0x0000003867c45738 in g_main_context_iterate (context=0x881a50, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3089
    #25 0x0000003867c45c85 in g_main_loop_run (loop=0x87ef40) at gmain.c:3297
    #26 0x00000034a234bbb7 in IA__gtk_main () at gtkmain.c:1256
    #27 0x0000000000448dbc in main (argc=1, argv=0x7fffffffd058) at main.c:1155
    (gdb) c
    Continuing.
    [Thread 0x7fffe47b5700 (LWP 28326) exited]
    [Inferior 1 (process 28318) exited normally]
    (gdb) q

     
  • frlan
    frlan
    2012-08-15

    Are you using oxygen theme?

     
  • I guess so. RPM search on my system gives the following results:

    oxygen-gtk-1.1.6-1.fc16.x86_64
    oxygen-icon-theme-4.8.4-1.fc16.noarch

     
  • Matthew Brush
    Matthew Brush
    2012-08-15

    Does the problem go away when you switch to another (non-buggy) theme/engine?

     
1 2 > >> (Page 1 of 2)