diff options
author | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2023-02-06 15:27:07 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-16 08:44:01 +0000 |
commit | 0cc11596c14bbb4f7dde3b45581065fcd5ec7ca1 (patch) | |
tree | be834de32bb7b8930d0243469cd7a76172904926 | |
parent | f6b1bf3c96c2bbfcbcfa390f927d100620543987 (diff) |
Work around glibc bug in our mdns resolution
glibc has a system where, if it fails to perform Happy Eyeballs host
name resolution in parallel, it will do it sequentially.
We triggered this because our docker setup was not responding to
systemd-resolved's AAAA queries over IPv6.
The bug in glibc was then that it would poll for 4999ms after sending
the first of the two queries. __Every time__ we do mdns host lookup.
In tst_QTcpSocket this happens multiple times in ::initTestCase for the
proxy global-datatags. That means we would be stuck polling for
4999ms*5 (number of proxy addresses to look up) before every test-case
that would use proxy (even if the test just does a return in the
proxy-case). Plus another 4999ms for any mdns lookup we would need to
perform during the test.
This led to the test severely slowing down and timing out quite often.
Work around this by doing full mDNS before trying DNS.
This will let us resolve multi-label mDNS addresses.
Fixes: QTBUG-107696
Change-Id: I26c6b356b4c9712f4ac6d3613998ee448c0ca504
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
(cherry picked from commit 5c6814fb18760f65bab0f8b9cd623ee5c874a58d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rwxr-xr-x | coin/provisioning/qtci-linux-Ubuntu-20.04-x86_64/81-fix_mdns_docker_resolution.sh | 2 | ||||
-rwxr-xr-x | coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/81-fix_mdns_docker_resolution.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/coin/provisioning/qtci-linux-Ubuntu-20.04-x86_64/81-fix_mdns_docker_resolution.sh b/coin/provisioning/qtci-linux-Ubuntu-20.04-x86_64/81-fix_mdns_docker_resolution.sh index d9324780..4e8308bd 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-20.04-x86_64/81-fix_mdns_docker_resolution.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-20.04-x86_64/81-fix_mdns_docker_resolution.sh @@ -10,4 +10,4 @@ cat <<EOT | sudo tee /etc/mdns.allow .local EOT -sudo sed -i '/^hosts:/s/.*/hosts: files mdns_minimal [NOTFOUND=return] dns mdns4/' /etc/nsswitch.conf +sudo sed -i '/^hosts:/s/.*/hosts: files mdns_minimal [NOTFOUND=return] mdns4 dns/' /etc/nsswitch.conf diff --git a/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/81-fix_mdns_docker_resolution.sh b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/81-fix_mdns_docker_resolution.sh index 5d08bc09..84892bca 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/81-fix_mdns_docker_resolution.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-22.04-x86_64/81-fix_mdns_docker_resolution.sh @@ -48,4 +48,4 @@ cat <<EOT | sudo tee /etc/mdns.allow .local EOT -sudo sed -i '/^hosts:/s/.*/hosts: files mdns_minimal [NOTFOUND=return] dns mdns4/' /etc/nsswitch.conf +sudo sed -i '/^hosts:/s/.*/hosts: files mdns_minimal [NOTFOUND=return] mdns4 dns/' /etc/nsswitch.conf |