Stephan Bosch [Fri, 12 Feb 2021 12:11:53 +0000 (13:11 +0100)]
lib-smtp: test-smtp-client-errors - Amend early data reply test to verify that connection is still viable.
Some problems only surface when the connection is reused for the next command.
Before, the connection was terminated immediately after the transaction, which
hides such issues.
Timo Sirainen [Fri, 5 Mar 2021 13:26:24 +0000 (15:26 +0200)]
lib-mail: mail-html2text - Fix character signedness type mismatch
Fixes ubsan complaints:
mail-html2text.c:186:12: runtime error: implicit conversion from type 'unsigned char' of value 226 (8-bit, unsigned) to type 'char' changed the value to -30 (8-bit, signed)
Timo Sirainen [Fri, 5 Mar 2021 10:44:42 +0000 (12:44 +0200)]
fts-tika: Don't fail indexing if Tika returns 5xx error
Broken by 8e1eaf849ce4668c0941338e3e3671db159da575, which changed 5xx to be
retried once before it was ignored. However, it accidentally changed the
second 5xx to return failure instead of being ignored.
At one point, we considered supporting LuaJIT. While it turned out to be
not worth it, the prototype removal accidentally left checks in the
configure file.
Timo Sirainen [Wed, 3 Feb 2021 17:42:17 +0000 (19:42 +0200)]
fts: Fix mail_precache() and related error handling
The mail_precache() caller is now expected to stop on error, so there's
no need for fts to stop the search internally anymore. And similarly
the caller will log the mail_precache() error so the search or
transaction don't need to fail.
ft->failed is now used only for failures that are more specific to the
transaction.
Timo Sirainen [Mon, 22 Feb 2021 11:15:18 +0000 (13:15 +0200)]
lib-imap-client: Fix busy-loop if server disconnects too early when trying to logout
This can happen if:
* imapc sends NOOP to break idle
* remote server sends BYE, but doesn't immediately disconnect
* session is stopped, which causes imapc to attempt to send LOGOUT
* imapc waits for NOOP response first
* remote server disconnects
* imapc notices the disconnection, but does nothing with it, because it
thinks it's already handled. This keeps busy-looping.
* If there was a mailbox selected, this results in infinite busy-loop. If a
mailbox wasn't selected, imapc_cmd_timeout aborts the NOOP command.
Timo Sirainen [Wed, 3 Feb 2021 18:42:50 +0000 (20:42 +0200)]
lib: io_loop_context_new() no longer implicitly activates the context
The new behavior requires explicitly activating the context. This change
was needed, because an implicit creation activated the context but didn't
call any of the callbacks. If ioloop wasn't run, the activation callbacks
were never called. This meant that when context was deactivated, the
deactivation callbacks weren't run either.
Martin Michaelis [Tue, 16 Feb 2021 20:06:50 +0000 (21:06 +0100)]
stats: openmentrics: Change histogram bucket unit to seconds
In ae678116a79fff609cdf4fb1eb7eb3db2975bf1c the unit of durations was changed
from microseconds to seconds, but the `le` field in histograms is still in
microseconds.
Stephan Bosch [Fri, 4 Jan 2019 08:57:37 +0000 (09:57 +0100)]
plugins: fts-solr: Use a private HTTP client.
This is a workaround for problems with the http_client_request_send_payload()
API that occur when several shared HTTP clients use this API at the same time
and payload sending gets interleaved.
Stephan Bosch [Fri, 4 Jan 2019 08:55:20 +0000 (09:55 +0100)]
plugins: fts: tika: Use a private HTTP client.
This is a workaround for problems with the http_client_request_send_payload()
API that occur when several shared HTTP clients use this API at the same time
and payload sending gets interleaved.
lib-master: Fix haproxy PROXY protocol LOCAL type connection behavior when header includes address information or TLVs
PROXY protocol LOCAL type headers can actually include supplementary
information (addresses, TLVs) which need to be skipped to correctly handle the
header. Fixes Invalid TLV bug with haproxy 2.0.14 service checks.
More info here: https://github.com/haproxy/haproxy/issues/511
And here: https://www.mail-archive.com/haproxy@formilux.org/msg36890.html
Timo Sirainen [Tue, 16 Feb 2021 14:40:35 +0000 (16:40 +0200)]
lib: cpu-limit - Don't round current CPU usage up when checking if rlim_max is reached
The fatal error could trigger half a second too early.
Also always increase the provided cpu_limit_sec by 1 second to make sure it
won't trigger too early. Although even with this change it can still
trigger a few milliseconds too early for some reason.
Timo Sirainen [Tue, 10 Nov 2020 14:33:41 +0000 (16:33 +0200)]
lib-storage: Fix assert-crash when parsing binary attachments
EOF may not have been detected in the cur_block istream early enough,
causing the calculation to go wrong. This happened at least with empty
base64 bodies, but could have possibly happened in other situations also.
Markus Valentin [Mon, 1 Feb 2021 14:38:49 +0000 (15:38 +0100)]
acl: acl_lookup_dict_rebuild_update() - Commit transaction after each [un]set
When used with Cassandra an error can occur if multiple changes are
included into one transaction: "Multiple changes in transaction not
supported". Prevent these errors by committing every change on it's
own.