Re: [Tracker] Segfault in email parsing



On Sun, 2007-05-27 at 03:55 -0700, Eric Lesh wrote:
Hi,

I'm getting a seemingly weird segfault on a certain email with an
attachment during indexing.

The backtrace:
(gdb) bt
#0  0x08075e5c in email_parse_mail_file_and_save_new_emails
(db_con=0x8295730, 
    mail_app=MAIL_APP_EVOLUTION, 
    path=0x830f880 "/home/eric/.evolution/mail/local/Inbox", 
    load_helper=0x8079587 <load_uri_and_status_of_mbox_mail_message>, 
    store=0x0) at tracker-email-utils.c:139
#1  0x08077ac0 in evolution_index_file (db_con=0x8295730,
info=0x82cb578)
    at tracker-email-evolution.c:446
#2  0x08075bc7 in tracker_email_index_file (db_con=0x8295730,
info=0x82cb578, 
    service=0x82e1b70 "EvolutionEmails") at tracker-email.c:115
#3  0x0804f67b in index_entity (db_con=0x825e5c8, info=0x82cb578)
    at trackerd.c:739
#4  0x0805052c in process_files_thread () at trackerd.c:1308

Looking into #1 we see that:
(gdb) up
(gdb) info locals
header = (SummaryFileHeader *) 0x838cc50
mbox_file = 0x830f880 "/home/eric/.evolution/mail/local/Inbox"
summary = (SummaryFile *) 0x8351070
store = (MailStore *) 0x82f3b58
file_name = 0x8358f00 "Inbox.ev-summary"
__PRETTY_FUNCTION__ = "evolution_index_file"

So email_parse_mail_file_and_save_new_emails was called with a fine
'store' value.  Walking through email_parse...new_mail, it works like
this:
      Called by evolution_index_file
      Receive store = 0x82f3b58
      Enter while((mail_msg =...)) loop
      tracker_db_email_save_email

This make store = 0x0.  Tracing through tracker_db_email_save_email
reveals that 'store' is the proper value, then magically, upon 'return
TRUE;' at the end of the function, email_parse...new_mails sees store as
0x0.  Continuing on leads to the segfault when it tries to g_strconcat
with NULL.

What happened?
      
Is it a threading issue?  Or something obvious which I'm confused about?

Restarting trackerd seems to make things continue as normal.


I added more checks to make sure it ignores the email if store is null

can you reindex and see if you still get the crash with latest svn?

jamie





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]