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 failure: net::tcp::tests::connect_timeout_unroutable #44698

Closed
RalfJung opened this issue Sep 19, 2017 · 5 comments · Fixed by #57584
Closed

test failure: net::tcp::tests::connect_timeout_unroutable #44698

RalfJung opened this issue Sep 19, 2017 · 5 comments · Fixed by #57584
Labels
C-bug Category: This is a bug.

Comments

@RalfJung
Copy link
Member

When I run ./x.py test -i src/libstd, I reliably get a test failure

---- net::tcp::tests::connect_timeout_unroutable stdout ----
        thread 'net::tcp::tests::connect_timeout_unroutable' panicked at 'called `Result::unwrap_err()` on an `Ok` value: TcpStream { addr: V4(139.19.184.5:41902), fd: 13 }', src/libcore/result.rs:906:4


failures:
    net::tcp::tests::connect_timeout_unroutable

test result: FAILED. 803 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--lib'


command did not execute successfully: "/home/r/src/rust/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "8" "--release" "--features" "panic-unwind debug-jemalloc jemalloc backtrace" "--manifest-path" "/home/r/src/rust/rustc/src/libstd/Cargo.toml" "-p" "std" "--"
expected success, got: exit code: 101

It seems my box (Linux, Debian testing amd64) considers 10.255.255.1 a fine address to route to.

This is the only test that fails.

@aidanhs aidanhs added the C-bug Category: This is a bug. label Sep 19, 2017
@sfackler
Copy link
Member

Uh oh. We may have to give up on the test unless someone knows of a "truly" unrouteable IP.

@achanda
Copy link
Contributor

achanda commented Sep 20, 2017

An IP in the documentation range should work fine. Example: https://play.rust-lang.org/?gist=5e00e5f8e9b46a4b5969f2eb72601a76&version=nightly

@RalfJung
Copy link
Member Author

It turns out that I can only reproduce this problem when I am connected to my institute's network; at home, the test passes.

Changing the test to use 192.0.2.2 makes no difference, it still fails.

@sapphire-arches
Copy link
Contributor

I'm also a +1 on this issue, my apartment's ISP is shady and will route things in 10.255.255.0/8. The documentation range works as expected, so it may be worth at least changing the test to use e.g. 192.0.2.2. The test has some utility so I would feel bad recommending it just be removed, but perhaps disabling it on non-CI builds by default could be worthwhile?

@RalfJung
Copy link
Member Author

I talked to our network admins and now have an explanation for the behavior described above: It seems that the firewall I am behind actively blocks traffic to/from reserved ranges, including the RFC 5737 documentation range. For TCP connections, "blocking" involves sending an RST, so my client gets ECONNREFUSED instead of a timeout.

nnethercote added a commit to nnethercote/rust that referenced this issue Jan 11, 2019
Because the current address is reachable on some machines, which causes
the test to fail.

Fixes rust-lang#44698, rust-lang#50065.
nnethercote added a commit to nnethercote/rust that referenced this issue Jan 13, 2019
It requires an unreachable IP address, but there is no such thing, and
this has caused it to fail for multiple people.

Fixes rust-lang#44698, fixes rust-lang#50065.
Centril added a commit to Centril/rust that referenced this issue Jan 14, 2019
…utable, r=sfackler

Remove the `connect_timeout_unroutable` test.

It requires an unreachable IP address, but there is no such thing, and
this has caused it to fail for multiple people.

Fixes rust-lang#44698, fixes rust-lang#50065.

r? @sfackler
Centril added a commit to Centril/rust that referenced this issue Jan 14, 2019
…utable, r=sfackler

Remove the `connect_timeout_unroutable` test.

It requires an unreachable IP address, but there is no such thing, and
this has caused it to fail for multiple people.

Fixes rust-lang#44698, fixes rust-lang#50065.

r? @sfackler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
5 participants