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 784926 - nautilus crashes when searching for a file (tracker 2.0 git)
nautilus crashes when searching for a file (tracker 2.0 git)
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
1.99.x
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2017-07-13 20:17 UTC by Hussam Al-Tayeb
Modified: 2017-07-15 14:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-data: Do not reuse TrackerDBInterface used for DB checks (1.14 KB, patch)
2017-07-15 14:43 UTC, Carlos Garnacho
committed Details | Review

Description Hussam Al-Tayeb 2017-07-13 20:17:25 UTC
Try searching for a file in nautilus in a directory not indexed by tracker (the not indexed by tracker part may be important).
It crashes with the following trace.

coredumpctl gdb 30315
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
      Pass -q to turn off this notice.
           PID: 30315 (nautilus)
           UID: 1000 (hussam)
           GID: 100 (users)
        Signal: 11 (SEGV)
     Timestamp: Thu 2017-07-13 23:09:48 EEST (1min 27s ago)
  Command Line: /usr/bin/nautilus --gapplication-service
    Executable: /usr/bin/nautilus
 Control Group: /user.slice/user-1000.slice/user@1000.service/dbus.service
          Unit: user@1000.service
     User Unit: dbus.service
         Slice: user-1000.slice
     Owner UID: 1000 (hussam)
       Boot ID: c4fe6993099e47b38287f2d83c313088
    Machine ID: efb490e643e2436d9d1138df1745a008
      Hostname: hades
       Storage: /var/lib/systemd/coredump/core.nautilus.1000.c4fe6993099e47b38287f2d83c313088.30315.1499976588000000.lz4
       Message: Process 30315 (nautilus) of user 1000 dumped core.
                
                Stack trace of thread 30322:
                #0  0x00007f604feb9d40 g_str_hash (libglib-2.0.so.0)
                #1  0x00007f604feb9164 g_hash_table_lookup_node (libglib-2.0.so.0)
                #2  0x00007f6048041c19 tracker_rank_function (libtracker-data.so.0)
                #3  0x00007f60449e43ef n/a (libsqlite3.so.0)
                #4  0x00007f6044a3b18d sqlite3VdbeExec (libsqlite3.so.0)
                #5  0x00007f6044a407af sqlite3_step (libsqlite3.so.0)
                #6  0x00007f60449e7ccd n/a (libsqlite3.so.0)
                #7  0x00007f60449f8923 n/a (libsqlite3.so.0)
                #8  0x00007f6044a3c411 sqlite3VdbeExec (libsqlite3.so.0)
                #9  0x00007f6044a407af sqlite3_step (libsqlite3.so.0)
                #10 0x00007f60480369fa stmt_step (libtracker-data.so.0)
                #11 0x00007f6048036b1e tracker_db_cursor_iter_next_thread (libtracker-data.so.0)
                #12 0x00007f604e1a7b39 g_task_thread_pool_thread (libgio-2.0.so.0)
                #13 0x00007f604fef3b43 g_thread_pool_thread_proxy (libglib-2.0.so.0)
                #14 0x00007f604fef310a g_thread_proxy (libglib-2.0.so.0)
                #15 0x00007f604c5bcff9 start_thread (libpthread.so.0)
                #16 0x00007f604c2fdb0f __clone (libc.so.6)
                
                Stack trace of thread 30315:
                #0  0x00007f604e731490 _cairo_operator_bounded_by_either (libcairo.so.2)
                #1  0x00007f604e71611c _cairo_composite_rectangles_init (libcairo.so.2)
                #2  0x00007f604e717051 _cairo_compositor_paint (libcairo.so.2)
                #3  0x00007f604e762fdc _cairo_surface_paint (libcairo.so.2)
                #4  0x00007f604e764056 cairo_surface_create_similar (libcairo.so.2)
                #5  0x00007f604f2f0db1 gdk_window_create_similar_surface (libgdk-3.so.0)
                #6  0x00007f604f2f5387 gdk_window_begin_paint_internal (libgdk-3.so.0)
                #7  0x00007f604f2f56a2 gdk_window_begin_draw_frame (libgdk-3.so.0)
                #8  0x00007f604f90ceac gtk_widget_render (libgtk-3.so.0)
                #9  0x00007f604f7a557a gtk_main_do_event (libgtk-3.so.0)
                #10 0x00007f604f2d8946 _gdk_event_emit (libgdk-3.so.0)
                #11 0x00007f604f2e927b _gdk_window_process_updates_recurse_helper (libgdk-3.so.0)
                #12 0x00007f604f2ea4c9 gdk_window_process_updates_internal (libgdk-3.so.0)
                #13 0x00007f604f2ea6d9 gdk_window_process_updates_with_mode (libgdk-3.so.0)
                #14 0x00007f604ded23dd g_closure_invoke (libgobject-2.0.so.0)
                #15 0x00007f604dee6340 signal_emit_unlocked_R (libgobject-2.0.so.0)
                #16 0x00007f604deeefe6 g_signal_emit_valist (libgobject-2.0.so.0)
                #17 0x00007f604deefa20 g_signal_emit (libgobject-2.0.so.0)
                #18 0x00007f604f2e224a gdk_frame_clock_paint_idle (libgdk-3.so.0)
                #19 0x00007f604f2cca03 gdk_threads_dispatch (libgdk-3.so.0)
                #20 0x00007f604fecb663 g_timeout_dispatch (libglib-2.0.so.0)
                #21 0x00007f604fecab86 g_main_dispatch (libglib-2.0.so.0)
                #22 0x00007f604fecaf59 g_main_context_iterate (libglib-2.0.so.0)
                #23 0x00007f604fecafee g_main_context_iteration (libglib-2.0.so.0)
                #24 0x00007f604e1be3ae g_application_run (libgio-2.0.so.0)
                #25 0x0000000000440dfc main (nautilus)
                #26 0x00007f604c2304da __libc_start_main (libc.so.6)
                #27 0x0000000000440e5a _start (nautilus)
                
                Stack trace of thread 30316:
                #0  0x00007f604c2f3a9d poll (libc.so.6)
                #1  0x00007f604fecaed3 g_main_context_poll (libglib-2.0.so.0)
                #2  0x00007f604fecafee g_main_context_iteration (libglib-2.0.so.0)
                #3  0x00007f604fecb042 glib_worker_main (libglib-2.0.so.0)
                #4  0x00007f604fef310a g_thread_proxy (libglib-2.0.so.0)
                #5  0x00007f604c5bcff9 start_thread (libpthread.so.0)
                #6  0x00007f604c2fdb0f __clone (libc.so.6)
                
                Stack trace of thread 30323:
                #0  0x00007f604c2f8c29 syscall (libc.so.6)
                #1  0x00007f604ff11af1 g_cond_wait (libglib-2.0.so.0)
                #2  0x00007f604fe9e824 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0)
                #3  0x00007f604fe9ec78 g_async_queue_pop (libglib-2.0.so.0)
                #4  0x00007f604cbc185d tracker_direct_connection_thread_func (libtracker-sparql-2.0.so.0)
                #5  0x00007f604fef310a g_thread_proxy (libglib-2.0.so.0)
                #6  0x00007f604c5bcff9 start_thread (libpthread.so.0)
                #7  0x00007f604c2fdb0f __clone (libc.so.6)
                
                Stack trace of thread 30320:
                #0  0x00007f604c2f8c29 syscall (libc.so.6)
                #1  0x00007f604ff11c0d g_cond_wait_until (libglib-2.0.so.0)
                #2  0x00007f604fe9e803 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0)
                #3  0x00007f604fef3b16 g_thread_pool_wait_for_new_task (libglib-2.0.so.0)
                #4  0x00007f604fef310a g_thread_proxy (libglib-2.0.so.0)
                #5  0x00007f604c5bcff9 start_thread (libpthread.so.0)
                #6  0x00007f604c2fdb0f __clone (libc.so.6)
                
                Stack trace of thread 30317:
                #0  0x00007f604c2f3a9d poll (libc.so.6)
                #1  0x00007f604fecaed3 g_main_context_poll (libglib-2.0.so.0)
                #2  0x00007f604fecb292 g_main_loop_run (libglib-2.0.so.0)
                #3  0x00007f604e1ed088 gdbus_shared_thread_func (libgio-2.0.so.0)
                #4  0x00007f604fef310a g_thread_proxy (libglib-2.0.so.0)
                #5  0x00007f604c5bcff9 start_thread (libpthread.so.0)
                #6  0x00007f604c2fdb0f __clone (libc.so.6)
                
                Stack trace of thread 30319:
                #0  0x00007f604c2f3a9d poll (libc.so.6)
                #1  0x00007f604fecaed3 g_main_context_poll (libglib-2.0.so.0)
                #2  0x00007f604fecafee g_main_context_iteration (libglib-2.0.so.0)
                #3  0x00007f603d7f5b2e n/a (libdconfsettings.so)
                #4  0x00007f604fef310a g_thread_proxy (libglib-2.0.so.0)
                #5  0x00007f604c5bcff9 start_thread (libpthread.so.0)
                #6  0x00007f604c2fdb0f __clone (libc.so.6)
                
                Stack trace of thread 30328:
                #0  0x00007f604fedba70 g_queue_pop_head (libglib-2.0.so.0)
                #1  0x000000000048ac39 search_thread_func (nautilus)
                #2  0x00007f604fef310a g_thread_proxy (libglib-2.0.so.0)
                #3  0x00007f604c5bcff9 start_thread (libpthread.so.0)
                #4  0x00007f604c2fdb0f __clone (libc.so.6)

