[dovecot/core] 26bab6: dict-client: Dict server timeout may have occurred...

GitHub noreply at github.com
Wed Nov 16 10:30:13 UTC 2016


  Branch: refs/heads/master-2.2
  Home:   https://github.com/dovecot/core
  Commit: 26bab6960cd764e2083f5226c9513fa44f4041fd
      https://github.com/dovecot/core/commit/26bab6960cd764e2083f5226c9513fa44f4041fd
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib-dict/dict-client.c

  Log Message:
  -----------
  dict-client: Dict server timeout may have occurred too early.


  Commit: 80a903b6e664e56597f8876e177e5ce42125e8d8
      https://github.com/dovecot/core/commit/80a903b6e664e56597f8876e177e5ce42125e8d8
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib-dict/dict-client.c

  Log Message:
  -----------
  dict-client: Code cleanup to timeout handling.

No functional changes.


  Commit: 9eba01ece7e14c6e053f4b400faadb4dc9946421
      https://github.com/dovecot/core/commit/9eba01ece7e14c6e053f4b400faadb4dc9946421
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib-dict/dict-client.c

  Log Message:
  -----------
  dict-client: When dict-server times out, log ioloop/lock waits.


  Commit: fa542e31347718fb8ce1687ef02346616f0af4fd
      https://github.com/dovecot/core/commit/fa542e31347718fb8ce1687ef02346616f0af4fd
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib-program-client/program-client-private.h
    M src/lib-program-client/program-client.c

  Log Message:
  -----------
  lib-program-client: Do not call callback when destroying


  Commit: 15150ac3d314a512262a1a0e3d403375f005e923
      https://github.com/dovecot/core/commit/15150ac3d314a512262a1a0e3d403375f005e923
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib/istream.c

  Log Message:
  -----------
  lib: Mark istream with eof=TRUE on all errors

Previously only i_stream_read() did this, but i_stream_seek(), _stat(),
_get_size() and _create() didn't. This caused assert-crashes on error
conditions in code which assumed that when stream_errno != 0, eof==TRUE.


  Commit: 7071e573857ed73dfa9a63036aaedfeb23a8f130
      https://github.com/dovecot/core/commit/7071e573857ed73dfa9a63036aaedfeb23a8f130
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib-master/master-service.c

  Log Message:
  -----------
  lib-master: Make sure stdin/stdout/stderr fds are open.

We'll just open /dev/null for them if they don't already exist.


  Commit: fd717f41dad3d71435dbca4a05135a34ffe7accc
      https://github.com/dovecot/core/commit/fd717f41dad3d71435dbca4a05135a34ffe7accc
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/master/main.c

  Log Message:
  -----------
  master: Remove redundant check to guarantee stdin/stdout/stderr fd existence.

The previous method also wasn't correct, since it was setting close-on-exec
flag for the fds. Although this didn't normally make any difference, since
stdin & stdout was explicitly dup2()ed to /dev/null and for all except the
log process stderr was also being dup2()ed.


  Commit: 2135342de3679ddbf91448c198d36e2140c75f6d
      https://github.com/dovecot/core/commit/2135342de3679ddbf91448c198d36e2140c75f6d
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib/macros.h

  Log Message:
  -----------
  lib: Assert-crash in i_close_fd() if fd == 0

lib-master now guarantees that fd==0 doesn't normally happen.


  Commit: a2ad0219f2e3a8fcc662fc1ace299980a9d4bb87
      https://github.com/dovecot/core/commit/a2ad0219f2e3a8fcc662fc1ace299980a9d4bb87
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/doveadm/doveadm-dump-dcrypt-file.c
    M src/doveadm/doveadm-dump-dcrypt-key.c

  Log Message:
  -----------
  doveadm: Fix error reporting for doveadm-dump-dcrypt


  Commit: fd7219afaf9e827adff2d90e53d8f5b246bc66fe
      https://github.com/dovecot/core/commit/fd7219afaf9e827adff2d90e53d8f5b246bc66fe
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib/net.c
    M src/lib/net.h

  Log Message:
  -----------
  lib: Add net_ipport2str

