Bug 259616 - mail/dovecot-fts-xapian panics after upgrade
Summary: mail/dovecot-fts-xapian panics after upgrade
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Juraj Lutter
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-11-02 17:12 UTC by bas
Modified: 2022-03-26 11:57 UTC (History)
2 users (show)

See Also:
otis: maintainer-feedback+


Attachments
Update version 1.4.13=>1.4.14 and unbreak (4.68 KB, patch)
2021-11-10 13:38 UTC, Muhammad Moinur Rahman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bas 2021-11-02 17:12:23 UTC
Dovecot LMTP panics and won't deliver mail after I updated to dovecot-fts-xapian-1.4.13_2 combined with dovecot-2.3.17_1 and dovecot-pigeonhole-0.5.17 today. The error:

Nov  2 18:08:00 mail dovecot[37656]: lmtp(bas@area536.com)<37666><yHG7K3BwgWEikwAA0J78UA>: Panic: file array.c: line 10 (array_idx_modifiable_i): assertion failed: (idx < array->buffer->used / array->element_size)
Nov  2 18:08:00 mail dovecot[37656]: lmtp(bas@area536.com)<37666><yHG7K3BwgWEikwAA0J78UA>: Fatal: master: service(lmtp): child 37666 killed with signal 6 (core not dumped - https://dovecot.org/bugreport.html#coredumps - set service lmtp { drop_priv_before_exec=yes })

Otherwise unchanged configuration. I did the pkg upgrade, restarted my mail jail and these errors started popping up. Managed to work around it for now by completely disabling FTS.
Comment 1 Juraj Lutter freebsd_committer freebsd_triage 2021-11-02 18:36:21 UTC
Would you mind to capture the core dump, please?
Comment 2 Juraj Lutter freebsd_committer freebsd_triage 2021-11-02 18:42:41 UTC
For the time being, I've opened an upstream issue: https://github.com/grosjo/fts-xapian/issues/100
Comment 3 bas 2021-11-03 08:16:27 UTC
I can't for the life of me coax Dovecot into dumping core. I read the page on dovecot.org that the logs refer to and attempted the drop_priv_before_exec setting, but it won't do a coredump. I also twiddled the sysctl's on the jailhost, to no avail.

I'm actually handling mail on this box so I don´t really want to disrupt it too much. Dovecot is running inside an iocage-managed jail environment. Any hint on how to achieve a core dump would be much appreciated and I'll happily provide the files.
Comment 4 Juraj Lutter freebsd_committer freebsd_triage 2021-11-10 08:26:40 UTC
This has been fixed in git already, so I am waiting for the release.
Comment 5 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2021-11-10 13:38:44 UTC
Created attachment 229407 [details]
Update version 1.4.13=>1.4.14 and unbreak

- Fix runtime
- Add USE_LDCONFIG

Builds clean in poudriere

http://pdr.bofh.network/data/latest-per-pkg/dovecot-fts-xapian/1.4.14/
Comment 6 Juraj Lutter freebsd_committer freebsd_triage 2021-11-10 13:49:22 UTC
Version 1.4.14 suffers from a functional bug: The amount of free memory is being calculated improperly (see their bug #101).
Comment 7 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2021-11-10 13:50:42 UTC
(In reply to Juraj Lutter from comment #6)
It has been fixed and this patch contains those patches from HEAD.
Comment 8 Juraj Lutter freebsd_committer freebsd_triage 2021-11-10 13:59:48 UTC
LGTM, please commit.
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-11-10 14:05:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4b42d0528a99049c6bcaac088948658ffe57d835

commit 4b42d0528a99049c6bcaac088948658ffe57d835
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2021-11-10 14:00:41 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2021-11-10 14:04:36 +0000

    mail/dovecot-fts-xapian: Update version 1.4.1.14

    - Fix runtime
    - Add USE_LDCONFIG

    PR: 259616
    Reported by: bas@area536.com
    Approved by: otis (maintainer)

 mail/dovecot-fts-xapian/Makefile                   |  4 +--
 mail/dovecot-fts-xapian/distinfo                   |  6 ++---
 ...atch-src_fts-backend-xapian-functions.cpp (new) | 30 ++++++++++++++++++++++
 .../files/patch-src_fts-xapian-plugin.c (new)      | 26 +++++++++++++++++++
 .../files/patch-src_fts-xapian-plugin.h (new)      | 29 +++++++++++++++++++++
 5 files changed, 90 insertions(+), 5 deletions(-)