lmtp crashes with: Panic: file mail-user.c: line 229 (mail_user_deinit): assertion failed: ((*user)->refcount == 1)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dovecot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Committed
|
Medium
|
Bryce Harrington |
Bug Description
[Impact]
Dovecot crashes during the delivery process with particular mail clients, due to failure to open virtual mailboxes, which leads to a leak and a crash during service de-initialization. Emails fail to get delivered until the service is re-started.
[Test Case]
Exact steps to reproduce have not been identified, but users who encounter it can reliably detect if the issue is or is not present in their environments. We will rely on user testing for verification of the fix.
[Where Problems Could Occur]
The fix changes the opening and closing of mailboxes, so issues associated with changes of behavior with mailbox opening/closing may be of note. In particular this involves virtual mailboxes, so problems would be expected to be specific to that type of storage.
[Other Info]
[Original Report]
Hello
We're being hit by the following error using Jammy's version of Dovecot:
Oct 13 19:21:32 imap1 dovecot: lmtp(2572154): Panic: file mail-user.c: line 229 (mail_user_deinit): assertion failed: ((*user)->refcount == 1)
This error has been reported as fixed upstream in version 2.3.18, according to https:/
- virtual: If mailbox opening fails, the backend mailbox is leaked and
process crashes when client disconnects. Fixes
Panic: file mail-user.c: line 232 (mail_user_deinit):
assertion failed: ((*user)->refcount == 1)
The correction is simple:
--- a/src/plugins/
+++ b/src/plugins/
@@ -495,12 +495,12 @@ static int virtual_
ret = virtual_
}
+ if (ret == 0)
+ ret = index_storage_
if (ret < 0) {
}
- if (index_
- return -1;
Do you think a patch could be added to the Jammy package with that fix?
Ubuntu release: Ubuntu 22.04.1 LTS
Dovecot version: 1:2.3.16+
Thanks,
Andre
Related branches
- git-ubuntu bot: Approve
- Andreas Hasenack: Approve
- Canonical Server packageset reviewers: Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 69 lines (+47/-0)3 files modifieddebian/changelog (+8/-0)
debian/patches/fix-leaking-virtual-mailbox.patch (+38/-0)
debian/patches/series (+1/-0)
- git-ubuntu import: Pending requested
-
Diff: 67 lines (+45/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/jammy-fix-leaking-mailboxes.patch (+37/-0)
debian/patches/series (+1/-0)
summary: |
- Backport virtual storage panic from 2.3.18 + Backport virtual storage panic fix from 2.3.18 |
Changed in dovecot (Ubuntu Jammy): | |
status: | Triaged → Incomplete |
tags: |
added: server-todo removed: server-triage-discuss |
Changed in dovecot (Ubuntu): | |
assignee: | Michał Małoszewski (michal-maloszewski99) → nobody |
Changed in dovecot (Ubuntu Jammy): | |
assignee: | nobody → Bryce Harrington (bryce) |
description: | updated |
tags: | removed: server-todo |
Status changed to 'Confirmed' because the bug affects multiple users.