Converts struct ip_addr + port into either
127.0.0.1:6000 or [::1]:6000.


  Commit: 03cb9435d73d12638b43c57c5b782a92c40c7f36
      https://github.com/dovecot/core/commit/03cb9435d73d12638b43c57c5b782a92c40c7f36
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/stats/Makefile.am
    M src/stats/mail-stats.c
    M src/stats/mail-stats.h
    A src/stats/stats-carbon.c
    A src/stats/stats-carbon.h
    M src/stats/stats-settings.c
    M src/stats/stats-settings.h

  Log Message:
  -----------
  stats: Add support for carbon-server

Allows admin to specify stats_carbon_server=ip:port.
Stats are delivered in "key value" format
to specified port. Can be received with e.g.
metronome.


  Commit: 81c22db21f37380ecf3ca6fcc73efe469a8eda4b
      https://github.com/dovecot/core/commit/81c22db21f37380ecf3ca6fcc73efe469a8eda4b
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/doveadm/doveadm-mail-altmove.c
    M src/doveadm/doveadm-mail-copymove.c
    M src/doveadm/doveadm-mail-deduplicate.c
    M src/doveadm/doveadm-mail-expunge.c
    M src/doveadm/doveadm-mail-fetch.c
    M src/doveadm/doveadm-mail-flags.c
    M src/doveadm/doveadm-mail-import.c
    M src/doveadm/doveadm-mail-iter.c
    M src/doveadm/doveadm-mail-iter.h
    M src/doveadm/doveadm-mail-search.c

  Log Message:
  -----------
  doveadm: Add open read-only parameter to mailbox iterator

This allows iterating mailboxes so that they
are opened for read-only.


  Commit: 41e2afac107da5db1b1405ab3fd92f8434a5d42e
      https://github.com/dovecot/core/commit/41e2afac107da5db1b1405ab3fd92f8434a5d42e
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/doveadm/doveadm-mail-import.c

  Log Message:
  -----------
  doveadm-import: Open source boxes read-only

This allows importing emails from read-only locations,
such as backups.


  Commit: 11eaa05833a7a009c50062a76c08f2b39bacd7c0
      https://github.com/dovecot/core/commit/11eaa05833a7a009c50062a76c08f2b39bacd7c0
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/doveadm/doveadm-director.c

  Log Message:
  -----------
  doveadm-director: Include tag in add line


  Commit: 43735d5b43ce467338e58b414b53d2be37534c92
      https://github.com/dovecot/core/commit/43735d5b43ce467338e58b414b53d2be37534c92
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib-storage/index/index-mailbox-size.c

  Log Message:
  -----------
  lib-storage: Add vsize hdr on empty mailbox


  Commit: ac2373f235425e0f1fe70748f0604614e9a81010
      https://github.com/dovecot/core/commit/ac2373f235425e0f1fe70748f0604614e9a81010
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/doveadm/doveadm-mail-copymove.c
    M src/doveadm/doveadm-mail-fetch.c
    M src/doveadm/doveadm-mail-flags.c

  Log Message:
  -----------
  doveadm: Put doveadm_mail_iter_init parameters to right order


  Commit: 52c43248f0f04028c1ce839c15f51e2d329915da
      https://github.com/dovecot/core/commit/52c43248f0f04028c1ce839c15f51e2d329915da
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib/ioloop-private.h
    M src/lib/ioloop.c

  Log Message:
  -----------
  lib: Fix ioloop wait times when io_loop_time_refresh() is used


  Commit: 47c7576a0d0ef8add619d5b02418ce6baca5dbb9
      https://github.com/dovecot/core/commit/47c7576a0d0ef8add619d5b02418ce6baca5dbb9
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib/ioloop.c

  Log Message:
  -----------
  lib: Code cleanup - move code to ioloop_add_wait_time()


  Commit: 4c8b67114485a33f107747bba8bff88fde8f315f
      https://github.com/dovecot/core/commit/4c8b67114485a33f107747bba8bff88fde8f315f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib/ioloop-private.h
    M src/lib/ioloop.c
    M src/lib/ioloop.h

  Log Message:
  -----------
  lib: Added io_wait_timer

