Error when attempting search on server, fix already upstream

Bug #1939292 reported by Timo
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dovecot
Fix Released
Unknown
dovecot (Ubuntu)
Triaged
Undecided
Utkarsh Gupta

Bug Description

Hello dear Ubuntu-Team,

this is my first error-bug-report, I hope to provide every needed information:

- System: Ubuntu 20.04.2 LTS
- Dovecot-Version: 2.3.7.2

Expected behavior: IMAP Search on Server

Received Error: Whenever I try a IMAP-search on the server (used tool: fairmail on Android) I get following error:

Aug 09 13:40:45 titan dovecot[737]: imap(<email address hidden>)<1073291><YnYI2x7JbZe8wj3S>: Panic: file message-parser.c: line 174 (message_part_finish): assertion failed: (ctx->nested_parts_count > 0)
Aug 09 13:40:45 titan dovecot[737]: imap(<email address hidden>)<1073291><YnYI2x7JbZe8wj3S>: Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0xf0c4b) [0x7fd039414c4b] -> /usr/lib/dovecot/libdovecot.so.0(+0xf0ce7) [0x7fd039414ce7] -> /usr/lib/dovecot/libdovecot.so.0(+0x54c1f) [0x7fd039378c1f] -> /usr/lib/dovecot/libdovecot.so.0(+0x51e81) [0x7fd039375e81] -> /usr/lib/dovecot/libdovecot.so.0(message_parser_parse_next_block+0x104) [0x7fd0393fa424] -> /usr/lib/dovecot/libdovecot.so.0(message_search_msg+0xa0) [0x7fd0393fc820] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0xd614e) [0x7fd0395a714e] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x58959) [0x7fd039529959] -> /usr/lib/dovecot/libdovecot-storage.so.0(mail_search_args_foreach+0x4d) [0x7fd03952a84d] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0xd6e98) [0x7fd0395a7e98] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0xd822c) [0x7fd0395a922c] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_storage_search_next_nonblock+0x11d) [0x7fd0395a998d] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_search_next_nonblock+0x24) [0x7fd039534114] -> dovecot/imap(+0x2866f) [0x55a58740f66f] -> dovecot/imap(command_exec+0x6c) [0x55a587408a9c] -> dovecot/imap(+0x27c86) [0x55a58740ec86] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handle_timeouts+0xfb) [0x7fd03942ab1b] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0xd0) [0x7fd03942c280] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x54) [0x7fd03942ada4] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x48) [0x7fd03942aef8] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x17) [0x7fd0393a9ab7] -> dovecot/imap(main+0x43e) [0x55a5873f9b0e] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fd0391530b3] -> dovecot/imap(_start+0x2e) [0x55a5873f9b9e]
Aug 09 13:40:45 titan dovecot[737]: imap(<email address hidden>)<1073291><YnYI2x7JbZe8wj3S>: Fatal: master: service(imap): child 1073291 killed with signal 6 (core dumps disabled - https://dovecot.org/bugreport.html#coredumps)

As far as I can tell, this is a bug, already fixed in the upstream version. The same bug has been discussed already at debian bug tracker.

- Debian Bugreport: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970386
- Fix Upstream: https://github.com/dovecot/core/commit/a668d767a710ca18ab6e7177d8e8be22a6b024fb

Is it possible to also update / cherry-pick this fix for the dovecot-package for Ubuntu 20.04.2 LTS?

Please let me know if you need any further information.
Regards from Germany

Tags: server-next
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for taking the time to file this bug and trying to make Ubuntu better.

The bug seems legit and it was already fixed in Debian, so we should do the same. In the Debian bug we have some more detailed instructions on how to reproduce this bug, it might be helpful when preparing the SRU. Since this is a "patch in a plate" situation I am adding the server-next tag.

Changed in dovecot (Ubuntu):
status: New → Triaged
tags: added: server-next
Changed in dovecot:
status: Unknown → Fix Released
Utkarsh Gupta (utkarsh)
Changed in dovecot (Ubuntu):
assignee: nobody → Utkarsh Gupta (utkarsh)
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Hiya Timo,

Thanks for filing the bug. I have assigned it to myself and I'm working on fixing this in Focal/20.04.2 LTS. However, I'd like to know if there is a simple reproducer for me to reproduce this crash? This will help me verify that the fix is indeed working fine, et al. Let me know what you think? Thanks!

Revision history for this message
Timo (marove2000) wrote :

Hi Utkarsh,

thank you for working on the fix. I've used a simple mail app (libreMail on Android) to perform a Server-Side search this always reproduces the crash. Other methods are not known to me.

Regards
Timo

Revision history for this message
Bryce Harrington (bryce) wrote :

Timo, can you verify this fixes the issue for you?

  https://launchpad.net/~bryce/+archive/ubuntu/dovecot-sru-lp1912118

I've not been able to reproduce the problem myself, but if you can confirm this addresses it properly I think we can move forward with the SRU for LP: #1912118. (And mark this lp: #1939292 as a dupe.)

Revision history for this message
Timo (marove2000) wrote :

Good Morning Bryce,

thank you very much for the fast help! I've installed the new version of dovecot-core and restarted the service.

I can confirm that this has fixed the error. Thank you very much!

Regards
Timo

Revision history for this message
Bryce Harrington (bryce) wrote :

Excellent, thanks!

I will proceed with a stable release update (SRU) for this, on bug #1912118, to hopefully get this rolled out to more users. I'll subscribe you to that bug report, and ask that you assist with the verification of the SRU. Thanks ahead of time!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.