]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
6 years agorelease 3.1.0
Tomas Krizek [Fri, 2 Nov 2018 11:42:43 +0000 (12:42 +0100)] 
release 3.1.0

6 years agoMerge branch 'ns-cycled' into 'master'
Tomas Krizek [Fri, 2 Nov 2018 15:26:56 +0000 (15:26 +0000)] 
Merge branch 'ns-cycled' into 'master'

lib/zonecut: avoid one kind of NS dependency cycles

Closes #374

See merge request knot/knot-resolver!690

6 years agolib/zonecut: verbose output tweaks
Vladimír Čunát [Thu, 1 Nov 2018 10:24:50 +0000 (11:24 +0100)] 
lib/zonecut: verbose output tweaks

6 years agovarious nitpicks around the parent commit
Vladimír Čunát [Wed, 31 Oct 2018 13:59:20 +0000 (14:59 +0100)] 
various nitpicks around the parent commit

6 years agolib/zonecut: avoid one kind of NS dependency cycles
Vladimír Čunát [Wed, 17 Oct 2018 17:00:53 +0000 (19:00 +0200)] 
lib/zonecut: avoid one kind of NS dependency cycles

The problem here was that we need to know which addresses are timed-out
(and not to be re-probed) much earlier than we do NS selection ATM -
that's because under some circumstances it affects the depth of NS
zone cut that we choose, i.e. if all addresses in a certain zone cut are
"bad" in a certain sense, we need to use a zone cut closer to the root,
because otherwise we'd get into a dependency cycle.

6 years agoMerge branch 'packaging-update' into 'master'
Tomas Krizek [Fri, 2 Nov 2018 13:50:29 +0000 (13:50 +0000)] 
Merge branch 'packaging-update' into 'master'

packaging: updates

See merge request knot/knot-resolver!676

6 years agodistro/tests: remove Fedora27
Tomas Krizek [Fri, 2 Nov 2018 12:57:16 +0000 (13:57 +0100)] 
distro/tests: remove Fedora27

6 years agodistro/tests: add Fedora29
Tomas Krizek [Fri, 2 Nov 2018 11:01:43 +0000 (12:01 +0100)] 
distro/tests: add Fedora29

6 years agodistro/tests: add openSUSE tests
Tomas Krizek [Mon, 1 Oct 2018 14:51:10 +0000 (16:51 +0200)] 
distro/tests: add openSUSE tests

6 years agodistro/tests: add Ubuntu 18.10
Tomas Krizek [Wed, 24 Oct 2018 11:45:10 +0000 (13:45 +0200)] 
distro/tests: add Ubuntu 18.10

6 years agodistro/rpm: support openSUSE
Tomas Krizek [Mon, 1 Oct 2018 12:05:49 +0000 (14:05 +0200)] 
distro/rpm: support openSUSE

6 years agodistro/deb: update libkres8.symbols
Tomas Krizek [Fri, 14 Sep 2018 12:22:06 +0000 (14:22 +0200)] 
distro/deb: update libkres8.symbols

6 years agodistro/systemd: remove obsolete section from kresd.target
Tomas Krizek [Wed, 29 Aug 2018 15:21:39 +0000 (17:21 +0200)] 
distro/systemd: remove obsolete section from kresd.target

6 years agoMerge branch 'fixup-docker' into 'master'
Tomas Krizek [Fri, 2 Nov 2018 13:32:02 +0000 (13:32 +0000)] 
Merge branch 'fixup-docker' into 'master'

lib/generic/queue: remove a ssize_t cast

See merge request knot/knot-resolver!691

6 years agolib/generic/queue: remove a ssize_t cast
Vladimír Čunát [Fri, 2 Nov 2018 11:30:32 +0000 (12:30 +0100)] 
lib/generic/queue: remove a ssize_t cast

The Alpine-based Docker image wouldn't compile.
I can't see a reason for the cast now - it's a sum of compile-time
constants, and very unlikely to overflow on changes in code or platform.

6 years agoMerge branch 'cache-clear-nitpicks' into 'master'
Petr Špaček [Wed, 31 Oct 2018 15:16:46 +0000 (15:16 +0000)] 
Merge branch 'cache-clear-nitpicks' into 'master'

cache.clear('name') edge cases

Closes #401

