- 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/virtual/virtual-storage.c
+++ b/src/plugins/virtual/virtual-storage.c
@@ -495,12 +495,12 @@ static int virtual_mailbox_open(struct mailbox *box)
ret = virtual_mailboxes_open(mbox, box->flags); array_pop_back(&mbox->storage->open_stack);
}
+ if (ret == 0)
+ ret = index_storage_mailbox_open(box, FALSE);
if (ret < 0) { virtual_mailbox_close_internal(mbox); return -1;
}
- if (index_storage_mailbox_open(box, FALSE) < 0)
- return -1;
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:/ /dovecot. org/doc/ NEWS:
- 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/ virtual/ virtual- storage. c virtual/ virtual- storage. c mailbox_ open(struct mailbox *box) mailboxes_ open(mbox, box->flags);
array_ pop_back( &mbox-> storage- >open_stack) ; mailbox_ open(box, FALSE);
virtual_ mailbox_ close_internal( mbox);
return -1; storage_ mailbox_ open(box, FALSE) < 0)
+++ 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 dfsg1-3ubuntu2. 1
Dovecot version: 1:2.3.16+
Thanks,
Andre