Bug 1766219

Summary: Upgrading to xapian-core-1.4.13-1.fc30 breaks notmuch
Product: [Fedora] Fedora Reporter: Rafael Ávila de Espíndola <rafael>
Component: xapian-coreAssignee: Peter Robinson <pbrobinson>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: adel.gadllah, apmanol, denis.arnaud_fedora, john.j5live, pbrobinson, sebastian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xapian-core-1.4.13-2.fc31 xapian-core-1.4.13-2.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-07 01:17:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rafael Ávila de Espíndola 2019-10-28 15:29:12 UTC
Description of problem:

After upgrading to xapian-core-1.4.13-1.fc30  notmuch started getting segmentation faults at every "notmuch tag ..." run. Downgrading to xapian-core-libs-1.4.10-1.fc30.x86_64.rpm fixed the problem.

Comment 1 Peter Robinson 2019-10-28 21:54:32 UTC
Please provide a abrt traceback with full debug symbols. There's 8 months worth of changes between those releases.

Comment 2 Rafael Ávila de Espíndola 2019-10-28 22:39:09 UTC
The failure seems to depend on the db content. Currently I am getting:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ab12b8 in AndNotPostList::get_weight (this=<optimized out>) at matcher/andnotpostlist.cc:177
177         RETURN(l->get_weight());
(gdb) bt
#0  0x00007ffff7ab12b8 in AndNotPostList::get_weight() const (this=<optimized out>) at matcher/andnotpostlist.cc:177
#1  0x00007ffff7ab4d06 in SelectPostList::get_weight() const (this=0x4af590) at matcher/selectpostlist.h:61
#2  0x00007ffff7abc62a in MultiMatch::get_mset(unsigned int, unsigned int, unsigned int, Xapian::MSet&, Xapian::Weight::Internal&, Xapian::MatchDecider const*, Xapian::KeyMaker const*)
    (this=0x7fffffffd190, first=0, maxitems=<optimized out>, check_at_least=1213774, mset=..., stats=..., mdecider=0x0, sorter=0x0) at matcher/multimatch.cc:625
#3  0x00007ffff79d20e6 in Xapian::Enquire::Internal::get_mset(unsigned int, unsigned int, unsigned int, Xapian::RSet const*, Xapian::MatchDecider const*) const () at api/omenquire.cc:572
#4  0x00007ffff79d2359 in Xapian::Enquire::get_mset(unsigned int, unsigned int, unsigned int, Xapian::RSet const*, Xapian::MatchDecider const*) const
    (this=this@entry=0x7fffffffd378, first=first@entry=0, maxitems=<optimized out>, check_at_least=check_at_least@entry=0, rset=rset@entry=0x0, mdecider=0x0) at api/omenquire.cc:937
#5  0x00007ffff7f93da0 in _notmuch_query_search_documents(notmuch_query_t*, char const*, notmuch_messages_t**) (query=0x45a560, type=<optimized out>, out=0x7fffffffd4c0) at lib/query.cc:346
#6  0x0000000000419468 in tag_query
    (ctx=ctx@entry=0x452d10, notmuch=notmuch@entry=0x454a60, query_string=0x48ebf0 "( tag:new and to:rafael ) and (not tag:me)", tag_ops=tag_ops@entry=0x456160, flags=(TAG_FLAG_MAILDIR_SYNC | TAG_FLAG_PRE_OPTIMIZED),
    flags@entry=TAG_FLAG_MAILDIR_SYNC) at notmuch-tag.c:124
#7  0x00000000004199d2 in notmuch_tag_command (config=0x452d10, argc=<optimized out>, argv=0x7fffffffda90) at notmuch-tag.c:279
#8  0x0000000000409efb in main (argc=7, argv=0x7fffffffda88) at notmuch.c:502

Comment 3 Peter Robinson 2019-10-28 22:50:10 UTC
Did you go directly from 1.4.10 -> .13? Can you test .11 and .12 if so to narrow down when this started to happen.

Comment 4 Rafael Ávila de Espíndola 2019-10-28 22:53:02 UTC
I don't see .11 and .12 at

https://koji.fedoraproject.org/koji/search?terms=xapian-core.*fc30&type=build&match=regexp

Comment 5 Peter Robinson 2019-10-28 22:56:07 UTC
oh, this is fc30

Comment 6 Rafael Ávila de Espíndola 2019-10-28 23:03:52 UTC
I have compiled my own copy of .13 with assertions enabled. With that get the error

notmuch tag: A Xapian exception occurred
A Xapian exception occurred performing query: ../matcher/selectpostlist.cc:36: p == __null
Query string was: ( tag:new and to:rafael ) and (not tag:me)

Comment 7 Rafael Ávila de Espíndola 2019-10-28 23:31:18 UTC
I have compiled from git. v1.4.12 works, v1.4.13 fails.

Comment 8 Peter Robinson 2019-10-28 23:41:47 UTC
Looking at the notmuch mailing list it looks to be this:
https://notmuchmail.org/pipermail/notmuch/2019/028634.html

I'll look at getting a build done shortly with the patch

Comment 9 Fedora Update System 2019-10-29 12:23:10 UTC
FEDORA-2019-2ad42d6ebf has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2ad42d6ebf

Comment 10 Rafael Ávila de Espíndola 2019-10-29 15:27:32 UTC
Thanks. I just installed ./xapian-core-libs-1.4.13-2.fc30.x86_64.rpm. I will let you know how it goes.

Comment 11 Fedora Update System 2019-10-30 01:19:49 UTC
xapian-core-1.4.13-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-2ad42d6ebf

Comment 12 Fedora Update System 2019-10-30 01:34:21 UTC
xapian-core-1.4.13-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-22986fbe05

Comment 13 Rafael Ávila de Espíndola 2019-10-30 02:35:52 UTC
So far the new package seems to fix the issue.
Thanks!

Comment 14 Peter Robinson 2019-11-01 18:33:47 UTC
*** Bug 1767052 has been marked as a duplicate of this bug. ***

Comment 15 Fedora Update System 2019-11-07 01:17:33 UTC
xapian-core-1.4.13-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2019-11-07 02:41:47 UTC
xapian-core-1.4.13-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.