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 767024 - "tracker index" crash
"tracker index" crash
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
1.5.x
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2016-05-30 14:06 UTC by Bastien Nocera
Modified: 2016-06-04 23:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tracker: Don't unref manager in the loop in "tracker index -f" subcommand (874 bytes, patch)
2016-06-04 23:15 UTC, Carlos Garnacho
committed Details | Review

Description Bastien Nocera 2016-05-30 14:06:35 UTC
tracker-1.8.0-1.fc24.x86_64

Starting program: /usr/bin/tracker index --file /home/hadess/Documents/Structures_de_données_en_C++_J.Hubbard_coll.Schaum.djvu /home/hadess/Documents/Le\ Grevisse\ -\ Le\ Bon\ Usage\ -\ grammaire\ française.djvu

Thread 1 "tracker" received signal SIGSEGV, Segmentation fault.
0x00007ffff7bd5d1f in tracker_miner_manager_index_file (manager=manager@entry=0x555555798b60, file=file@entry=0x5555557cb0d0, error=error@entry=0x7fffffffd4c0) at tracker-miner-manager.c:1621
1621		g_return_val_if_fail (TRACKER_IS_MINER_MANAGER (manager), FALSE);
Missing separate debuginfos, use: dnf debuginfo-install gamin-0.1.10-22.fc24.x86_64 gmp-6.1.0-2.fc24.x86_64 gnutls-3.4.12-1.fc24.x86_64 libattr-2.4.47-16.fc24.x86_64 libcap-2.24-9.fc24.x86_64 libffi-3.1-9.fc24.x86_64 libgcrypt-1.6.4-2.fc24.x86_64 libgpg-error-1.21-2.fc24.x86_64 libidn-1.32-2.fc24.x86_64 libselinux-2.5-3.fc24.x86_64 libtasn1-4.8-1.fc24.x86_64 lz4-r131-2.fc24.x86_64 nettle-3.2-2.fc24.x86_64 nspr-4.12.0-1.fc24.x86_64 nss-3.23.0-1.2.fc24.x86_64 nss-util-3.23.0-1.0.fc24.x86_64 p11-kit-0.23.2-2.fc24.x86_64 pcre-8.38-11.fc24.x86_64 systemd-libs-229-7.fc24.x86_64 xz-libs-5.2.2-2.fc24.x86_64
(gdb) bt
  • #0 tracker_miner_manager_index_file
    at tracker-miner-manager.c line 1621
  • #1 index_or_reindex_file
    at tracker-index.c line 165
  • #2 index_run
    at tracker-index.c line 353
  • #3 tracker_index
    at tracker-index.c line 452
  • #4 run_builtin
    at tracker-main.c line 121
  • #5 handle_command
    at tracker-main.c line 148
  • #6 main
    at tracker-main.c line 223

valgrind says:

(Re)indexing file was successful
==14148== Invalid read of size 8
==14148==    at 0x4E3CD17: tracker_miner_manager_index_file (tracker-miner-manager.c:1621)
==14148==    by 0x1128FE: index_or_reindex_file (tracker-index.c:165)
==14148==    by 0x1128FE: index_run (tracker-index.c:353)
==14148==    by 0x1128FE: tracker_index (tracker-index.c:452)
==14148==    by 0x10EC16: run_builtin (tracker-main.c:121)
==14148==    by 0x10EC16: handle_command (tracker-main.c:148)
==14148==    by 0x10EC16: main (tracker-main.c:223)
==14148==  Address 0xd806440 is 48 bytes inside a block of size 80 free'd
==14148==    at 0x4C2CD5A: free (vg_replace_malloc.c:530)
==14148==    by 0x91FF5FF: g_free (gmem.c:189)
==14148==    by 0x9217CB0: g_slice_free1 (gslice.c:1136)
==14148==    by 0x8F8105B: g_type_free_instance (gtype.c:1946)
==14148==    by 0x8F6AC9C: g_object_unref (gobject.c:3196)
==14148==    by 0x1128D3: index_or_reindex_file (tracker-index.c:177)
==14148==    by 0x1128D3: index_run (tracker-index.c:353)
==14148==    by 0x1128D3: tracker_index (tracker-index.c:452)
==14148==    by 0x10EC16: run_builtin (tracker-main.c:121)
==14148==    by 0x10EC16: handle_command (tracker-main.c:148)
==14148==    by 0x10EC16: main (tracker-main.c:223)
==14148==  Block was alloc'd at
==14148==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==14148==    by 0x91FF496: g_malloc (gmem.c:94)
==14148==    by 0x9217A74: g_slice_alloc (gslice.c:1025)
==14148==    by 0x9217AB4: g_slice_alloc0 (gslice.c:1051)
==14148==    by 0x8F80C05: g_type_create_instance (gtype.c:1848)
==14148==    by 0x8F673B3: g_object_new_internal (gobject.c:1781)
==14148==    by 0x8F68007: g_object_new_valist (gobject.c:2040)
==14148==    by 0x8BEAE43: g_initable_new_valist (ginitable.c:224)
==14148==    by 0x8BEAD0A: g_initable_new (ginitable.c:146)
==14148==    by 0x4E3B133: tracker_miner_manager_new_full (tracker-miner-manager.c:600)
==14148==    by 0x112878: index_or_reindex_file (tracker-index.c:152)
==14148==    by 0x112878: index_run (tracker-index.c:353)
==14148==    by 0x112878: tracker_index (tracker-index.c:452)
==14148==    by 0x10EC16: run_builtin (tracker-main.c:121)
==14148==    by 0x10EC16: handle_command (tracker-main.c:148)
==14148==    by 0x10EC16: main (tracker-main.c:223)
==14148== 
==14148== Invalid read of size 8
==14148==    at 0x4E3CD1F: tracker_miner_manager_index_file (tracker-miner-manager.c:1621)
==14148==    by 0x1128FE: index_or_reindex_file (tracker-index.c:165)
==14148==    by 0x1128FE: index_run (tracker-index.c:353)
==14148==    by 0x1128FE: tracker_index (tracker-index.c:452)
==14148==    by 0x10EC16: run_builtin (tracker-main.c:121)
==14148==    by 0x10EC16: handle_command (tracker-main.c:148)
==14148==    by 0x10EC16: main (tracker-main.c:223)
==14148==  Address 0xaaaaaaaaaaaaaaaa is not stack'd, malloc'd or (recently) free'd
Comment 1 Carlos Garnacho 2016-06-04 23:14:54 UTC
Thanks, pushed a fix for this.

The following fix has been pushed:
9a3a5ba tracker: Don't unref manager in the loop in "tracker index -f" subcommand
Comment 2 Carlos Garnacho 2016-06-04 23:15:00 UTC
Created attachment 329140 [details] [review]
tracker: Don't unref manager in the loop in "tracker index -f" subcommand

Must be unref'ed after the loop. Fixes crash if >1 files are provided.