doveadm sync - I/O has stalled

Timo Sirainen timo at sirainen.com
Mon Jan 2 01:26:09 UTC 2023


On 2. Jan 2023, at 3.21, Timo Sirainen <timo at sirainen.com> wrote:
> 
> 
>> It may happen, but it is hard to reproduce.
> 
> Are you able to try if this patch happens to fix it? :

Actually, looking at it slightly more, there may be another bug in it, although I'm not sure how it affects the behavior. So try this instead - I'll also run it through our CI to see if it causes any issues:

diff --git a/src/lib-ssl-iostream/iostream-openssl.c b/src/lib-ssl-iostream/iostream-openssl.c
index fa9afb22f7..0b22a07a84 100644
--- a/src/lib-ssl-iostream/iostream-openssl.c
+++ b/src/lib-ssl-iostream/iostream-openssl.c
@@ -548,14 +548,10 @@ openssl_iostream_bio_input(struct ssl_iostream *ssl_io,
                        ssl_io->ostream_flush_waiting_input = FALSE;
                        o_stream_set_flush_pending(ssl_io->plain_output, TRUE);
                }
-       }
-       if (bytes_read || i_stream_get_data_size(ssl_io->plain_input) > 0) {
-               if (i_stream_get_data_size(ssl_io->plain_input) > 0 ||
-                   (type != OPENSSL_IOSTREAM_SYNC_TYPE_FIRST_READ &&
-                    type != OPENSSL_IOSTREAM_SYNC_TYPE_CONTINUE_READ))
-                       i_stream_set_input_pending(ssl_io->ssl_input, TRUE);
                ssl_io->want_read = FALSE;
        }
+       if (bytes_read || i_stream_get_data_size(ssl_io->plain_input) > 0)
+               i_stream_set_input_pending(ssl_io->ssl_input, TRUE);
        return (bytes_read ? 1 : 0);
 }




More information about the dovecot mailing list