This allows easier tracking of how much time the io_wait_timer has been
spending on (multiple) ioloops.


  Commit: 9b69686b499bee75726dc46b89bff29424e040f8
      https://github.com/dovecot/core/commit/9b69686b499bee75726dc46b89bff29424e040f8
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib-dict/dict-client.c

  Log Message:
  -----------
  dict-client: Use io_wait_timer for tracking wait times.

This way the "dict wait" time includes all ioloop waits that wait on the
dict-client, not just in dict_wait().


  Commit: ba72c69be5da6b703940dd53d63204dd0222194b
      https://github.com/dovecot/core/commit/ba72c69be5da6b703940dd53d63204dd0222194b
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib-http/http-client-connection.c
    M src/lib-http/http-client-private.h
    M src/lib-http/http-client-request.c

  Log Message:
  -----------
  lib-http: Use io_wait_timer for tracking wait times.

The previous code was completely incorrect, since it wasn't even tracking
the HTTP request's start usecs.


  Commit: b775f8b4306beb10c77a6035fe41aec77c014b41
      https://github.com/dovecot/core/commit/b775f8b4306beb10c77a6035fe41aec77c014b41
  Author: Apollon Oikonomopoulos <apoikos at debian.org>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M doc/example-config/conf.d/10-ssl.conf
    M src/lib-master/master-service-ssl-settings.c

  Log Message:
  -----------
  ssl: fix reference to SSLv2 and disable SSLv3

This is driven by the fact that OpenSSL 1.1 does not know about SSLv2 at
all and dovecot's defaults simply make OpenSSL error out with "Unknown
protocol 'SSLv2'"[1]. So we change the defaults to refer to SSLv2 iff OpenSSL
seems to know something about it.

While at it, it's also a good idea to disable SSLv3 by default as well.

[1] https://bugs.debian.org/844347

Signed-off-by: Apollon Oikonomopoulos <apoikos at debian.org>


  Commit: c164f8afe58c8d83ef2a48aae629c72408dfea01
      https://github.com/dovecot/core/commit/c164f8afe58c8d83ef2a48aae629c72408dfea01
  Author: Apollon Oikonomopoulos <apoikos at debian.org>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib-ssl-iostream/dovecot-openssl-common.c

  Log Message:
  -----------
  Manually cleanup OpenSSL from dovecot_openssl_common_global_unref()

OpenSSL 1.1 features a cleanup function that is automatically run on shutdown
using atexit(3). This function frees all OpenSSL-allocated resources.

In dovecot, OpenSSL is loaded indirectly using dlopen(3) against the relevant
dovecot crypto module and is finally unloaded using dlclose(3). Until
OpenSSL 1.0.1c this worked fine, however OpenSSL 1.0.1c makes sure[1] that the
library stays loaded after the initial dlclose() so that the atexit(3)
handlers can run on shutdown. This, together with the fact that dovecot
uses custom allocation functions for OpenSSL and has already partially
free()'d some of OpenSSL's resources in module_free(), leads to a
segfault at process shutdown[2].

We fix this by explicitly calling OPENSSL_cleanup() during module unload. This
is safe to do, as long as we will never want to subsequently re-initialize
OpenSSL.

[1] https://github.com/openssl/openssl/commit/4af9f7fe79ff82b90c16969b7e5871435056377b
[2] https://buildd.debian.org/status/fetch.php?pkg=dovecot&arch=amd64&ver=1:2.2.26.0-2&stamp=1478873022

Signed-off-by: Apollon Oikonomopoulos <apoikos at debian.org>


  Commit: f373f2e7bff76cae2365989e57e7a2dd33d06815
      https://github.com/dovecot/core/commit/f373f2e7bff76cae2365989e57e7a2dd33d06815
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M src/doveadm/doveadm-mail-save.c

  Log Message:
  -----------
  doveadm-save: Check stream errno before save