See merge request knot/knot-resolver!670

6 years agocache.clear('name'): fix a small GC race
Vladimír Čunát [Wed, 12 Sep 2018 06:51:50 +0000 (08:51 +0200)] 
cache.clear('name'): fix a small GC race

Thanks to Marek for noticing it.

6 years agocache.clear('name'): correct the 'not_apex" warning
Vladimír Čunát [Tue, 11 Sep 2018 14:14:07 +0000 (16:14 +0200)] 
cache.clear('name'): correct the 'not_apex" warning

It fired also when the name didn't contain the final dot.

6 years agokres.str2dname: perform lower-casing
Vladimír Čunát [Tue, 11 Sep 2018 14:07:22 +0000 (16:07 +0200)] 
kres.str2dname: perform lower-casing

We use it as relatively high-level function, often on user-input names,
so it seems suitable that it does convert the case.
This fixes cache.clear('Example.Org.'), and probably also negative trust
anchors and policy uses.

6 years agoMerge branch 'doc-tty' into 'master'
Tomas Krizek [Tue, 30 Oct 2018 15:51:21 +0000 (15:51 +0000)] 
Merge branch 'doc-tty' into 'master'

docs for daemon: better visibility for control sockets

See merge request knot/knot-resolver!682

6 years agodaemon/README.rst: add warning about net.tcp_pipeline()
Tomas Krizek [Mon, 29 Oct 2018 15:18:56 +0000 (16:18 +0100)] 
daemon/README.rst: add warning about net.tcp_pipeline()

6 years agodaemon/README.rst: split systemd integration into appropriate sections
Tomas Krizek [Mon, 29 Oct 2018 14:10:57 +0000 (15:10 +0100)] 
daemon/README.rst: split systemd integration into appropriate sections

6 years agodaemon/README.rst: fix spelling erros
Tomas Krizek [Tue, 23 Oct 2018 14:28:47 +0000 (16:28 +0200)] 
daemon/README.rst: fix spelling erros

6 years agodaemon/README.rst: update doc with systemd integration info
Tomas Krizek [Tue, 23 Oct 2018 14:21:34 +0000 (16:21 +0200)] 
daemon/README.rst: update doc with systemd integration info

6 years agodocs for daemon: better visibility for control sockets
Vladimír Čunát [Fri, 12 Oct 2018 12:18:43 +0000 (14:18 +0200)] 
docs for daemon: better visibility for control sockets

- promote the part into a section
- move it right after the section about interactive CLI
- minor reformulations, location of the sockets, etc.
- fix location of the daemon-supervised anchor

7 years agoMerge branch 'task_step_split' into 'master'
Petr Špaček [Wed, 24 Oct 2018 15:49:09 +0000 (15:49 +0000)] 
Merge branch 'task_step_split' into 'master'

daemon/worker: minor refactoring of qr_task_step

See merge request knot/knot-resolver!687

7 years agodaemon/worker: minor refactoring of qr_task_step
Grigorii Demidov [Tue, 23 Oct 2018 12:40:14 +0000 (14:40 +0200)] 
daemon/worker: minor refactoring of qr_task_step

7 years agoMerge branch 'tcp-incom-timeout' into 'master'
Grigorii Demidov [Mon, 22 Oct 2018 14:55:41 +0000 (14:55 +0000)] 
Merge branch 'tcp-incom-timeout' into 'master'

daemon: changes in TCP connection timeouting

See merge request knot/knot-resolver!686

7 years agodaemon: TCP connection timeouting has changed; connection was closed after peer's...
Grigorii Demidov [Mon, 22 Oct 2018 08:48:51 +0000 (10:48 +0200)] 
daemon: TCP connection timeouting has changed; connection was closed after peer's inactivity before, now it is closed after incativity in both directions (peer->kresd, kresd->peer); prevents connection from closing before answer sent to client

7 years agoMerge !681: various nitpicks, see commits for details
Vladimír Čunát [Tue, 16 Oct 2018 14:38:03 +0000 (14:38 +0000)] 
Merge !681: various nitpicks, see commits for details

7 years agocache: avoid some crashes
Vladimír Čunát [Wed, 10 Oct 2018 15:00:07 +0000 (17:00 +0200)] 
cache: avoid some crashes

