[dovecot/core] a64e49: director: Support flush socket

GitHub noreply at github.com
Mon Oct 24 11:30:17 UTC 2016


  Branch: refs/heads/master-2.2
  Home:   https://github.com/dovecot/core
  Commit: a64e49f98394012ccd41b80810da3c3a710b5d74
      https://github.com/dovecot/core/commit/a64e49f98394012ccd41b80810da3c3a710b5d74
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/director/Makefile.am
    M src/director/director-settings.c
    M src/director/director-settings.h
    M src/director/director.c

  Log Message:
  -----------
  director: Support flush socket

This allows specifying an URI to execute
on user kill. It can be of form
exec:/path/to/bin, unix:/path/to/socket or
tcp:ip:port

The location is sent FLUSH username-hash
per killed user. You can execute some
action there, and you are expected to
return '+\nOK\n' as reply once you are
done.


  Commit: 0b94b5ac4ce47403ba6417b4f17420d13292759f
      https://github.com/dovecot/core/commit/0b94b5ac4ce47403ba6417b4f17420d13292759f
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/director/director.c

  Log Message:
  -----------
  director: Fix crash handling director_flush_socket when user is freed.


  Commit: 4397b24216ac3cd38f9cc9ebd44ed4d3f8d1e3cb
      https://github.com/dovecot/core/commit/4397b24216ac3cd38f9cc9ebd44ed4d3f8d1e3cb
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib/ioloop.c

  Log Message:
  -----------
  lib: Ensure tv_r gets set in io_loop_get_wait_time

If this does not get reset here to 0 it can cause
errors or unpredictable behaviour in select/kqueue
polling, such as very long delays.


  Commit: 0fe6b129cd5b5ff39970cb05312163cdfb394ef6
      https://github.com/dovecot/core/commit/0fe6b129cd5b5ff39970cb05312163cdfb394ef6
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib/ioloop-kqueue.c

  Log Message:
  -----------
  lib: Fix kqueue io_loop_get_wait_time usage

The code needs to take into consideration,
when there is no IO to be waited, but possibly
there is io_set_pending used, or just timeouts.


  Commit: 676e11491a3af80dcca0eb3e43618f3917d42927
      https://github.com/dovecot/core/commit/676e11491a3af80dcca0eb3e43618f3917d42927
  Author: Aki Tuomi <aki.tuomi at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib/test-ioloop.c

  Log Message:
  -----------
  lib: Add test for ioloop fd polling


  Commit: 60ae7391ca216adb3ba69471a240b859a3be8ba4
      https://github.com/dovecot/core/commit/60ae7391ca216adb3ba69471a240b859a3be8ba4
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

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

  Log Message:
  -----------
  master: If chrooted service's core wasn't dumped, suggest to unset the chroot.


  Commit: a07d6171ae7f9bcb416f12d1bb763f0a6dd7fdab
      https://github.com/dovecot/core/commit/a07d6171ae7f9bcb416f12d1bb763f0a6dd7fdab
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib-index/mail-cache-lookup.c

  Log Message:
  -----------
  lib-index: Fix potential assert-crash when reading cache

Fixes:
Panic: file mail-cache-lookup.c: line 258 (mail_cache_lookup_iter_next): assertion failed: (ctx->offset != 0)

Broken by d33fc6c584718efd46159e1d8f46488b9dfc66f5


  Commit: 3f4795112d13f80b4aff9051f5e68060a80a69bd
      https://github.com/dovecot/core/commit/3f4795112d13f80b4aff9051f5e68060a80a69bd
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib-index/mail-cache-transaction.c

  Log Message:
  -----------
  lib-index: Fix potential error when reading from uncommitted cache transaction

If dovecot.index.cache is compressed during the transaction, the new cache
fields mapping doesn't necessarily match what is in the transaction.

Fixes:
Error: Corrupted index cache file .../dovecot.index.cache: field index too large (27 >= 17)

Although there may be other cache corruption errors it also fixes.


  Commit: 62ce1acee43b0f310f11f5134af035aa58a01451
      https://github.com/dovecot/core/commit/62ce1acee43b0f310f11f5134af035aa58a01451
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

  Changed paths:
    M src/lib/file-dotlock.c
    M src/lib/file-lock.c
    M src/lib/file-lock.h

  Log Message:
  -----------
  lib: Add FILE_LOCK_SLOW_WARNING_MSECS environment.

Log a warning if any locking takes longer than the specified number of
milliseconds. This can be enabled globally with:

import_environment = $import_environment FILE_LOCK_SLOW_WARNING_MSECS=1000


  Commit: ba356aeff8ad25e66a0e24d588b5e5649e87d233
      https://github.com/dovecot/core/commit/ba356aeff8ad25e66a0e24d588b5e5649e87d233
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

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

  Log Message:
  -----------
  lib: Added ioloop_global_wait_usecs

This is helpful when multiple ioloops aren't used and
io_loop_get_wait_usecs() can't be easily used for all of them.


  Commit: 240efa297b913351200371f56ae0d8d70d5f6f16
      https://github.com/dovecot/core/commit/240efa297b913351200371f56ae0d8d70d5f6f16
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 2016)

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

  Log Message:
  -----------
  dict-client: Fix logging how much time was spent in other ioloops in slow lookup warnings.

The warning's idea is to show why the lookup could have been slow. We
differentiate between time spent in dict_wait() waiting only for the
dict result and time spent in other ioloops waiting for potentially other
things as well (and time spent waiting for locks during this time).

The previous code didn't work right when multiple ioloops were used, which
happened sometimes.

Also changed %u to %d just in case some calculation is wrong. It's nicer to
get a slightly negative value rather than a huge positive one.


  Commit: 940795053b1818967ffc77f560fe2f2d49913b73
      https://github.com/dovecot/core/commit/940795053b1818967ffc77f560fe2f2d49913b73
  Author: Timo Sirainen <timo.sirainen at dovecot.fi>
  Date:   2016-10-24 (Mon, 24 Oct 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: Add ioloop and lock wait information to timeout messages.

It'll now log for example:
9007 Request timed out (Request sent 7.087 secs ago, 0.076 in other ioloops, 7.012 in locks, connected 7.087 secs ago)

Which points out that the problem wasn't really with the HTTP, but with
locking. This likely should be fixed in some way also in lib-http so that
it gives a bit of extra time for reading the request, but that's a separate
fix.


Compare: https://github.com/dovecot/core/compare/d6c1b8c4c328...940795053b18


More information about the dovecot-cvs mailing list