Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore #79699

Closed
vstinner opened this issue Dec 17, 2018 · 10 comments
Closed
Labels
3.8 only security fixes tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

BPO 35518
Nosy @vstinner, @benjaminp, @gnprice, @pablogsal, @miss-islington, @tirkarthi
PRs
  • bpo-35518: Skip test that relies on a deceased network service. #15349
  • [3.8] bpo-35518: Skip test that relies on a deceased network service. (GH-15349) #15350
  • [3.7] bpo-35518: Skip test that relies on a deceased network service. (GH-15349) #15351
  • [2.7] bpo-35518: Skip test that relies on a deceased network service. (GH-15349) #15352
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-09-21.22:25:24.798>
    created_at = <Date 2018-12-17.11:08:35.920>
    labels = ['3.8', 'tests']
    title = "test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore"
    updated_at = <Date 2021-09-21.22:25:24.798>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2021-09-21.22:25:24.798>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-09-21.22:25:24.798>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2018-12-17.11:08:35.920>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35518
    keywords = ['patch']
    message_count = 10.0
    messages = ['331978', '331980', '331981', '331988', '332037', '350045', '350046', '350050', '350051', '350052']
    nosy_count = 6.0
    nosy_names = ['vstinner', 'benjamin.peterson', 'Greg Price', 'pablogsal', 'miss-islington', 'xtreak']
    pr_nums = ['15349', '15350', '15351', '15352']
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue35518'
    versions = ['Python 3.8']

    @vstinner
    Copy link
    Member Author

    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."

    @vstinner vstinner added 3.8 only security fixes tests Tests in the Lib/test dir labels Dec 17, 2018
    @vstinner
    Copy link
    Member Author

    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?

    @vstinner
    Copy link
    Member Author

    CC Pablo who loves black holes ;-)

    @tirkarthi
    Copy link
    Member

    Related : bpo-31562

    @benjaminp
    Copy link
    Contributor

    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.

    @gnprice
    Copy link
    Contributor

    gnprice commented Aug 21, 2019

    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 #59554 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. :-)

    @benjaminp
    Copy link
    Contributor

    New changeset 5b95a15 by Benjamin Peterson (Greg Price) in branch 'master':
    bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
    5b95a15

    @miss-islington
    Copy link
    Contributor

    New changeset 44f2c09 by Miss Islington (bot) in branch '3.8':
    bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
    44f2c09

    @miss-islington
    Copy link
    Contributor

    New changeset b9d88e7 by Miss Islington (bot) in branch '3.7':
    bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
    b9d88e7

    @miss-islington
    Copy link
    Contributor

    New changeset 198a0d6 by Miss Islington (bot) in branch '2.7':
    bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
    198a0d6

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants