Commit Graph

2776 Commits

Author SHA1 Message Date
Eli Lindsey 4e0e2ee1f5 register only a single poll_t with libuv
Most of the time we only need a read _or_ a write callback registered
with libuv - for example, on a UDP request a write callback is
registered, when executed the write callback performs the write,
deregisters itself, and registers a read callback.

However there is one case where getdns registers both read and write
callbacks: when a backlog of TCP requests is going to the same upstream
resolver, we use a single fd and queue the requests. In this instance we
want to listen for both read (to get responses for requests we've
already sent) and write (to continue to send our pending requests).

libuv, like most event libraries, only allows one callback to be
registered per fd. To get notification for both reads and writes, you
should examine the event flags and have appropriate conditional logic
within the single callback. Today getdns incorrectly tries to register
two separate poll_t with libuv, one for read and one for write - this
results in a crash (internal libuv assertion guaranteeing that only a
single poll_t is registered per fd).

This was tested by building locally, creating an ALIAS to a domain known
to have large responses that truncate (forcing TCP), running trex with
--resolver-cache-size 0, and flaming at 10qps. Previously this would
crash within the first couple of seconds, now it works indefinitely.

Note that a higher qps trigger a _different_ getdns/libuv crashing bug
that occurs when the TCP backlog grows so large that requests start to
time out. That crash is not addressed in this PR.
2020-06-18 13:32:57 -04:00
Willem Toorop e481273ff4 Last minute update 2018-05-11 13:20:08 +02:00
wtoorop 0510fb00d3
Merge pull request #397 from ehmry/tcp_sendto
No TCP sendto without TCP_FASTOPEN
2018-05-11 12:04:49 +01:00
wtoorop 7fe45a7012
Merge pull request #396 from saradickinson/bugfix/windows_certs
Temporary fix for https://github.com/getdnsapi/stubby/issues/87. Dete…
2018-05-11 11:51:33 +01:00
Willem Toorop 0d283fc63f 1.4.2 release 2018-05-11 12:02:49 +02:00
Willem Toorop 48e0ea013c Include Stubby - v0.2.3 release 2018-05-11 11:56:00 +02:00
Willem Toorop 6c99e7b8a6 Bugfix getdnsapi/stubby#106: Core dump when ...
printing certain configuration. Thanks Han Vinke
2018-05-11 11:28:52 +02:00
Willem Toorop 98b1ff624a Memory loss with empty string bindata's 2018-05-11 11:23:19 +02:00
Emery Hemingway a6ec2b2449 No TCP sendto without TCP_FASTOPEN 2018-05-08 14:58:17 +02:00
Willem Toorop 5a816f3d51 Include systemd and contrib dir with stubby 2018-05-04 15:29:14 +02:00
Willem Toorop 9d48f1cf97 Update Stubby 2018-05-04 15:21:05 +02:00
Willem Toorop 9b7999ecf2 Update stubby 2018-05-04 15:19:33 +02:00
Willem Toorop 7331717990 Fix for Fallback to current (working) directory (for appdata_dir). 2018-05-04 15:30:27 +02:00
Willem Toorop 7e2a896410 Update stubby 2018-05-04 11:28:09 +02:00
Willem Toorop 99bfe4a287 Fallback to current (working) directory (for appdata_dir).
To improve integration with system and service managers like systemd
See also getdnsapi/stubby#106
2018-05-04 10:40:49 +02:00
Willem Toorop caab2e8592 Bump versions and include release/0.2.3 Stubby release branch 2018-05-03 17:21:58 +02:00
Willem Toorop 23d2affebf More ChangeLog entries 2018-05-03 15:14:12 +02:00
Willem Toorop 2a110043da Just some notes about packages 2018-05-03 14:35:01 +02:00
Willem Toorop 3c355d425b Warnings are errors :( 2018-05-03 12:15:48 +02:00
Willem Toorop 101d602739 Travis output showed it was a bracket issue 2018-05-03 11:48:07 +02:00
Willem Toorop de7f007bf3 Without dl_iterate_phdr for now... 2018-05-03 11:40:44 +02:00
Willem Toorop f5c588c955 Need _GNU_SOURCE before config.h 2018-05-03 11:30:28 +02:00
Willem Toorop f0f101511b _GNU_SOURCE needed for struct dl_phdr_info from link.h 2018-05-03 11:21:11 +02:00
Willem Toorop 4f050facc3 Bugfix #394: Update src/compat/getentropy_linux.c
in order to handle ENOSYS (not implemented) fallback.
Thanks Brent Blood
2018-05-02 14:32:12 +02:00
Willem Toorop 6c075e2ad8 Bugfix #395 : Clarify that libidn2 dependency is for version 2.0.0 or higher 2018-05-02 14:01:00 +02:00
Willem Toorop 9c01968048 DS and DNSKEY lookups for tld and sld immediately
Resolves issue getdnsapi/stubby#99
2018-05-01 17:07:16 +02:00
Willem Toorop 7fecf5a93d Allow NSEC spans starting from (unexpanded) wildcards 2018-05-01 13:19:24 +02:00
Willem Toorop a834d32718 Fix negative reversed IPv4 test
which assumes 1.1.1.1.in-addr.arpa does not exist
2018-04-23 14:05:02 +02:00
Willem Toorop 1b5b0ca799 Force trailing '\0' with string config settings
Because even though it is added when parsing from JSON, it will be lost when the bindata is copied into a dict with getdns_dict_set_bindata.
2018-04-23 15:11:20 +02:00
saradickinson ced112ca74 Temporary fix for https://github.com/getdnsapi/stubby/issues/87. Detect and ignore duplicate certs in the root store. 2018-04-05 18:35:07 +01:00
Willem Toorop 81ea235d50 Merge branch 'release/1.4.1' into develop 2018-03-12 12:25:25 +01:00
Willem Toorop 75f59b9dfc Bump version 2018-03-12 12:05:09 +01:00
Willem Toorop 3d2ac4c16c Change git source for yxml submodule
Resolved issue getdnsapi/stubby#84
2018-03-09 11:37:37 +01:00
Willem Toorop ef0a77e061 Forgot the dash before the rc1 again 2018-03-05 16:34:50 +01:00
Willem Toorop 7548b095bc Doxygen fixes 2018-03-05 16:12:49 +01:00
Willem Toorop 1e9a7849de Spelling corrections in the spec 2018-03-05 16:08:00 +01:00
Willem Toorop 06e1c741e8 PR #387: Compile with OpenSSL with deprecated APIs disabled.
Thanks Rosen Penev
2018-03-05 15:40:16 +01:00
Willem Toorop 1bc056ee70 PR #386 in ChangeLog 2018-03-05 12:47:51 +01:00
Willem Toorop c45b3ed9db Merge branch 'release/1.4.1-max_udp_backoff_value' into release/1.4.1 2018-03-05 12:43:32 +01:00
Willem Toorop 8a2fc5f5a9 max_udp_backoff should not be public
At least, not with this point release
2018-03-05 12:42:27 +01:00
Robert Groenenberg eec6ec29dd [UDP] try upstreams in round-robin fashion when all yupstreams have failed 2018-03-05 12:03:20 +01:00
Robert Groenenberg f787c87137 Reset back_off on successful query 2018-03-05 12:02:01 +01:00
Robert Groenenberg a0fb2c8424 Limit back_off value to avoid very long retry interval 2018-03-05 12:01:52 +01:00
Willem Toorop d1aa3922fe Bugfix #388 2018-03-05 11:53:03 +01:00
Willem Toorop fd5e0cdc02 Merge branch 'bugfix/388-endless-fallback-loop' into release/1.4.1 2018-03-05 11:52:36 +01:00
Willem Toorop 9da06230d9 DNSSEC issues from PR #389 2018-03-05 11:51:31 +01:00
Willem Toorop e93b583a26 Merge branch 'devel/dnssec_issues' into release/1.4.1 2018-03-05 11:41:55 +01:00
Willem Toorop 1dd5f4dc16 PR #384: Fix minor spelling and formatting. Thanks dkg 2018-03-05 11:34:32 +01:00
Willem Toorop c057ca52e4 Merge remote-tracking branch 'dkg/spelling' into release/1.4.1 2018-03-05 11:30:33 +01:00
Willem Toorop bedc4ba0bb Bugfix #382: Parallel install of getdns_query and getdns_server_mon 2018-03-05 11:30:18 +01:00