Skip to content

Deal with EINTR in net timeout tests - #56394

Merged
bors merged 1 commit into
rust-lang:masterfrom
cuviper:interrupted-timeout
Dec 3, 2018
Merged

Deal with EINTR in net timeout tests#56394
bors merged 1 commit into
rust-lang:masterfrom
cuviper:interrupted-timeout

Conversation

@cuviper

Copy link
Copy Markdown
Member

We've seen sporadic QE failures in the timeout tests on this assertion:

assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);

So there's an error, but not either of the expected kinds. Adding a
format to show the kind revealed ErrorKind::Interrupted (EINTR).

For the cases that were using read, we can just use read_exact to
keep trying after interruption. For those using recv_from, we have to
manually loop until we get a non-interrupted result.

We've seen sporadic QE failures in the timeout tests on this assertion:
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
So there's an error, but not either of the expected kinds. Adding a
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).
For the cases that were using `read`, we can just use `read_exact` to
keep trying after interruption. For those using `recv_from`, we have to
manually loop until we get a non-interrupted result.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 30, 2018
@sfackler

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Nov 30, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit f107514 has been approved by sfackler

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 30, 2018
@Centril

Copy link
Copy Markdown
Contributor

@bors rollup

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Dec 1, 2018
…kler
Deal with EINTR in net timeout tests
We've seen sporadic QE failures in the timeout tests on this assertion:
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
So there's an error, but not either of the expected kinds. Adding a
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).
For the cases that were using `read`, we can just use `read_exact` to
keep trying after interruption. For those using `recv_from`, we have to
manually loop until we get a non-interrupted result.
bors added a commit that referenced this pull request Dec 1, 2018
Rollup of 9 pull requests
Successful merges:
- #55010 (Add template parameter debuginfo to generic types)
- #56110 (Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks)
- #56305 (update miri)
- #56372 (Refer to the second borrow as the "second borrow" in E0501.rs)
- #56394 (Deal with EINTR in net timeout tests)
- #56395 (Stabilize dbg!(...))
- #56402 (Improve the unstable book example for #56408 [marker] trait)
- #56406 (Update RLS and Rustfmt)
- #56366 (Stabilize self_in_typedefs feature)
Failed merges:
r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Dec 1, 2018
…kler
Deal with EINTR in net timeout tests
We've seen sporadic QE failures in the timeout tests on this assertion:
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
So there's an error, but not either of the expected kinds. Adding a
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).
For the cases that were using `read`, we can just use `read_exact` to
keep trying after interruption. For those using `recv_from`, we have to
manually loop until we get a non-interrupted result.
@CentrilCentril mentioned this pull request Dec 1, 2018
@CentrilCentril mentioned this pull request Dec 2, 2018
@CentrilCentril mentioned this pull request Dec 2, 2018
@CentrilCentril mentioned this pull request Dec 2, 2018
@CentrilCentril mentioned this pull request Dec 2, 2018
Centril added a commit to Centril/rust that referenced this pull request Dec 2, 2018
…kler
Deal with EINTR in net timeout tests
We've seen sporadic QE failures in the timeout tests on this assertion:
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
So there's an error, but not either of the expected kinds. Adding a
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).
For the cases that were using `read`, we can just use `read_exact` to
keep trying after interruption. For those using `recv_from`, we have to
manually loop until we get a non-interrupted result.
@CentrilCentril mentioned this pull request Dec 2, 2018
bors added a commit that referenced this pull request Dec 2, 2018
Rollup of 14 pull requests
Successful merges:
- #56110 (Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks)
- #56305 (update miri)
- #56366 (Stabilize self_in_typedefs feature)
- #56372 (Refer to the second borrow as the "second borrow" in E0501.rs)
- #56394 (Deal with EINTR in net timeout tests)
- #56395 (Stabilize dbg!(...))
- #56401 (Move VecDeque::resize_with out of the impl<T:Clone> block)
- #56402 (Improve the unstable book example for #[marker] trait)
- #56412 (Update tracking issue for `extern_crate_self`)
- #56416 (Remove unneeded body class selector)
- #56418 (Fix failing tidy (line endings on Windows))
- #56419 (Remove some uses of try!)
- #56424 (Mention raw-ident syntax)
- #56432 (Update issue number of `shrink_to` methods to point the tracking issue)
Failed merges:
r? @ghost
@emilyalbini

Copy link
Copy Markdown
Member

@bors rollup-

@cuviper

Copy link
Copy Markdown
MemberAuthor

Was there an issue with this in rollup? I expect it would be simple and self-contained...

@bors

bors commented Dec 3, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f107514 with merge 25c3754...

bors added a commit that referenced this pull request Dec 3, 2018
Deal with EINTR in net timeout tests
We've seen sporadic QE failures in the timeout tests on this assertion:
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
So there's an error, but not either of the expected kinds. Adding a
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).
For the cases that were using `read`, we can just use `read_exact` to
keep trying after interruption. For those using `recv_from`, we have to
manually loop until we get a non-interrupted result.
@bors

bors commented Dec 3, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: sfackler
Pushing 25c3754 to master...

@bors
bors merged commit f107514 into rust-lang:masterDec 3, 2018
@cuviper
cuviper deleted the interrupted-timeout branch March 27, 2019 22:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@cuviper@rust-highfive@sfackler@bors@Centril@emilyalbini