Timo Sirainen [Thu, 6 Sep 2018 14:04:00 +0000 (17:04 +0300)]
global: Replace MASTER_SERVICE_FLAG_SEND_STATS with _DONT_SEND_STATS
Most services want to send statistics, so it's better to reverse the flag
behavior. Mark the few services that don't want stats with
MASTER_SERVICE_FLAG_DONT_SEND_STATS.
Timo Sirainen [Thu, 6 Sep 2018 16:48:09 +0000 (19:48 +0300)]
master: Start service processes only after adding all service listeners
Otherwise the processes could try to connect to services that aren't being
listened on, causing errors. Especially stats-writer socket needs to be
available early on.
Timo Sirainen [Fri, 31 Aug 2018 10:04:53 +0000 (13:04 +0300)]
lib: Fix matching parent categories in event filter
So far this hasn't caused problems, because parent events had been using
parent categories. However, if the parent category wasn't used by an event
or its parents, an event filter wouldn't have matched it.
Timo Sirainen [Wed, 29 Aug 2018 19:09:57 +0000 (22:09 +0300)]
lib-master, master: Initialize stats-client via environment variables
That way it's initialized before settings are read, and it can catch events
earlier. It also doesn't require all services to read settings if they
otherwise don't need them.
Phil Carmody [Wed, 29 Aug 2018 12:15:30 +0000 (15:15 +0300)]
lib-dns - struct member cleanup in dns_lookup
The index was never used anyway. Now we're using an alloconly pool,
there's no need for the dns_lookup to keep a freeable pointer to the
fields also int result.
Timo Sirainen [Fri, 14 Sep 2018 10:19:16 +0000 (13:19 +0300)]
dict-client: Avoid excessive CPU usage while waiting commands to finish
client_dict_add_timeout() adds the timeout thinking that the dict no longer
has any work to do, so it can be freed soon. However, if other work is
added before that, the timeout just keeps getting called over and over
again. This is especially bad with the default idle timeout of 0.
Timo Sirainen [Mon, 6 Aug 2018 09:39:25 +0000 (12:39 +0300)]
imap: Fix command ambiguity checking with special plugins
If the tagged line is already sent, that command can't result in ambiguity
anymore.
A cleaner fix would be to add a new _WAIT_SYNC_OUTPUT state, but that
requires all the existing code to understand that new state correctly, so it
has a higher chance of breaking something. So at least for now don't add it.
Stephan Bosch [Mon, 13 Aug 2018 17:23:31 +0000 (19:23 +0200)]
lib-http: test-http-client-errors: Make "peer reuse failure" test reliable.
It was highly timing-sensitive, since it required a particular error status to
be returned. Sometimes, it would yield a different error based on a
slightly different order of events, making the test fail. Such failures aren't
relevant though, since this regression test is about triggering a segfault that
used to occur.
Timo Sirainen [Tue, 2 Oct 2018 07:22:11 +0000 (10:22 +0300)]
lib-master: ipc-client: Don't free command too early
When multiple replies were received by IPC only the final reply should free
the command. This may have caused e.g. "doveadm proxy list" to crash.
Broken by 435f0545b200767c25a5daee17cd6b4998d03710
Timo Sirainen [Thu, 26 Apr 2018 18:07:31 +0000 (21:07 +0300)]
cassandra: Add proper log levels to logged messages
If logging to "internal handler", i.e. to log process, write the log prefix
that includes the log level. This way Cassandra's trace/debug/info messages
won't end up in error log.
Stephan Bosch [Wed, 26 Sep 2018 10:25:59 +0000 (12:25 +0200)]
lib-smtp: client: Make the initialization of the connection after SSL handshake reliable.
Before, the connection was not guaranteed to be fully initialized after the SSL
handshake. The problem would occur when the handshake finished while writing the
SSL output stream. In a similar HTTP client issue, this caused a segfault.
Stephan Bosch [Tue, 25 Sep 2018 22:26:32 +0000 (00:26 +0200)]
lib-http: client: Fix segfault by making the initialization of the connection after SSL handshake reliable.
Before, the connection was not guaranteed to be fully initialized after the SSL
handshake. The problem would occur when the handshake finished while writing the
SSL output stream.