vagalume spins in gtk_events_pending

Bug #827813 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vagalume (Ubuntu)
New
Undecided
Unassigned

Bug Description

I started up Vagalume for the first time and observed that it's using a lot of cpu while idle.

strace shows:

poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"5\30\4\0\22!\320\4\3\0\300\4\202\0y\0007\0\7\0\23!\320\4\22!\320\4\0\5\1\0"..., 240}, {NULL, 0}, {"", 0}], 3) = 240
read(3, 0xd64914, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(3, 0xd64914, 4096) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=18, events=POLLIN}], 5, 0) = 0 (Timeout)
read(3, 0xd64914, 4096) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=18, events=POLLIN}], 5, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
^Cwritev(3, [{"5\30\4\0\25!\320\4\3\0\300\4\202\0y\0007\0\7\0\26!\320\4\25!\320\4\0\5\1\0"..., 240}, {NULL, 0}, {"", 0}], 3 <unfinished ...>

and ltrace shows

gtk_main_iteration(1, 0, 0x7f88de3f8d50, 0, 0xd39fd0) = 0
gtk_events_pending(0x140a4a0, 0, 0xe418b0, 1, 0xd39fd0) = 1
gtk_main_iteration(1, 0, 0x7f88de3f8d50, 0, 0xd39fd0) = 0
gtk_events_pending(0x140a4a0, 0, 0xe418b0, 1, 0xd39fd0) = 1
gtk_main_iteration(1, 0, 0x7f88de3f8d50, 0, 0xd39fd0) = 0
gtk_events_pending(0x140a4a0, 0, 0xe418b0, 1, 0xd39fd0) = 1
gtk_main_iteration(1, 0, 0x7f88de3f8d50, 0, 0xd39fd0^C <unfinished ...>

continuously

gdb shows

(gdb) thread apply all bt full

Thread 7 (Thread 0x7fffcdb36700 (LWP 12178)):
#0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:216
No locals.
#1 0x00007ffff593c4d5 in g_cond_timed_wait_posix_impl (cond=<optimized out>, entered_mutex=<optimized out>, abs_time=<optimized out>) at /build/buildd/glib2.0-2.29.16/./gthread/gthread-posix.c:242
        result = <optimized out>
        end_time = {tv_sec = 1313561553, tv_nsec = 390345000}
        timed_out = <optimized out>
        __PRETTY_FUNCTION__ = "g_cond_timed_wait_posix_impl"
#2 0x00007ffff565c48f in g_async_queue_pop_intern_unlocked (queue=0x73c7f0, try=0, end_time=0x7fffcdb35c10) at /build/buildd/glib2.0-2.29.16/./glib/gasyncqueue.c:415
        retval = <optimized out>
        __PRETTY_FUNCTION__ = "g_async_queue_pop_intern_unlocked"
#3 0x00007ffff565cce1 in g_async_queue_timed_pop (queue=0x73c7f0, end_time=<optimized out>) at /build/buildd/glib2.0-2.29.16/./glib/gasyncqueue.c:536
        retval = <optimized out>
        __PRETTY_FUNCTION__ = "g_async_queue_timed_pop"
#4 0x00007ffff56afde7 in g_thread_pool_wait_for_new_pool () at /build/buildd/glib2.0-2.29.16/./glib/gthreadpool.c:175
        end_time = {tv_sec = 1313561553, tv_usec = 390345}
        pool = <optimized out>
        local_max_idle_time = 15000
        local_wakeup_thread_serial = <optimized out>
        local_max_unused_threads = 2
        last_wakeup_thread_serial = 0
        have_relayed_thread_marker = 0
#5 g_thread_pool_thread_proxy (data=<optimized out>) at /build/buildd/glib2.0-2.29.16/./glib/gthreadpool.c:378
        free_pool = <optimized out>
        task = 0x2
        pool = <optimized out>
#6 0x00007ffff56ad9a6 in g_thread_create_proxy (data=0xba9b30) at /build/buildd/glib2.0-2.29.16/./glib/gthread.c:1962
        thread = 0xba9b30
        __PRETTY_FUNCTION__ = "g_thread_create_proxy"
#7 0x00007ffff6c19edc in start_thread (arg=0x7fffcdb36700) at pthread_create.c:304
        __res = <optimized out>
        pd = 0x7fffcdb36700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {1, -7665489024412343017, 140737488345984, 140736644475328, 0, 3, 7665457786131522839, 7665509040062670103}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
        robust = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#8 0x00007ffff538589d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#9 0x0000000000000000 in ?? ()
No symbol table info available.

Thread 5 (Thread 0x7fffd2338700 (LWP 12176)):
#0 0x00007ffff5379773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
        resultvar = <optimized out>
        oldtype = 0
        result = <optimized out>
#1 0x00007fffd7765d4f in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
No symbol table info available.
#2 0x00007fffd775717c in pa_mainloop_poll () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
No symbol table info available.
#3 0x00007fffd77577e9 in pa_mainloop_iterate () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
No symbol table info available.
#4 0x00007fffd77578a0 in pa_mainloop_run () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
No symbol table info available.
#5 0x00007fffd7765cff in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0
No symbol table info available.
#6 0x00007fffd7518db8 in ?? () from /usr/lib/x86_64-linux-gnu/libpulsecommon-0.99.so
No symbol table info available.
#7 0x00007ffff6c19edc in start_thread (arg=0x7fffd2338700) at pthread_create.c:304
        __res = <optimized out>
        pd = 0x7fffd2338700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {1, -7665489024412343017, 140737333312512, 140736719980992, 0, 3, 7665428100391314711, 7665509040062670103}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
        robust = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#8 0x00007ffff538589d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#9 0x0000000000000000 in ?? ()
No symbol table info available.

Thread 4 (Thread 0x7fffd8aa2700 (LWP 12175)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
No locals.
#1 0x0000000000412590 in rsp_scrobbler_thread (data=<optimized out>) at scrobbler.c:373
        track = <optimized out>
#2 0x00007ffff56ad9a6 in g_thread_create_proxy (data=0x840610) at /build/buildd/glib2.0-2.29.16/./glib/gthread.c:1962
        thread = 0x840610
        __PRETTY_FUNCTION__ = "g_thread_create_proxy"
#3 0x00007ffff6c19edc in start_thread (arg=0x7fffd8aa2700) at pthread_create.c:304
        __res = <optimized out>
        pd = 0x7fffd8aa2700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {1, -7665489024412343017, 140737488347936, 140736828418496, 0, 3, 7665415792088786199, 7665509040062670103}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
        robust = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#4 0x00007ffff538589d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#5 0x0000000000000000 in ?? ()
No symbol table info available.

Thread 3 (Thread 0x7fffe5b60700 (LWP 12173)):
#0 0x00007ffff5379773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
        resultvar = <optimized out>
        oldtype = 0
        result = <optimized out>
#1 0x00007ffff5688408 in g_main_context_poll (n_fds=3, fds=0x6b9750, timeout=-1, context=0x6f9310, priority=<optimized out>) at /build/buildd/glib2.0-2.29.16/./glib/gmain.c:3399
        poll_func = 0x7ffff56969b0 <g_poll>
#2 g_main_context_iterate (context=0x6f9310, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.29.16/./glib/gmain.c:3081
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 3
        allocated_nfds = <optimized out>
        fds = 0x6b9750
#3 0x00007ffff5688c32 in g_main_loop_run (loop=0x6b9770) at /build/buildd/glib2.0-2.29.16/./glib/gmain.c:3294
        __PRETTY_FUNCTION__ = "g_main_loop_run"
#4 0x00007ffff2d45bd6 in gdbus_shared_thread_func (user_data=<optimized out>) at /build/buildd/glib2.0-2.29.16/./gio/gdbusprivate.c:276
        data = 0x6b9790
#5 0x00007ffff56ad9a6 in g_thread_create_proxy (data=0x6f9400) at /build/buildd/glib2.0-2.29.16/./glib/gthread.c:1962
        thread = 0x6f9400
        __PRETTY_FUNCTION__ = "g_thread_create_proxy"
#6 0x00007ffff6c19edc in start_thread (arg=0x7fffe5b60700) at pthread_create.c:304
        __res = <optimized out>
        pd = 0x7fffe5b60700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {1, -7665489024412343017, 140737055689152, 140737047300544, 0, 3, 7665545700890846487, 7665509040062670103}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
        robust = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#7 0x00007ffff538589d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#8 0x0000000000000000 in ?? ()
No symbol table info available.

Thread 2 (Thread 0x7fffe6361700 (LWP 12172)):
#0 0x00007ffff5379773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
        resultvar = <optimized out>
        oldtype = 0
        result = <optimized out>
#1 0x00007fffd809127a in ?? () from /usr/lib/gstreamer-0.10/libgstalsa.so
No symbol table info available.
#2 0x00007ffff6170064 in ?? () from /usr/lib/libgstreamer-0.10.so.0
No symbol table info available.
#3 0x00007ffff56afec8 in g_thread_pool_thread_proxy (data=<optimized out>) at /build/buildd/glib2.0-2.29.16/./glib/gthreadpool.c:319
        task = 0x736010
        pool = 0x843130
#4 0x00007ffff56ad9a6 in g_thread_create_proxy (data=0x73c5e0) at /build/buildd/glib2.0-2.29.16/./glib/gthread.c:1962
        thread = 0x73c5e0
        __PRETTY_FUNCTION__ = "g_thread_create_proxy"
#5 0x00007ffff6c19edc in start_thread (arg=0x7fffe6361700) at pthread_create.c:304
        __res = <optimized out>
        pd = 0x7fffe6361700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {1, -7665489024412343017, 140737488343440, 140737055693248, 0, 3, 7665542407187801367, 7665509040062670103}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
        robust = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#6 0x00007ffff538589d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
#7 0x0000000000000000 in ?? ()
No symbol table info available.

Thread 1 (Thread 0x7ffff7fb0960 (LWP 12164)):
#0 0x00007ffff56a3dd4 in allocator_get_magazine_threshold (ix=2, allocator=<optimized out>) at /build/buildd/glib2.0-2.29.16/./glib/gslice.c:535
        chunk_size = 48
        threshold = <optimized out>
        contention_counter = <optimized out>
#1 thread_memory_magazine2_is_full (ix=2, tmem=<optimized out>) at /build/buildd/glib2.0-2.29.16/./glib/gslice.c:787
No locals.
#2 g_slice_free1 (mem_size=<optimized out>, mem_block=0xbbb430) at /build/buildd/glib2.0-2.29.16/./glib/gslice.c:885
        _g_boolean_var_ = <optimized out>
        tmem = 0x6317d0
        ix = 2
        chunk_size = 48
        acat = 6494160
#3 0x00007ffff72db5df in _gdk_window_process_updates_recurse (window=0x672360, expose_region=0xbcff60) at /build/buildd/gtk+2.0-2.24.5/gdk/gdkwindow.c:5409
        private = 0x672360
        child = 0x672480
        child_region = 0xbbb430
        r = {x = 484, y = 234, width = 16, height = 16}
        l = 0xbc7500
        children = 0xbc7500
#4 0x00007ffff72d6633 in gdk_window_process_updates_internal (window=0x672360) at /build/buildd/gtk+2.0-2.24.5/gdk/gdkwindow.c:5588
        expose_region = 0xbcff60
        update_area = 0xbcac60
        private = 0x672360
        impl_iface = <optimized out>
        save_region = 0
        clip_box = {x = 2, y = 41, width = 130, height = 121}
#5 0x00007ffff72d87d1 in IA__gdk_window_process_all_updates () at /build/buildd/gtk+2.0-2.24.5/gdk/gdkwindow.c:5696
        private = 0x672360
        old_update_windows = 0x73c240
        tmp_list = 0x73c240
        in_process_all_updates = 1
        got_recursive_update = 0
#6 0x00007ffff72d8839 in gdk_window_update_idle (data=<optimized out>) at /build/buildd/gtk+2.0-2.24.5/gdk/gdkwindow.c:5322
No locals.
#7 0x00007ffff72b5d26 in gdk_threads_dispatch (data=0xbb9e00) at /build/buildd/gtk+2.0-2.24.5/gdk/gdk.c:512
        dispatch = 0xbb9e00
        ret = 0
#8 0x00007ffff5687efd in g_main_dispatch (context=0x675890) at /build/buildd/glib2.0-2.29.16/./glib/gmain.c:2439
        dispatch = 0x7ffff5683c50 <g_idle_dispatch>
        was_in_call = 0
        user_data = 0xbb9e00
        callback = 0x7ffff72b5cd0 <gdk_threads_dispatch>
        cb_funcs = 0x7ffff5938670
        cb_data = 0xbc6c00
        current_source_link = {data = 0xbd1280, next = 0x0}
        need_destroy = <optimized out>
        source = 0xbd1280
        current = 0x739890
        i = <optimized out>
#9 g_main_context_dispatch (context=0x675890) at /build/buildd/glib2.0-2.29.16/./glib/gmain.c:3008
No locals.
#10 0x00007ffff56886f8 in g_main_context_iterate (context=0x675890, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.29.16/./glib/gmain.c:3086
        max_priority = 120
        timeout = 0
        some_ready = 1
        nfds = 5
        allocated_nfds = <optimized out>
        fds = <optimized out>
#11 0x00007ffff5688c32 in g_main_loop_run (loop=0xba7420) at /build/buildd/glib2.0-2.29.16/./glib/gmain.c:3294
        __PRETTY_FUNCTION__ = "g_main_loop_run"
#12 0x00007ffff767edd7 in IA__gtk_main () at /build/buildd/gtk+2.0-2.24.5/gtk/gtkmain.c:1259
        tmp_list = <optimized out>
        functions = 0x0
        init = <optimized out>
        loop = 0xba7420
#13 0x000000000040d4b0 in controller_run_app (radio_url=0x0) at controller.c:1935
        __PRETTY_FUNCTION__ = "controller_run_app"
        errmsg = 0x0
#14 0x000000000040939b in main (argc=1, argv=0x7fffffffe568) at main.c:128
        radio = 0x0
        opt = <optimized out>

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: vagalume 0.8.5-1
ProcVersionSignature: Ubuntu 3.0.0-8.11-generic 3.0.1
Uname: Linux 3.0.0-8-generic x86_64
Architecture: amd64
Date: Wed Aug 17 16:06:13 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/vagalume
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_AU.UTF-8
 SHELL=/bin/zsh
SourcePackage: vagalume
UpgradeStatus: Upgraded to oneiric on 2011-08-13 (3 days ago)

Revision history for this message
Martin Pool (mbp) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.