classification
Title: test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore
Type: Stage: patch review
Components: Tests Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Greg Price, benjamin.peterson, miss-islington, pablogsal, vstinner, xtreak
Priority: normal Keywords: patch

Created on 2018-12-17 11:08 by vstinner, last changed 2019-08-21 04:12 by miss-islington.

Pull Requests
URL Status Linked Edit
PR 15349 merged Greg Price, 2019-08-21 03:29
PR 15350 merged miss-islington, 2019-08-21 03:51
PR 15351 merged miss-islington, 2019-08-21 03:51
PR 15352 merged miss-islington, 2019-08-21 03:51
Messages (10)
msg331978 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-17 11:08
snakebite.net and blackhole.snakebite.net domains don't exist anymore, but test_timeout uses it:

    def testConnectTimeout(self):
        # Testing connect timeout is tricky: we need to have IP connectivity
        # to a host that silently drops our packets.  We can't simulate this
        # from Python because it's a function of the underlying TCP/IP stack.
        # So, the following Snakebite host has been defined:
        blackhole = resolve_address('blackhole.snakebite.net', 56666)
        (...)

If I recall properly, snakebite.net was a service provided by Trent Nelson to test CPython on various operating systems (Solaris, IRIX, HP-UX, etc.). It seems like the service is now completely down.

Article from 2009:

https://conferences.oreilly.com/oscon/oscon2009/public/schedule/detail/8268

"Snakebite is a culmination of ten months of secretive work, seven trips to Michigan State University, six blown fuses and about $60,000. The end result? A network of around 37-ish servers of all different shapes and sizes, specifically geared towards the development needs of open source projects. Get the inside scoop from Snakebite's Founder, Trent Nelson, and MSU Director Dr. Titus Brown."
msg331980 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-17 11:10
We should either recreate this "blackhole" service on pythontest.net (server controlled by the PSF) or drop the test.

@Benjamin: Hi, do you know who maintain pythontest.net? Who can add a "black hole" service?
msg331981 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-17 11:10
CC Pablo who loves black holes ;-)
msg331988 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python triager) Date: 2018-12-17 11:30
Related : issue31562
msg332037 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-12-18 02:44
I think it might be better to rewrite the test to use a local tcp server. At least on Linux, I think trying to connect to a socket with a full accept queue should have equivalent beahvior. You could also be fancier, set up a network namespace, and actually drop all SYN packets with iptables.
msg350045 - (view) Author: Greg Price (Greg Price) * Date: 2019-08-21 03:37
I ran across this test when looking at especially slow files in the test suite: it turns out that not only is this service currently down, but the snakebite.net domain still exists, and as a result the test can end up waiting 20-30s before learning that the hosts can't be found and the test gets skipped.

I agree with Benjamin's and Victor's comments -- the best solution would be to recreate the test, ideally as something that anyone (anyone with Docker installed, perhaps?) can just run locally.

For now I've just sent GH-15349 as a one-line fix to skip the test, with a remark pointing at this issue. It's already getting skipped 100% of the time thanks to the handy `support.transient_internet` mechanism -- this just makes the skip (a) explicit in the source code, and (b) a lot faster. :-)
msg350046 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2019-08-21 03:51
New changeset 5b95a1507e349da5adae6d2ab57deac3bdd12f15 by Benjamin Peterson (Greg Price) in branch 'master':
bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
https://github.com/python/cpython/commit/5b95a1507e349da5adae6d2ab57deac3bdd12f15
msg350050 - (view) Author: miss-islington (miss-islington) Date: 2019-08-21 04:09
New changeset 44f2c096804e8e3adc09400a59ef9c9ae843f339 by Miss Islington (bot) in branch '3.8':
bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
https://github.com/python/cpython/commit/44f2c096804e8e3adc09400a59ef9c9ae843f339
msg350051 - (view) Author: miss-islington (miss-islington) Date: 2019-08-21 04:11
New changeset b9d88e771238b5098842cad8a6ad624621f3f62e by Miss Islington (bot) in branch '3.7':
bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
https://github.com/python/cpython/commit/b9d88e771238b5098842cad8a6ad624621f3f62e
msg350052 - (view) Author: miss-islington (miss-islington) Date: 2019-08-21 04:12
New changeset 198a0d622a696a4c234aa7866d6c15e38839cc76 by Miss Islington (bot) in branch '2.7':
bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
https://github.com/python/cpython/commit/198a0d622a696a4c234aa7866d6c15e38839cc76
History
Date User Action Args
2019-08-21 04:12:20miss-islingtonsetmessages: + msg350052
2019-08-21 04:11:28miss-islingtonsetmessages: + msg350051
2019-08-21 04:09:00miss-islingtonsetnosy: + miss-islington
messages: + msg350050
2019-08-21 03:51:16miss-islingtonsetpull_requests: + pull_request15066
2019-08-21 03:51:10miss-islingtonsetpull_requests: + pull_request15065
2019-08-21 03:51:04miss-islingtonsetpull_requests: + pull_request15064
2019-08-21 03:51:00benjamin.petersonsetmessages: + msg350046
2019-08-21 03:37:57Greg Pricesetnosy: + Greg Price
messages: + msg350045
2019-08-21 03:29:54Greg Pricesetkeywords: + patch
stage: patch review
pull_requests: + pull_request15063
2018-12-18 02:44:36benjamin.petersonsetmessages: + msg332037
2018-12-17 11:30:36xtreaksetnosy: + xtreak
messages: + msg331988
2018-12-17 11:10:31vstinnersetnosy: + pablogsal
messages: + msg331981
2018-12-17 11:10:12vstinnersetnosy: + benjamin.peterson
messages: + msg331980
2018-12-17 11:08:35vstinnercreate