On 27/09/2011 01:41, Adam Dingle wrote:
I think the best way to debug this is to figure out what Shotwell is
doing while consuming 100% CPU. In other words, we need a stack
trace. There are two ways you could get this. You could run Shotwell
under gdb, then press Ctrl+C during the 100% CPU loop and use the
'where' command to see where it was interrupted. Or you could install
the Sysprof profiler and gather profiling data as Shotwell runs; this
should also reveal the stack trace. In either case you'll want to
have debug symbols installed for important system libraries (GTK,
GLib). If you do this and report the trace to us, it may give insight
into what's going on. Otherwise, as Eric said, we really don't have
much to go on here.
I'm happy to give this a try but I might need some pointers.
Here's what I've tried with gdb. I installed it and ran it against
shotwell. I typed 'start' and 'continue', hitting Ctrl-C when it hung
around 100%CPU. I also gave sysprof a try but didn't know what to do
with the output. It created a 700K file when I saved it.
Here's the session from gdb:
Script started on Tue 27 Sep 2011 08:46:30 BST
[01;32mdougie@barra[01;34m ~ $[00m d[K
[01;32mdougie@barra[01;34m ~ $[00m gdb shotwell
GNU gdb (GDB) 7.2-debian
Copyright (C) 2010 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-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/shotwell...done.
(gdb) start
Temporary breakpoint 1 at 0x4862f0: file src/main.c, line 1658.
Starting program: /usr/local/bin/shotwell
[Thread debugging using libthread_db enabled]
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe8e8) at
src/main.c:1658
1658 int main (int argc, char ** argv) {
(gdb)
(gdb) continue
Continuing.
[New Thread 0x7fffddd18700 (LWP 2488)]
[New Thread 0x7fffdd517700 (LWP 2489)]
[New Thread 0x7fffdcd16700 (LWP 2490)]
[New Thread 0x7fffd7fff700 (LWP 2491)]
^C
Program received signal SIGINT, Interrupt.
0x00007ffff2dae298 in ?? () from /usr/lib/libcairo.so.2
(gdb) where
#0 0x00007ffff2dae298 in ?? () from /usr/lib/libcairo.so.2
#1 0x00007ffff2d9336f in cairo_line_to () from /usr/lib/libcairo.so.2
#2 0x00007fffe7f64edc in ?? ()
from /usr/lib/gtk-2.0/2.10.0/engines/libaurora.so
#3 0x00007fffe7f59a32 in ?? ()
from /usr/lib/gtk-2.0/2.10.0/engines/libaurora.so
#4 0x00007ffff41d0bde in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#5 0x00007ffff4312b78 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#6 0x00007ffff20eee7e in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#7 0x00007ffff210009c in ?? () from /usr/lib/libgobject-2.0.so.0
#8 0x00007ffff2109d05 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#9 0x00007ffff2109ed3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff42b8b9e in gtk_widget_realize ()
from /usr/lib/libgtk-x11-2.0.so.0
#11 0x00007ffff42b92d8 in gtk_widget_map () from
/usr/lib/libgtk-x11-2.0.so.0
#12 0x00007ffff4156c5a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#13 0x00007ffff4116f1f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007ffff20eee7e in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#15 0x00007ffff210009c in ?? () from /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff2109d05 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#17 0x00007ffff2109ed3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#18 0x00007ffff42b92ae in gtk_widget_map () from
/usr/lib/libgtk-x11-2.0.so.0
#19 0x00007ffff20eee7e in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#20 0x00007ffff210009c in ?? () from /usr/lib/libgobject-2.0.so.0
#21 0x00007ffff2109d05 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#22 0x00007ffff2109ed3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#23 0x00007ffff42b9ba6 in gtk_widget_show () from
/usr/lib/libgtk-x11-2.0.so.0
#24 0x00000000004eef76 in library_window_show_background_progress_bar (
self=0xe06100) at src/library/LibraryWindow.c:4896
#25 library_window_show_background_progress_bar (self=0xe06100)
at src/library/LibraryWindow.c:4892
#26 0x00000000004ef30b in
library_window_start_pulse_background_progress_bar (
self=0xe06100, label=0x7fffde3d54de "Updating library...", priority=35)
at src/library/LibraryWindow.c:4810
#27 0x00007ffff20eee7e in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#28 0x00007ffff21008d7 in ?? () from /usr/lib/libgobject-2.0.so.0
#29 0x00007ffff2109d05 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#30 0x00007ffff210a092 in g_signal_emit_by_name ()
from /usr/lib/libgobject-2.0.so.0
#31 0x000000000067fb11 in directory_monitor_start_discovery (self=0xdf4050)
at src/DirectoryMonitor.c:1692
#32 0x0000000000681393 in library_monitor_pool_on_start_monitor (
---Type <return> to continue, or q <return> to quit---
self=<value optimized out>) at src/LibraryMonitor.c:1217
#33 _library_monitor_pool_on_start_monitor_gsource_func (
self=<value optimized out>) at src/LibraryMonitor.c:1164
#34 0x00007ffff15e6ddb in ?? () from /lib/libglib-2.0.so.0
#35 0x00007ffff15e54a3 in g_main_context_dispatch () from
/lib/libglib-2.0.so.0
#36 0x00007ffff15e5c80 in ?? () from /lib/libglib-2.0.so.0
#37 0x00007ffff15e62f2 in g_main_loop_run () from /lib/libglib-2.0.so.0
#38 0x00007ffff41932b7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#39 0x0000000000697d8c in application_start (self=0xaee860)
at src/Application.c:141
#40 0x0000000000583de4 in library_exec (mounts=<value optimized out>,
mounts_length1=<value optimized out>) at src/main.c:1124
#41 0x00000000005850bf in _vala_main (args=0x7fffffffe8e8, args_length1=1)
at src/main.c:1596
#42 0x0000000000486311 in main (argc=1, argv=0x7fffffffe8e8) at
src/main.c:1661
(gdb) quit
A debugging session is active.
Inferior 1 [process 2485] will be killed.
Quit anyway? (y or n) y
[01;32mdougie@barra[01;34m ~ $[00m exit
Script done on Tue 27 Sep 2011 08:47:36 BST
_______________________________________________
Shotwell mailing list
[email protected]
http://lists.yorba.org/cgi-bin/mailman/listinfo/shotwell