Skip to content

Fix assertion failure in client_update_plan() during disconnect#122

Merged
sirainen merged 1 commit intodovecot:mainfrom
slusarz:fix-client-plan-disconnect-assertion
May 7, 2026
Merged

Fix assertion failure in client_update_plan() during disconnect#122
sirainen merged 1 commit intodovecot:mainfrom
slusarz:fix-client-plan-disconnect-assertion

Conversation

@slusarz
Copy link
Copy Markdown
Contributor

@slusarz slusarz commented May 6, 2026

Fixes this issue:

Running the command imaptest "host=127.0.0.1" "port=31143" "user=test1" "user2=test2" "secs=1" "checkpoint=1" causes this crash:

Panic: file client-state.c: line 235 (client_update_plan): assertion failed: (client->plan_size == 0)
Error: Raw backtrace: imaptest(+0x9c002) [0x62623f271002] -> imaptest(+0x9c136) [0x62623f271136] ->
imaptest(+0x5a69e) [0x62623f22f69e] -> imaptest(+0x5a6e7) [0x62623f22f6e7] -> imaptest(+0x1144a)
[0x62623f1e644a] -> imaptest(+0xc9d2) [0x62623f1e19d2] -> imaptest(+0x1dddf) [0x62623f1f2ddf] ->
imaptest(+0x1c570) [0x62623f1f1570] -> imaptest(+0x231a2) [0x62623f1f81a2] -> imaptest(+0x1db31)
[0x62623f1f2b31] -> imaptest(+0x5f01d) [0x62623f23401d] -> imaptest(+0x9f76a) [0x62623f27476a] ->
imaptest(+0x5f0c4) [0x62623f2340c4] -> imaptest(+0x5f2a0) [0x62623f2342a0] -> imaptest(+0x1bacb)
[0x62623f1f0acb] -> libc.so.6(+0x2a1ca) [0x77e2ba62a1ca] -> libc.so.6(__libc_start_main+0x8b)
[0x77e2ba62a28b] -> imaptest(+0x1c085) [0x62623f1f1085]

- Clear client plan when handling global disconnection in client_eat_first_plan().
- Skip sending checkpoint commands to disconnecting or unauthenticated clients.
@sirainen sirainen merged commit b4646d8 into dovecot:main May 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants