core dumped when using MatchAll in multi-threads
张少华
xiangqianzsh at 163.com
Sun Apr 8 17:49:11 BST 2018
Hi,
We have a search service based on xapian, when receving a request, we create several threads to create xapian-query and search in the corresponding databases, and then merge all results together.
In some case, we use Xapian::Query::MatchAll to create the query, but it always has Segmentation fault (core dumped). It looks like some pointers are double freed.
This is the function that we use to create xapian-query.
std::shared_ptr<Xapian::Query> constructQuery() {
Xapian::Query black_list("BLt1");
return std::make_shared<Xapian::Query>(Xapian::Query::OP_AND_NOT, Xapian::Query::MatchAll, black_list);
}
I have wrote a demo to reproduce our problems, you can click this link for the detail. https://github.com/xiangqianzsh/xapian_leaning/tree/master/matchall_coredump
How we solve this problems?
More information about the Xapian-discuss
mailing list