[dovecot/core] bd3f03: lib: Fix ioloop wait times when io_loop_time_refre...

GitHub noreply at github.com
Tue Nov 15 21:00:09 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/dovecot/core
  Commit: bd3f036fda5cf08d7b23e2681ecc759ad71843f5
      https://github.com/dovecot/core/commit/bd3f036fda5cf08d7b23e2681ecc759ad71843f5
  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: 3809334f938c69df473f154978204e9044840c0b
      https://github.com/dovecot/core/commit/3809334f938c69df473f154978204e9044840c0b
  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: 64f5f4f0e0c80ea8dc6f06f59e447fdf488635d0
      https://github.com/dovecot/core/commit/64f5f4f0e0c80ea8dc6f06f59e447fdf488635d0
  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: 6d5a7004a7c0b528b7ba05b2656bea80b3f2743d
      https://github.com/dovecot/core/commit/6d5a7004a7c0b528b7ba05b2656bea80b3f2743d
  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: 92f66f98f64ee3febbfba6618c4e144080d81a66
      https://github.com/dovecot/core/commit/92f66f98f64ee3febbfba6618c4e144080d81a66
  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: 7a6197f909f23febec07194a5f4c0e1f53d49cef
      https://github.com/dovecot/core/commit/7a6197f909f23febec07194a5f4c0e1f53d49cef
  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: b4884ca2e67bb794786419d9e7b6140842b03bcc
      https://github.com/dovecot/core/commit/b4884ca2e67bb794786419d9e7b6140842b03bcc
  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: ed96188c7a8b2516678f7c600728738375abb24a
      https://github.com/dovecot/core/commit/ed96188c7a8b2516678f7c600728738375abb24a
  Author: Josef 'Jeff' Sipek <jeff.sipek at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 Nov 2016)

  Changed paths:
    M src/lib/data-stack.h

  Log Message:
  -----------
  lib: fix data stack marker generation

The line number wasn't getting expanded.


  Commit: 0bff25fd39f3d1e859f71d45695f98c9a95593d8
      https://github.com/dovecot/core/commit/0bff25fd39f3d1e859f71d45695f98c9a95593d8
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-11-15 (Tue, 15 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.


Compare: https://github.com/dovecot/core/compare/2dbb7b30d9bf...0bff25fd39f3


More information about the dovecot-cvs mailing list