slusarz / dovecot-fts-flatcurve

Dovecot FTS Flatcurve plugin (Xapian)
https://slusarz.github.io/dovecot-fts-flatcurve/
GNU Lesser General Public License v2.1
38 stars 8 forks source link

Assertion crash for search in virtual mailbox #61

Closed edieterich closed 4 months ago

edieterich commented 4 months ago

Some searches in virtual mailboxes run into an assertion. The same searches don't crash in backend mailboxes.

Panic: file fts-search.c: line 87 (level_scores_add_vuids): assertion failed: (array_count(&vuids_arr) == array_count(&br->scores))

I created a test case in my fork to reproduce the issue: https://github.com/edieterich/dovecot-fts-flatcurve/commit/545fe17c746c69ecfef92ca46026d5735184690d

Here's a test run with the crash: https://github.com/edieterich/dovecot-fts-flatcurve/actions/runs/8203662289

This search works:

1 search or from user body body

But this search crashes:

2 search or header reply-to user body body

Something with headers and maybe matches? I don't see crashes without maybe matches.

Query (allhdrs:user* OR body:body* OR body:bodi*) matches=1 uids=1 maybe_matches=1 maybe_uids=1