It's actually possible to start queries without any cache open,
e.g. add `resolve('.', kres.type.DNSKEY)` into your configuration.
If that happens, avoid the cache module dereferencing a NULL pointer.

7 years agotrie docs nitpick
Vladimír Čunát [Fri, 5 Oct 2018 14:36:10 +0000 (16:36 +0200)] 
trie docs nitpick

7 years agotrie_it nitpick: reduce the initial stack size
Vladimír Čunát [Wed, 19 Sep 2018 14:57:24 +0000 (16:57 +0200)] 
trie_it nitpick: reduce the initial stack size

Using 2kB as start is a bit too much, and it was showing as 0.5% CPU
on malloc() called during trie_it_begin().  Let's start at 0.5 kB,
as it can grow anyway (only negligible in profile now).

7 years agodoc: fix a typo :-)
Vladimír Čunát [Fri, 14 Sep 2018 11:02:56 +0000 (13:02 +0200)] 
doc: fix a typo :-)

7 years agoMerge branch 'respdiff-tls-256' into 'master'
Tomas Krizek [Tue, 16 Oct 2018 10:33:20 +0000 (10:33 +0000)] 
Merge branch 'respdiff-tls-256' into 'master'

ci: use 256 jobs for TLS forward test

See merge request knot/knot-resolver!683

7 years agoci: use 256 jobs for TLS forward test
Tomas Krizek [Tue, 16 Oct 2018 10:28:11 +0000 (12:28 +0200)] 
ci: use 256 jobs for TLS forward test

7 years agoMerge !675: daemon: first part of refactoring
Vladimír Čunát [Mon, 15 Oct 2018 13:08:38 +0000 (13:08 +0000)] 
Merge !675: daemon: first part of refactoring

- mainly the daemon/session.* files are separated,
  moving lots of logic from daemon/worker.*;
- lib/generic/queue.* are added;
- verbose logging gets different IDs;
- various minor changes around.

7 years agodaemon/worker: delete unused field in qr_task
Grigorii Demidov [Mon, 15 Oct 2018 09:28:07 +0000 (11:28 +0200)] 
daemon/worker: delete unused field in qr_task

7 years agodoc: add missing link to queue
Vladimír Čunát [Mon, 15 Oct 2018 09:24:26 +0000 (11:24 +0200)] 
doc: add missing link to queue

7 years agodaemon/session.c nitpick: add missing copyright header
Vladimír Čunát [Fri, 12 Oct 2018 16:01:00 +0000 (18:01 +0200)] 
daemon/session.c nitpick: add missing copyright header

7 years agoUnificate handling of TCP timeouts for input and output connections; avoid redundant...
Grigorii Demidov [Thu, 11 Oct 2018 15:30:10 +0000 (17:30 +0200)] 
Unificate handling of TCP timeouts for input and output connections; avoid redundant code; bugfixing

7 years agolib/generic/queue: add iterators
Vladimír Čunát [Wed, 10 Oct 2018 11:24:35 +0000 (13:24 +0200)] 
lib/generic/queue: add iterators

The typing around queue_it_begin() isn't ideal,
but I'm unable to come with anything better.
I'm really missing generics for these things.

7 years agotests_trie: detect the bug fixed in the parent commit
Vladimír Čunát [Tue, 9 Oct 2018 13:44:30 +0000 (15:44 +0200)] 
tests_trie: detect the bug fixed in the parent commit

7 years agotrie_get_leq(): fix confusion in char signedness in keys
Vladimír Čunát [Tue, 9 Oct 2018 13:09:44 +0000 (15:09 +0200)] 
trie_get_leq(): fix confusion in char signedness in keys

7 years agologging ID nitpicks
Vladimír Čunát [Tue, 9 Oct 2018 09:38:55 +0000 (11:38 +0200)] 
logging ID nitpicks

- align the numbers to 5+2 digits (pad with zeros), and use unsigned
- add numbers for the '(NOT) classified as SECURE' message

7 years agodaemon, lib: use query uid in log instead of msg id
Grigorii Demidov [Mon, 8 Oct 2018 14:45:55 +0000 (16:45 +0200)] 
daemon, lib: use query uid in log instead of msg id

7 years agodaemon/session nitpick: avoid a warning
Vladimír Čunát [Thu, 4 Oct 2018 12:43:54 +0000 (14:43 +0200)] 
daemon/session nitpick: avoid a warning

