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 474126 - Trackerd crashes on first startup after upgrading from 0.6.1 to 0.6.2
Trackerd crashes on first startup after upgrading from 0.6.1 to 0.6.2
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
unspecified
Other All
: Normal critical
: ---
Assigned To: Jamie McCracken
Jamie McCracken
Depends on:
Blocks:
 
 
Reported: 2007-09-06 05:42 UTC by Ernst Sjöstrand
Modified: 2010-05-17 13:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ernst Sjöstrand 2007-09-06 05:42:06 UTC
Steps to reproduce:
Maybe by...
1. Installing tracker 0.6.1 from Gutsy
2. Letting it run for a while
3. Upgrading to 0.6.2 from Gutsy
4. Try to start "trackerd"


Stack trace:
Program received signal SIGSEGV, Segmentation fault.

Thread 1082132816 (LWP 10905)

  • #0 strstr
    from /lib/libc.so.6
  • #1 g_strsplit
    from /usr/lib/libglib-2.0.so.0
  • #2 tracker_applications_add_service_directories
    at tracker-apps.c line 54
  • #3 process_files_thread
    at trackerd.c line 949
  • #4 ??
    from /usr/lib/libglib-2.0.so.0
  • #5 start_thread
    from /lib/libpthread.so.0
  • #6 clone
    from /lib/libc.so.6
  • #7 ??


Other information:
This is on AMD64
Comment 1 Jamie McCracken 2007-09-07 12:38:42 UTC
what is the value of your env variable :
XDG_DATA_DIRS?

does it contain non-utf8 stuff?



Comment 2 Ernst Sjöstrand 2007-09-07 15:23:20 UTC
ernst@mammut:~$ echo $XDG_DATA_DIRS 
/usr/local/share/:/usr/share/:/usr/share/gdm/
ernst@mammut:~$ trackerd 
Segmenteringsfel (core dumped)



ernst@mammut:~$ export XDG_DATA_DIRS=/usr/share
ernst@mammut:~$ trackerd 
Segmenteringsfel (core dumped)



ernst@mammut:~$ unset XDG_DATA_DIRS
ernst@mammut:~$ trackerd 
Works!

Perhaps this is interesting?

ernst@mammut:~$ locale
LANG=sv_SE.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_PAPER="sv_SE.UTF-8"
LC_NAME="sv_SE.UTF-8"
LC_ADDRESS="sv_SE.UTF-8"
LC_TELEPHONE="sv_SE.UTF-8"
LC_MEASUREMENT="sv_SE.UTF-8"
LC_IDENTIFICATION="sv_SE.UTF-8"
LC_ALL=
Comment 3 Jamie McCracken 2007-09-07 15:33:13 UTC
can you run trackerd --reindex and see if that fixes the problem?

if not can you run trackerd --reindex -v 3 and get me output
Comment 4 Ernst Sjöstrand 2007-09-07 16:09:07 UTC
Right, I discovered this with a clean index.



ernst@mammut:~$ trackerd --reindex -v 3


Tracker version 0.6.1 Copyright (c) 2005-2006 by Jamie McCracken (jamiemcc@gnome.org)

This program is free software and comes without any warranty.
It is licensed under version 2 or later of the General Public License which can be viewed at http://www.gnu.org/licenses/gpl.txt

Initialising tracker...
setting stopword list for language code sv
Using stemmer for language swedish

Tracker configuration options :
Verbosity : ........................  3
Low memory mode : ..................  no
Indexing enabled : .................  yes
Watching enabled : .................  yes
File content indexing enabled : ....  yes
Thumbnailing enabled : .............  no
Evolution email indexing enabled : .  yes
Thunderbird email indexing enabled :  no
K-Mail indexing enabled : ..........  no

Tracker indexer parameters :
Indexer language code : ............  sv
Minimum index word length : ........  3
Maximum index word length : ........  30
Stemmer enabled : ..................  yes
Setting watch directory roots to:
/home/Gemensamt
/home/ernst

