talloc_abort in notmuch_thread_get_tags () when db has been modified
Gaute Hope
eg at gaute.vetsj.com
Mon Jan 18 00:46:41 PST 2016
Hi,
a user of astroid [0] ran into a issue [1] (full trace at issue) where
reading a long query causes a talloc_abort in notmuch_thread_get_tags
(). 'notmuch new' is running at the same time, and most likely a thread
in the query has been modified since the query was done. Note that a
notmuch_thread_get_authors () call returns NULL without causing a full
crash. The code causing the crash is:
```
for (tags = notmuch_thread_get_tags (nm_thread);
notmuch_tags_valid (tags);
notmuch_tags_move_to_next (tags))
{
tag = notmuch_tags_get (tags); // tag belongs to tags
}
// or db.cc:508 in astroid/src.
```
while:
```
const char * auths = notmuch_thread_get_authors (nm_thread);
```
returns `NULL`, but does not crash.
Is there a way for me to handle this from the application side?
Admittedly I do keep query objects around for a while
(astroid/src/thread_index.cc:141), but in this case the issue would
probably occur anyway since it simply takes a long time to read the
query.
Regards, Gaute
[0] https://github.com/gauteh/astroid
[1] https://github.com/gauteh/astroid/issues/64
More information about the notmuch
mailing list