# Logs are flooded with messages "Warning: Time moved forward"
# The function io_loop_get_wait_time in ioloop.c contains the line:
# ioloop->next_max_time.tv_sec = (time_t)(((uint64_t)1 << TIME_T_MAX_BITS) - 1);
#On 32-bit systems TIME_T_MAX_BITS is 31 such that the result of this
calculation is 1073741823. Far from the
#intended "infinity" and even before "now". This leads to problems in the
function io_loop_handle_timeouts_real:
#the calculation of the time difference between now and next_max_time is then
something like -693628953 seconds
#which confuses dovecot and floods the logs with these warnings:
patch -b -p0 <<'EOF'
--- src/lib/time-util.c 2026-08-26 12:00:29.000000000 +0200
+++ src/lib/time-util.c 2026-10-02 13:10:39.000000000 +0200
@@ -166,7 +166,7 @@
#else
/* compute in uint64_t: with a 32-bit signed time_t
TIME_T_MAX_BITS is 31 and (time_t)1 << 31 would overflow */
- return (time_t)(((uint64_t)1 << TIME_T_MAX_BITS) - 1);
+ return (time_t)(((uint64_t)1 << TIME_T_MAX_BITS-1) - 1);
#endif
}
EOF
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]