This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ssbarnea
Recipients James Crowther, ghickman, ned.deily, ronaldoussoren, ssbarnea
Date 2022-03-10.09:15:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646903702.35.0.284049751281.issue35164@roundup.psfhosted.org>
In-reply-to
Content
I am able to reproduce this bug with Python 3.10 on MacOS 12.2 too, and I happen to have some extra insights about what happens, see https://github.com/tox-dev/tox/issues/2375

Basically the culprit is a reverse-dns query (PTR) that takes 30s to return, causing that very long delay. It appears that mDNSResponder is able to cache the result for some time but not very long, so it will happen again.

In my particular case that PTR query is an .ip6.arpa one and there is no ipv4 query made at all.

I was not able to identify any similar delay while calling `scutil --get HostName` or `hostname`, but `socket.getfqdn()` does reproduce it reliably.

Interestingly, it seems that the delay is at least sometimes 15s, maybe the delay of 30s I observed on tox was caused by two calls.

Anyway, I am more than interested in finding a solution for this issue. Such a delays can be a real dealbreaker even for cli tools.
History
Date User Action Args
2022-03-10 09:15:02ssbarneasetrecipients: + ssbarnea, ronaldoussoren, ned.deily, James Crowther, ghickman
2022-03-10 09:15:02ssbarneasetmessageid: <1646903702.35.0.284049751281.issue35164@roundup.psfhosted.org>
2022-03-10 09:15:02ssbarnealinkissue35164 messages
2022-03-10 09:15:02ssbarneacreate