GNU gdb (GDB) 8.0
Copyright (C) 2017 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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/nautilus...done.
[New LWP 30322]
[New LWP 30315]
[New LWP 30316]
[New LWP 30323]
[New LWP 30320]
[New LWP 30317]
[New LWP 30319]
[New LWP 30328]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/nautilus --gapplication-service'.
Program terminated with signal SIGSEGV, Segmentation fault.

Thread 2 (Thread 0x7f60504cb9c0 (LWP 30315))

  • #0 _cairo_operator_bounded_by_either
    at cairo-misc.c line 460
  • #1 _cairo_composite_rectangles_init
    at cairo-composite-rectangles.c line 94
  • #2 _cairo_composite_rectangles_init_for_paint
    at cairo-composite-rectangles.c line 122
  • #3 _cairo_compositor_paint
    at cairo-compositor.c line 55
  • #4 _cairo_surface_paint
    at cairo-surface.c line 2123
  • #5 cairo_surface_create_similar
    at cairo-surface.c line 538
  • #6 gdk_window_create_similar_surface
    at gdkwindow.c line 10150
  • #7 gdk_window_begin_paint_internal
    at gdkwindow.c line 2976
  • #8 gdk_window_begin_draw_frame
    at gdkwindow.c line 3232
  • #9 gtk_widget_render
    at gtkwidget.c line 17493
  • #10 gtk_main_do_event
    at gtkmain.c line 1824
  • #11 _gdk_event_emit
    at gdkevents.c line 73
  • #12 _gdk_window_process_updates_recurse_helper
    at gdkwindow.c line 3849
  • #13 gdk_window_process_updates_internal
    at gdkwindow.c line 3995
  • #14 gdk_window_process_updates_with_mode
    at gdkwindow.c line 4189
  • #18 <emit signal ??? on instance 0xcf92d0 [GdkFrameClockIdle]>
    at gsignal.c line 3447
  • #19 _gdk_frame_clock_emit_paint
    at gdkframeclock.c line 640
  • #20 gdk_frame_clock_paint_idle
    at gdkframeclockidle.c line 430
  • #21 gdk_threads_dispatch
    at gdk.c line 743
  • #22 g_timeout_dispatch
    at gmain.c line 4629
  • #23 g_main_dispatch
    at gmain.c line 3148
  • #24 g_main_context_dispatch
    at gmain.c line 3813
  • #25 g_main_context_iterate
    at gmain.c line 3886
  • #26 g_main_context_iteration
    at gmain.c line 3947
  • #27 g_application_run
    at gapplication.c line 2378
  • #28 main

Comment 1 Hussam Al-Tayeb 2017-07-13 20:20:24 UTC
It won't crash if I search in /home/hussam/Documents/ which is indexed by tracker.
It crashes when I search in /home/hussam/cache which is not indexed by tracker.

"/home/hussam/cache" is where I keep source code tarballs for things.
Comment 2 Carlos Garnacho 2017-07-15 14:43:46 UTC
Thanks! I can reproduce too. Just pushed a fix for it.

The following fix has been pushed:
5c61827 libtracker-data: Do not reuse TrackerDBInterface used for DB checks
Comment 3 Carlos Garnacho 2017-07-15 14:43:58 UTC
Created attachment 355687 [details] [review]
libtracker-data: Do not reuse TrackerDBInterface used for DB checks

It is just too soon to let it initialize like the others, just drop it
and let the TrackerDBManager create proper ones on demand. Fixes possible
crashes on FTS because the TrackerOntology is still empty, so the
TrackerDBInterface ends up with 0 cached FTS properties.