This is to ensure the file has been really opened.


  Commit: 17c99261a80233145aebd3dce571cf130e9f4e7a
      https://github.com/dovecot/core/commit/17c99261a80233145aebd3dce571cf130e9f4e7a
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M src/lib-index/mail-index-sync-update.c
    M src/lib/sha3.c

  Log Message:
  -----------
  Fix -Wstrict-bool compiler warnings.


  Commit: c5f651e406edd42cdb70a5062379c6840b0b1e50
      https://github.com/dovecot/core/commit/c5f651e406edd42cdb70a5062379c6840b0b1e50
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M src/lib/lib.c
    M src/lib/lib.h

  Log Message:
  -----------
  lib: Make sure stdin/stdout/stderr have fd at startup and keep /dev/null always open

This guarantees we will always have a fd that can be used as /dev/null.
It works even inside chroots.


  Commit: 2b3d98d3fa9c76cacab66486c0ba2e5134f6da32
      https://github.com/dovecot/core/commit/2b3d98d3fa9c76cacab66486c0ba2e5134f6da32
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M src/lib-master/master-service.c

  Log Message:
  -----------
  lib-master: Revert redundant stdin/stdout/stderr fd checks

This is now done by lib_init() in a bit nicer way.

Reverts 08923d2c956ece3dc604d5842ba152c2bdb11fb9


  Commit: f3fc24f545443366fca0cbeb2ece6ea7f760a93f
      https://github.com/dovecot/core/commit/f3fc24f545443366fca0cbeb2ece6ea7f760a93f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M src/master/common.h
    M src/master/main.c
    M src/master/master-settings.c

  Log Message:
  -----------
  master: Don't unlink login sockets at startup if someone is listening to them.

The original check there never worked, because null_fd was always set.

Normally the master.pid file would prevent this happening, but if it didn't
exist, the sockets would be unlinked and usually also created back.


  Commit: 2481c3013d13608e8ec9cd2d3914a0a61437d2ca
      https://github.com/dovecot/core/commit/2481c3013d13608e8ec9cd2d3914a0a61437d2ca
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M src/lib-program-client/program-client-local.c
    M src/lib/module-dir.c
    M src/master/common.h
    M src/master/main.c
    M src/master/service-process.c

  Log Message:
  -----------
  global: use dev_null_fd instead of opening /dev/null


  Commit: 58bd9504a72311e5b8b6cd6c4ff1b20ef2ee6b9f
      https://github.com/dovecot/core/commit/58bd9504a72311e5b8b6cd6c4ff1b20ef2ee6b9f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M src/lib/lib.c
    M src/lib/lib.h

  Log Message:
  -----------
  lib: Add fd_close_maybe_stdio()

The idea is that this should be used whenever closing fds that may be 0 or
1. If they are closed normally, the following code may end up using 0/1 fd
for other purposes, which could cause problems.


  Commit: d01fa63f2b72cf57947248dd3f555d6fe507e240
      https://github.com/dovecot/core/commit/d01fa63f2b72cf57947248dd3f555d6fe507e240
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M src/imap-urlauth/imap-urlauth-client.c
    M src/imap-urlauth/imap-urlauth-worker.c
    M src/imap/imap-client.c
    M src/lib/connection.c
    M src/lmtp/client.c
    M src/pop3/pop3-client.c

  Log Message:
  -----------
  global: Use fd_close_maybe_stdio()


  Commit: 3336e99e0fad2de64088206e33ded3704cb784bc
      https://github.com/dovecot/core/commit/3336e99e0fad2de64088206e33ded3704cb784bc
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M src/imap/imap-state.c

  Log Message:
  -----------
  imap: Add details why unhibernation failed

This can help understanding why client
failed to unhibernate.


Compare: https://github.com/dovecot/core/compare/22a30b5dffac...3336e99e0fad


More information about the dovecot-cvs mailing list