Throttle level is 0
Using Sqlite version 3.4.2
Loading prepared queries...
File loaded in  0,331000 ms
loaded sql file sqlite-cache.sql
Database closed for thread main
database file /home/ernst/.cache/tracker/file-meta.db is not present - will create
Creating file database...
loaded sql file sqlite-service.sql
loaded sql file sqlite-service-triggers.sql
Database closed for thread main
database file /home/ernst/.cache/tracker/file-content.db is not present - will create
creating file content table
Database closed for thread main
database index file /home/ernst/.cache/tracker/file-index.db is not present - will create
Database closed for thread main
database index file /home/ernst/.cache/tracker/email-index.db is not present - will create
Database closed for thread main
database file /home/ernst/.cache/tracker/email-content.db is not present - will create
creating email content table
Database closed for thread main
database file /home/ernst/.cache/tracker/email-meta.db is not present - will create
Creating email database...
loaded sql file sqlite-service.sql
loaded sql file sqlite-service-triggers.sql
loaded sql file sqlite-email.sql
Database closed for thread main
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def Rank with weight 1
loading metadata def   with weight 50
loading metadata def Name with weight 10
loading metadata def   with weight 15
loading metadata def Path with weight 1
loading metadata def   with weight 5
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def Mime with weight 10
loading metadata def Size with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def IndexTime with weight 1
loading metadata def Accessed with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 20
loading metadata def   with weight 15
loading metadata def   with weight 10
loading metadata def   with weight 5
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 10
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 5
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 25
loading metadata def   with weight 10
loading metadata def   with weight 10
loading metadata def   with weight 5
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 5
loading metadata def   with weight 25
loading metadata def   with weight 20
loading metadata def   with weight 20
loading metadata def   with weight 25
loading metadata def   with weight 10
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 10
loading metadata def   with weight 20
loading metadata def   with weight 10
loading metadata def   with weight 5
loading metadata def   with weight 5
loading metadata def   with weight 5
loading metadata def   with weight 10
loading metadata def   with weight 20
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 5
loading metadata def   with weight 1
loading metadata def   with weight 10
loading metadata def   with weight 5
loading metadata def   with weight 5
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 20
loading metadata def   with weight 15
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
loading metadata def   with weight 1
adding service definition for default with id 1
adding service definition for Files with id 2
adding service definition for Folders with id 3
adding service definition for Documents with id 4
adding service definition for Images with id 5
adding service definition for Music with id 6
adding service definition for Videos with id 7
adding service definition for Text with id 8
adding service definition for Development with id 9
adding service definition for Other with id 10
adding service definition for Emails with id 11
adding service definition for EvolutionEmails with id 12
adding service definition for KMailEmails with id 13
adding service definition for EmailAttachments with id 14
adding service definition for EvolutionAttachments with id 15
adding service definition for KMailAttachments with id 16
adding service definition for Conversations with id 17
adding service definition for GaimConversations with id 18
adding service definition for Applications with id 19
Setting inotify watch limit to 8191.
starting indexing...
0 files are pending with count 0
Starting config indexing
0 files are pending with count 0
Starting application indexing
Registering path /home/ernst/.local/share/applications as belonging to service Applications
Segmenteringsfel (core dumped)