lint:clang-scan-build reported:
> warning: The code calls sizeof() on a pointer type.
> This can produce an unexpected result
but in our case it's intentional.
(Yes, using pointers as keys in trie isn't very pretty.)

7 years agodaemon/worker nitpick: revert stats.dropped accounting
Vladimír Čunát [Thu, 4 Oct 2018 09:55:59 +0000 (11:55 +0200)] 
daemon/worker nitpick: revert stats.dropped accounting

Only count incoming requests into this,
as before "some simplifications" commit.

7 years agodaemon/worker: avoid usage of qr_tasklist in struct request_ctx as it is redundant...
Grigorii Demidov [Thu, 4 Oct 2018 12:24:46 +0000 (14:24 +0200)] 
daemon/worker: avoid usage of qr_tasklist in struct request_ctx as it is redundant; use direct pointer to task instead

7 years agodaemon: bugfixes & improvements
Grigorii Demidov [Wed, 3 Oct 2018 12:48:23 +0000 (14:48 +0200)] 
daemon: bugfixes & improvements

7 years agodaemon/session: migrate from array_t to trie_t & queue_t; daemon/worker: some simplif...
Grigorii Demidov [Thu, 27 Sep 2018 14:56:02 +0000 (16:56 +0200)] 
daemon/session: migrate from array_t to trie_t & queue_t; daemon/worker: some simplifications

7 years agolib/generic/trie: add some tests
Vladimír Čunát [Tue, 25 Sep 2018 10:50:55 +0000 (12:50 +0200)] 
lib/generic/trie: add some tests

There are some (other) tests in knot-dns repo,
but having some more shouldn't hurt, especially as
we've added some new functions now.

7 years agolib/generic/queue: add some tests
Vladimír Čunát [Tue, 25 Sep 2018 10:37:45 +0000 (12:37 +0200)] 
lib/generic/queue: add some tests

7 years agolib/generic/queue: a new efficient structure
Vladimír Čunát [Fri, 21 Sep 2018 18:33:31 +0000 (20:33 +0200)] 
lib/generic/queue: a new efficient structure

It's focused on FIFO queue usage.

FIXME: unit tests

7 years agolib/generic/lru: doc nitpicks
Vladimír Čunát [Mon, 24 Sep 2018 15:16:36 +0000 (17:16 +0200)] 
lib/generic/lru: doc nitpicks

7 years agolib/generic/trie: doc nitpick, bump copyright years
Vladimír Čunát [Mon, 24 Sep 2018 14:37:36 +0000 (16:37 +0200)] 
lib/generic/trie: doc nitpick, bump copyright years

7 years agotrie_get_first(), trie_del_first(): new API
Vladimír Čunát [Fri, 21 Sep 2018 14:10:35 +0000 (16:10 +0200)] 
trie_get_first(), trie_del_first(): new API

This prompted a slight reorganization inside trie.c

7 years agotests/deckard: sync to master
Grigorii Demidov [Thu, 20 Sep 2018 15:47:06 +0000 (17:47 +0200)] 
tests/deckard: sync to master

7 years agodaemon/session: fixes for bugs revealed by transport tests
Grigorii Demidov [Thu, 20 Sep 2018 13:01:44 +0000 (15:01 +0200)] 
daemon/session: fixes for bugs revealed by transport tests

7 years agodaemon/session: combine _new() and _set_handle()
Vladimír Čunát [Wed, 19 Sep 2018 18:58:56 +0000 (20:58 +0200)] 
daemon/session: combine _new() and _set_handle()

They don't seem to be useful individually, so why not clean up.

7 years agodaemon nitpick cleanups
Vladimír Čunát [Wed, 19 Sep 2018 18:50:29 +0000 (20:50 +0200)] 
daemon nitpick cleanups

- Some (potentially) unused vars were left behind.
- The two on_* functions are identical except for the uv types passed,
  and those are surely the same in the part we use, but it's not worth
  to deduplicate when these functions are only two and so simple.
- lint:c was complaining about the uv_tcp_t malloc().

7 years agodaemon/engine: move defines from header to respective *.c
Vladimír Čunát [Wed, 19 Sep 2018 18:29:00 +0000 (20:29 +0200)] 
daemon/engine: move defines from header to respective *.c

Also don't allocate much memory for cookies if we compile them out.

7 years agodaemon: drop RECVMMSG_BATCH
Vladimír Čunát [Wed, 19 Sep 2018 18:05:08 +0000 (20:05 +0200)] 
daemon: drop RECVMMSG_BATCH

The support hasn't landed in libuv over all the years,
and we've been still reserving memory for it in advance.
Also comment on the singleton buffer usage.

7 years agoworker: safer code around the mempool freelist
Vladimír Čunát [Wed, 19 Sep 2018 17:39:26 +0000 (19:39 +0200)] 
worker: safer code around the mempool freelist

I did NOT remove this one, as in a quick profile that would be
increase in roughly 0.5% time in malloc, so that's possibly justifiable.
(And this one is much less obstructing to splitting the worker code.)

7 years agoworker: remove freelist for struct session
Vladimír Čunát [Wed, 19 Sep 2018 17:14:40 +0000 (19:14 +0200)] 
worker: remove freelist for struct session

See the message in parent commit.

7 years agoworker: remove freelists for iohandle and iorequest
Vladimír Čunát [Wed, 19 Sep 2018 16:39:17 +0000 (18:39 +0200)] 
worker: remove freelists for iohandle and iorequest

A quick profiling showed no change in performance,
and in particular no change in time spent in malloc/free.
Some of the types in the union differed in size by a multiple.

If their performance won't be satisfying, replacements should be
considered first (e.g. jemalloc) before rolling our own stuff.

7 years agodaemon: minor worker initialization fix
Grigorii Demidov [Wed, 19 Sep 2018 16:43:05 +0000 (18:43 +0200)] 
daemon: minor worker initialization fix

7 years agodaemon/session: minor refactoring around session flags to reduce number of api functions
Grigorii Demidov [Wed, 19 Sep 2018 12:39:39 +0000 (14:39 +0200)] 
daemon/session: minor refactoring around session flags to reduce number of api functions

7 years agosession_kill_ioreq(): worker.c -> session.c
Vladimír Čunát [Tue, 18 Sep 2018 12:26:26 +0000 (14:26 +0200)] 
session_kill_ioreq(): worker.c -> session.c

7 years agodaemon: fix memory leaks & asan errors; improvements in buffering
Grigorii Demidov [Tue, 18 Sep 2018 15:51:33 +0000 (17:51 +0200)] 
daemon: fix memory leaks & asan errors; improvements in buffering

7 years agodamon/session: additional processing for DNS packets with TSIG
Grigorii Demidov [Mon, 17 Sep 2018 13:18:32 +0000 (15:18 +0200)] 
damon/session: additional processing for DNS packets with TSIG

7 years agodamon/worker: fix rtt computing
Grigorii Demidov [Mon, 17 Sep 2018 11:34:12 +0000 (13:34 +0200)] 
damon/worker: fix rtt computing

7 years agodemon: fix lint errors
Grigorii Demidov [Mon, 17 Sep 2018 10:21:08 +0000 (12:21 +0200)] 
demon: fix lint errors

7 years agodaemon: fix clang errors
Grigorii Demidov [Mon, 17 Sep 2018 09:11:48 +0000 (11:11 +0200)] 
daemon: fix clang errors

7 years agodaemon: fix rebase errors
Grigorii Demidov [Mon, 17 Sep 2018 08:51:25 +0000 (10:51 +0200)] 
daemon: fix rebase errors

7 years agodaemon: fix timeout timer for outcoming TCP connection
Grigorii Demidov [Fri, 14 Sep 2018 15:36:08 +0000 (17:36 +0200)] 
daemon: fix timeout timer for outcoming TCP connection

7 years agodaemon/worker: fix memory leaks
Grigorii Demidov [Fri, 14 Sep 2018 13:28:15 +0000 (15:28 +0200)] 
daemon/worker: fix memory leaks

7 years agodaemon: logic around struct session was relocated to separate module; input data...
Grigorii Demidov [Thu, 13 Sep 2018 15:28:23 +0000 (17:28 +0200)] 
daemon: logic around struct session was relocated to separate module; input data buffering scheme was changed (libuv); attempt was made to simplify processing of the stream

7 years agoMerge !680: hints.use_nodata(true) by default
Vladimír Čunát [Wed, 10 Oct 2018 14:59:02 +0000 (14:59 +0000)] 
Merge !680: hints.use_nodata(true) by default

7 years agohints.use_nodata(true) by default
Vladimír Čunát [Thu, 4 Oct 2018 11:37:30 +0000 (13:37 +0200)] 
hints.use_nodata(true) by default

I believe that's what most users want; practical motivation:
https://forum.turris.cz/t/kresd-responds-to-hints-with-nxdomain-for-aaaa-requests/8353

7 years agoMerge !679: docs: warn about net wildcard #173
Vladimír Čunát [Thu, 20 Sep 2018 13:37:10 +0000 (13:37 +0000)] 
Merge !679: docs: warn about net wildcard #173

7 years agodocs: avoid net wildcard
Robert Šefr [Wed, 19 Sep 2018 08:21:19 +0000 (10:21 +0200)] 
docs: avoid net wildcard

(vcunat modified the wording slightly)

7 years agoMerge !677: main: locally disable a gcc warning since !672
Vladimír Čunát [Mon, 17 Sep 2018 11:08:29 +0000 (11:08 +0000)] 
Merge !677: main: locally disable a gcc warning since !672

7 years agomain: locally disable a gcc warning since !672
Vladimír Čunát [Mon, 17 Sep 2018 10:24:36 +0000 (12:24 +0200)] 
main: locally disable a gcc warning since !672

I see no use to handle write() return codes in *this* function.

7 years agoMerge !674: ci: add resperf ASAN tests
Vladimír Čunát [Fri, 14 Sep 2018 13:27:49 +0000 (13:27 +0000)] 
Merge !674: ci: add resperf ASAN tests

Closes #255.

7 years agoci: add resperf ASAN tests
Tomas Krizek [Thu, 13 Sep 2018 11:16:35 +0000 (13:16 +0200)] 
ci: add resperf ASAN tests

Closes #255

7 years agoci: don't run coverage for security repo
Tomas Krizek [Thu, 13 Sep 2018 10:29:42 +0000 (12:29 +0200)] 
ci: don't run coverage for security repo

7 years agoci: make CI behaviour consistent for security repo
Tomas Krizek [Thu, 13 Sep 2018 10:29:03 +0000 (12:29 +0200)] 
ci: make CI behaviour consistent for security repo

7 years agoMerge branch 'tls-clouflare-bugfix' into 'master'
Grigorii Demidov [Fri, 14 Sep 2018 13:22:12 +0000 (13:22 +0000)] 
Merge branch 'tls-clouflare-bugfix' into 'master'

daemon/worker: fixes error handling from TLS writes

See merge request knot/knot-resolver!669

7 years agomisc nitpicks
Vladimír Čunát [Fri, 14 Sep 2018 08:21:43 +0000 (10:21 +0200)] 
misc nitpicks

- \param family, esp. don't rely on AF_UNSPEC being zero
- kres_gnutls_vec_push(): don't uv_write() if ENOMEM
- tls_client_params_clear(): remove unused function

7 years agodaemon: fix errors introduced by cherrypicking
Grigorii Demidov [Wed, 12 Sep 2018 09:30:55 +0000 (11:30 +0200)] 
daemon: fix errors introduced by cherrypicking

7 years agodaemon: fixes for CI errors and warnings
Grigorii Demidov [Tue, 11 Sep 2018 13:17:52 +0000 (15:17 +0200)] 
daemon: fixes for CI errors and warnings

7 years agodaemon/worker: fixes error handling from TLS writes
Marek Vavruša [Fri, 17 Aug 2018 07:43:36 +0000 (00:43 -0700)] 
daemon/worker: fixes error handling from TLS writes

The error handling loop for uncorking TLS data was wrong, as the
underlying push function is asynchronous and there's no relationship
between completed DNS packet writes and number of TLS message writes.
In case of the asynchronous function, the buffered data must be valid
until the write is complete, currently this is not guaranteed and
loading the resolver with pipelined requests results in memory errors:

```
$ getdns_query @127.0.0.1#853 -s -a -s -l L -B -F queries -q
...
==47111==ERROR: AddressSanitizer: heap-use-after-free on address 0x6290040a1253 at pc 0x00010da960d3 bp 0x7ffee2628b30 sp 0x7ffee26282e0
READ of size 499 at 0x6290040a1253 thread T0
    #0 0x10da960d2 in wrap_write (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1f0d2)
    #1 0x10d855971 in uv__write (libuv.1.dylib:x86_64+0xf971)
    #2 0x10d85422e in uv__stream_io (libuv.1.dylib:x86_64+0xe22e)
    #3 0x10d85b35a in uv__io_poll (libuv.1.dylib:x86_64+0x1535a)
    #4 0x10d84c644 in uv_run (libuv.1.dylib:x86_64+0x6644)
    #5 0x10d602ddf in main main.c:422
    #6 0x7fff6a28a014 in start (libdyld.dylib:x86_64+0x1014)

0x6290040a1253 is located 83 bytes inside of 16895-byte region [0x6290040a1200,0x6290040a53ff)
freed by thread T0 here:
    #0 0x10dacdfdd in wrap_free (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56fdd)
    #1 0x10d913c2e in _mbuffer_head_remove_bytes (libgnutls.30.dylib:x86_64+0xbc2e)
    #2 0x10d915080 in _gnutls_io_write_flush (libgnutls.30.dylib:x86_64+0xd080)
    #3 0x10d90ca18 in _gnutls_send_tlen_int (libgnutls.30.dylib:x86_64+0x4a18)
    #4 0x10d90edde in gnutls_record_send2 (libgnutls.30.dylib:x86_64+0x6dde)
    #5 0x10d90f085 in gnutls_record_uncork (libgnutls.30.dylib:x86_64+0x7085)
    #6 0x10d5f6569 in tls_push tls.c:238
    #7 0x10d5e5b2a in qr_task_send worker.c:1002
    #8 0x10d5e2ea6 in qr_task_finalize worker.c:1562
    #9 0x10d5dab99 in qr_task_step worker.c
    #10 0x10d5e12fe in worker_process_tcp worker.c:2410
```

The current implementation adds opportunistic uv_try_write which
either writes the requested data, or returns UV_EAGAIN or an error,
which then falls back to slower asynchronous write that copies the buffered data.

The function signature is changed from simple write to vectorized write.

This also enables TLS False Start to save 1RTT when possible.

7 years agoMerge branch 'cache-sigbus' into 'master'
Petr Špaček [Fri, 14 Sep 2018 08:03:54 +0000 (08:03 +0000)] 
Merge branch 'cache-sigbus' into 'master'

cache: improve out-of-disk condition

Closes #197

See merge request knot/knot-resolver!672

7 years agocache: improve out-of-disk condition
Vladimír Čunát [Wed, 12 Sep 2018 12:59:46 +0000 (14:59 +0200)] 
cache: improve out-of-disk condition

When suspect SIGBUS happens, print helpful error and try to remove
the cache, so that the service might work again if auto-restarted.
Theoretically we could longjmp() out of the SIGBUS handler,
but that would be rather messy, so let the process die.

7 years agoMerge !668: cache tests: don't fail with KEYFILE_DEFAULT
Vladimír Čunát [Wed, 12 Sep 2018 13:15:54 +0000 (13:15 +0000)] 
Merge !668: cache tests: don't fail with KEYFILE_DEFAULT

Fixes #398.

7 years agocache tests: don't fail with KEYFILE_DEFAULT
Vladimír Čunát [Tue, 11 Sep 2018 13:38:07 +0000 (15:38 +0200)] 
cache tests: don't fail with KEYFILE_DEFAULT

7 years agoMerge branch 'ci-respdiff-logs' into 'master'
Tomas Krizek [Wed, 12 Sep 2018 11:14:33 +0000 (11:14 +0000)] 
Merge branch 'ci-respdiff-logs' into 'master'

ci: respdiff logs

See merge request knot/knot-resolver!671

7 years agoci: respdiff remove default argument
Tomas Krizek [Wed, 12 Sep 2018 09:48:47 +0000 (11:48 +0200)] 
ci: respdiff remove default argument

7 years agoci: respdiff -display stderr log on failure
Tomas Krizek [Wed, 12 Sep 2018 09:44:51 +0000 (11:44 +0200)] 
ci: respdiff -display stderr log on failure