Stephan Bosch [Sun, 26 Oct 2014 16:43:57 +0000 (18:43 +0200)]
lib-http: server: Fixed a hang occurring sometimes when response is sent for a request that had payload.
Forgot to always trigger sending response when processing request payload
finishes.
Timo Sirainen [Sat, 25 Oct 2014 03:19:41 +0000 (06:19 +0300)]
lib-storage: LAYOUT=index now first creates the backend mailbox and only then adds it to list index.
This avoids any race conditions with mailbox creation and opening it.
Timo Sirainen [Fri, 24 Oct 2014 23:42:47 +0000 (02:42 +0300)]
auth: Some unsuccessful passdb lookups weren't returned as failures to passdb lookups.
These lookups were only being done internally, so it usually didn't matter.
Also this only affected things like allow_nets checking and some non-common
passdb { result_* } settings.
Stephan Bosch [Fri, 24 Oct 2014 22:38:42 +0000 (01:38 +0300)]
lib-http: client: Fixed cleanup of remaining waiting requests at connection destroy.
Forgot to dereference the requests for the reference that the connection
itself holds for each waiting request.
Timo Sirainen [Fri, 24 Oct 2014 00:58:35 +0000 (03:58 +0300)]
dsync: Removed in/out state from debugging.
This was initially added for debugging hangs, but those haven't existed for
a long time now. Maybe we should eventually make debug categories
configurable, but for now nobody wants to see these messages.
Timo Sirainen [Fri, 24 Oct 2014 00:54:21 +0000 (03:54 +0300)]
login proxy: If proxy_timeout is set, try to reconnect until the timeout is reached.
This allows quickly restarting/upgrading backend servers without returning
login failures.
Stephan Bosch [Thu, 23 Oct 2014 02:55:51 +0000 (05:55 +0300)]
lib-http: client: Implemented maximum for connection backoff time.
Without a maximum, the backoff time grows exponentially to enormous values,
because it isn't reset until the connection succeeds. This causes recovery
from connection failures to become very slow. Current maximum is one
minute.
Stephan Bosch [Thu, 23 Oct 2014 02:55:51 +0000 (05:55 +0300)]
lib-http: client: Assertion in http_client_queue_fail() was wrong.
It is not guaranteed that all queue lists are empty, because new requests
can be submitted from the callbacks. Changed this into a proper invariant
check, which asserts tbat the number of requests in sub-queues add up to
the total number in the main queue.
Stephan Bosch [Tue, 21 Oct 2014 20:34:50 +0000 (23:34 +0300)]
lib-http: client: If peer is unlinked from queue and no other links remain, close any pending connections.
Those pending connections would no longer serve any purpose.
Timo Sirainen [Tue, 21 Oct 2014 02:46:22 +0000 (05:46 +0300)]
lib-storage: LAYOUT=index no longer keeps list index locked while creating mailbox.
Mailbox opening can be slow and complicated and could even try to lock the
list index again. So it's a bit more racy now, but all mailbox formats can
already handle races with mailbox creation.
Stephan Bosch [Mon, 20 Oct 2014 15:54:27 +0000 (08:54 -0700)]
lib-http: client: Fixed behavior of connection backoff timer when multiple IPs are returned for hostname.
Peer backoff data was lost because peer was destroyed quickly. Now the peer
object is retained during the backoff period, so that new connection
attempts adhere to the backoff period.
Stephan Bosch [Mon, 20 Oct 2014 15:54:26 +0000 (08:54 -0700)]
lib-http: client: Fixed handling of connection timeouts.
A timeout caused an assert failure, because the connection status was
altered before the peer_connection_failure handler was called.
Timo Sirainen [Fri, 17 Oct 2014 22:55:02 +0000 (01:55 +0300)]
lib-storage: If we detect a broken cached message size, log more information about it.
Also try to include one of the cached headers in the message, which could
allow detecting if the cached data pointed to a completely different
message.
Timo Sirainen [Thu, 16 Oct 2014 15:19:03 +0000 (08:19 -0700)]
lib-storage: LAYOUT=index doesn't reserve '~' as internal separator anymore.
The index doesn't reserve any character as hierarchy separator, so the
internal separator can change at any time. Use the namespace's configured
hierarchy separator as the internal separator to avoid reserving any
characters. If namespace separator isn't configured, fallback to the
original '~' so this change shouldn't break anything.
Timo Sirainen [Wed, 15 Oct 2014 14:37:05 +0000 (07:37 -0700)]
doveconf: Allow settings plugins to print comments to the output header.
If plugin contains <plugin name>_doveconf_comment string, it's written as
part of the doveconf output. The idea mainly being that the major plugins
(such as Pigeonhole) could print their version number there to avoid having
to ask for it separately.
Timo Sirainen [Tue, 14 Oct 2014 23:57:13 +0000 (16:57 -0700)]
imap-zlib: Removed check for disallowing COMPRESS to be used with TLS compression.
Clients shouldn't be doing this in any case, and this check doesn't work
properly with proxies.
We could solve the check properly for Dovecot proxies by having them send
the TLS compression state to backends, but it would still leave non-Dovecot
proxies broken. Although we could just not advertise COMPRESS=DEFLATE
extension if TLS compression is enabled and non-Dovecot proxies at least
wouldn't cause failures. Still, overall seems like a lot of work for such a
small and probably unnecessary extra check.
Timo Sirainen [Mon, 13 Oct 2014 15:50:44 +0000 (08:50 -0700)]
lib-index: Automatically grow header size on header updates.
This fixes assert-crashes when it didn't happen.
For example an old Maildir index could have had a header size 24. Dovecot
crashed then when trying to update it, because the new header size is 36 and
there wasn't an explicit mail_index_ext_resize_hdr() call.
Stephan Bosch [Fri, 10 Oct 2014 21:43:38 +0000 (00:43 +0300)]
lib-dns: The dns_lookup() call caused a crash upon a connect error, because dns_client_disconnect() can indirectly call itself recursively.
Solved by dropping the list of lookups from the client object before the
lookups are destroyed.
Timo Sirainen [Fri, 10 Oct 2014 15:11:58 +0000 (18:11 +0300)]
maildir: Don't limit uidlist line lengths to 4096 bytes.
Although this always indicates corruption, the current code doesn't handle
that very nicely. One fix would be to just ignore such long lines, but this
is easier to implement..
Stephan Bosch [Thu, 9 Oct 2014 21:46:15 +0000 (00:46 +0300)]
lib-http: client: Fixed assert crash occurring when DNS lookup fails immediately during request submission.
In that situation, the request was not dropped from the queue immediately, triggering the assert crash.