End of strace:
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaab49000
lseek(23, 0, SEEK_CUR)                  = 0
read(23, "8192\n", 4096)                = 5
read(23, "", 3072)                      = 0
close(23)                               = 0
munmap(0x2aaaaab49000, 4096)            = 0
write(1, "Setting inotify watch limit to 8"..., 37Setting inotify watch limit to 8191.
) = 37
open("/home/ernst/.local/share/tracker/tracker.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 23
fstat(23, {st_mode=S_IFREG|0600, st_size=12325, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaab4a000
fstat(23, {st_mode=S_IFREG|0600, st_size=12325, ...}) = 0
lseek(23, 12325, SEEK_SET)              = 12325
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=675, ...}) = 0
write(23, "07 Sep 2007, 17:57:45:100 - Sett"..., 65) = 65
close(23)                               = 0
munmap(0x2aaaaab4a000, 4096)            = 0
fstat(22, {st_mode=S_IFDIR|0600, st_size=0, ...}) = 0
fcntl(22, F_GETFL)                      = 0 (flags O_RDONLY)
fcntl(22, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
clone(child_stack=0x40800260, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x408009e0, tls=0x40800950, child_tidptr=0x408009e0) = 20188
futex(0x2b0ba8a9a0a8, FUTEX_WAKE, 1)    = 1
poll([{fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=22, events=POLLIN}], 3, 0) = 0
poll([{fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=22, events=POLLIN}], 3, 0) = 0
poll(starting indexing...
0 files are pending with count 0
Starting config indexing
0 files are pending with count 0
Starting application indexing
Registering path /home/ernst/.local/share/applications as belonging to service Applications
[{fd=8, events=POLLIN}, {fd=10, events=POLLIN}, {fd=22, events=POLLIN}], 3, -1) = -1 EINTR (Interrupted system call)
+++ killed by SIGSEGV (core dumped) +++
Process 20184 detached
Comment 5 Jamie McCracken 2007-09-07 16:33:43 UTC
its not clear at all whats causing the crash

it might be memory corruption

can you do a valgrind and get me output up to point where it crashes?

valgrind --tool=memcheck --num-callers=20 -v  trackerd
 
Comment 6 Ernst Sjöstrand 2007-09-07 19:54:03 UTC
Ok! Did you note that I wrote that it's on AMD64, and that unset XDG_DATA_DIRS makes it work?

valgrind --tool=memcheck --num-callers=20 -v  trackerd
==21389== Memcheck, a memory error detector.
==21389== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==21389== Using LibVEX rev 1732, a library for dynamic binary translation.
==21389== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==21389== Using valgrind-3.2.3-Debian, a dynamic binary instrumentation framework.
==21389== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==21389== 
--21389-- Command line
--21389--    trackerd
--21389-- Startup, with flags:
--21389--    --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
--21389--    --tool=memcheck
--21389--    --num-callers=20
--21389--    -v
--21389-- Contents of /proc/version:
--21389--   Linux version 2.6.22-10-generic (buildd@yellow) (gcc version 4.1.3 20070812 (prerelease) (Ubuntu 4.1.2-15ubuntu2)) #1 SMP Wed Aug 22 07:42:05 GMT 2007
--21389-- Arch and hwcaps: AMD64, amd64-sse2
--21389-- Page sizes: currently 4096, max supported 4096
--21389-- Valgrind library directory: /usr/lib/valgrind
--21389-- Reading syms from /usr/bin/trackerd (0x400000)
--21389-- Reading debug info from /usr/bin/trackerd...
--21389-- ... CRC mismatch (computed E0ED85F4 wanted D3DBAA92)
--21389-- Reading debug info from /usr/lib/debug/usr/bin/trackerd...
--21389-- Reading syms from /lib/ld-2.6.1.so (0x4000000)
--21389-- Reading debug info from /lib/ld-2.6.1.so...
--21389-- ... CRC mismatch (computed F18656F0 wanted 247B0180)
--21389--    object doesn't have a symbol table
--21389-- Reading syms from /usr/lib/valgrind/amd64-linux/memcheck (0x38000000)
--21389--    object doesn't have a dynamic symbol table
--21389-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp
--21389-- Reading suppressions file: /usr/lib/valgrind/default.supp
vex amd64->IR: unhandled instruction bytes: 0x66 0x66 0x66 0x66
==21389== valgrind: Unrecognised instruction at address 0x4016321.
==21389== Your program just tried to execute an instruction that Valgrind
==21389== did not recognise.  There are two possible reasons for this.
==21389== 1. Your program has a bug and erroneously jumped to a non-code
==21389==    location.  If you are running Memcheck and you just saw a
==21389==    warning about a bad jump, it's probably your program's fault.
==21389== 2. The instruction is legitimate but Valgrind doesn't handle it,
==21389==    i.e. it's Valgrind's fault.  If you think this is the case or
==21389==    you are not sure, please let us know and we'll try to fix it.
==21389== Either way, Valgrind will now raise a SIGILL signal which will
==21389== probably kill your program.
==21389== 
==21389== Process terminating with default action of signal 4 (SIGILL)
==21389==  Illegal opcode at address 0x4016321
==21389==    at 0x4016321: (within /lib/ld-2.6.1.so)
==21389==    by 0x400466E: (within /lib/ld-2.6.1.so)
==21389==    by 0x4014457: (within /lib/ld-2.6.1.so)
==21389==    by 0x400230A: (within /lib/ld-2.6.1.so)
==21389==    by 0x4000A67: (within /lib/ld-2.6.1.so)
==21389== 
==21389== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1)
--21389-- 
--21389-- supp:    1 dl-hack3
==21389== malloc/free: in use at exit: 0 bytes in 0 blocks.
==21389== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==21389== 
==21389== All heap blocks were freed -- no leaks are possible.
--21389--  memcheck: sanity checks: 0 cheap, 1 expensive
--21389--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--21389--  memcheck: auxmaps: 0 searches, 0 comparisons
--21389--  memcheck: SMs: n_issued      = 8 (128k, 0M)
--21389--  memcheck: SMs: n_deissued    = 0 (0k, 0M)
--21389--  memcheck: SMs: max_noaccess  = 524287 (8388592k, 8191M)
--21389--  memcheck: SMs: max_undefined = 0 (0k, 0M)
--21389--  memcheck: SMs: max_defined   = 6 (96k, 0M)
--21389--  memcheck: SMs: max_non_DSM   = 8 (128k, 0M)
--21389--  memcheck: max sec V bit nodes:    0 (0k, 0M)
--21389--  memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0)
--21389--  memcheck: max shadow mem size:   4272k, 4M
--21389-- translate:            fast SP updates identified: 146 ( 88.4%)
--21389-- translate:   generic_known SP updates identified: 10 (  6.0%)
--21389-- translate: generic_unknown SP updates identified: 9 (  5.4%)
--21389--     tt/tc: 752 tt lookups requiring 751 probes
--21389--     tt/tc: 752 fast-cache updates, 2 flushes
--21389--  transtab: new        376 (8,226 -> 139,122; ratio 169:10) [0 scs]
--21389--  transtab: dumped     0 (0 -> ??)
--21389--  transtab: discarded  0 (0 -> ??)
--21389-- scheduler: 937 jumps (bb entries).
--21389-- scheduler: 0/382 major/minor sched events.
--21389--    sanity: 1 cheap, 1 expensive checks.
--21389--    exectx: 30,011 lists, 1 contexts (avg 0 per list)
--21389--    exectx: 1 searches, 0 full compares (0 per 1000)
--21389--    exectx: 0 cmp2, 0 cmp4, 0 cmpAll
Otillåten instruktion (core dumped)
Comment 7 Jamie McCracken 2007-09-07 20:00:41 UTC
Damn valgrind does not work properly on amd64!

I realise it works with XDG_DATA_DIRS unset but there is no way g_strsplt should crash! its a glib function 

is there a crasher recorded for amd64 on glib's g_strsplt?

Also that part of the code has been there since 0.6.0 unchanged so its not specific to 0.6.2

Did you upgrade libglib at the same time as tracker 0.6.2? (I note from your first comment it was working fine on 0.6.1)

Comment 8 Ernst Sjöstrand 2007-09-07 20:20:06 UTC
>Damn valgrind does not work properly on amd64!
Damn.

>I realise it works with XDG_DATA_DIRS unset but there is no way g_strsplt
>should crash! its a glib function 
>is there a crasher recorded for amd64 on glib's g_strsplt?
Searching for g_strsplit in ubuntu's bug system doesn't return anything

>Also that part of the code has been there since 0.6.0 unchanged so its 
>not specific to 0.6.2
Right

>Did you upgrade libglib at the same time as tracker 0.6.2?
No, last glib update was 21 Aug 2007

>(I note from your first comment it was working fine on 0.6.1)
Yes, it was!

What about memory problems somewhere else that affect this part of the code? That's relate to sizeof something that's bigger on AMD64?
Just guessing...
Comment 9 Jamie McCracken 2007-09-09 12:01:10 UTC
Fix is here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440997

patch has been committed so closing
Comment 10 Martyn Russell 2010-05-17 13:30:49 UTC
Moving "Indexer" component bugs to "General" since "Indexer" refers to the old 0.6 architecture