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

Revert futures 0.2 changes #1482

Merged
merged 2 commits into from
Apr 10, 2018
Merged

Revert futures 0.2 changes #1482

merged 2 commits into from
Apr 10, 2018

Conversation

seanmonstar
Copy link
Member

See #1481

😢

@srijs
Copy link
Contributor

srijs commented Apr 8, 2018

From the CI errors, it looks like we might need to back-port some of the fixes I included for the new tokio behaviour. I'll see if I can figure out which ones they are!

@kamyuentse
Copy link
Contributor

On my local machine, the test conn_drop_prevents_pool_checkout can pass some time.
Seems there is a race somewhere, I am trying locate the problem.

@srijs
Copy link
Contributor

srijs commented Apr 10, 2018 via email

tests/client.rs Outdated
@@ -1043,27 +1042,28 @@ mod dispatch_impl {
let mut buf = [0; 4096];
sock.read(&mut buf).expect("read 1");
sock.write_all(b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n").unwrap();
//sock.read(&mut buf).expect("read 2");
sock.read(&mut buf).expect("read 2");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is what made it pass always :D

@seanmonstar seanmonstar force-pushed the unfutures-02 branch 7 times, most recently from 4f5ce94 to 250b238 Compare April 10, 2018 19:37
@seanmonstar seanmonstar merged commit 33874f9 into master Apr 10, 2018
@seanmonstar seanmonstar deleted the unfutures-02 branch April 10, 2018 19:57
@kamyuentse
Copy link
Contributor

I want to know why removing that test case.

@seanmonstar
Copy link
Member Author

@kamyuentse I kept trying variants, and couldn't seem to get it passing 100% of the time without disabling the exact thing it was testing. And so then I read through it, trying to remember what the heck it was even testing, and realized it was because before inside client/mod.rs there was a tx.start_send(req).unwrap(). That doesn't exist anymore, and the test is really contrived.

Actually, I'm fairly certain the problem is the race condition in futures mpsc queue: rust-lang/futures-rs#909

That'd make sense, since the test was basically dropping the Receiver in a runtime thread, and trying to use the Sender in the test thread, and occasionally seeing deadlocks as the message was never dropped.

@kamyuentse
Copy link
Contributor

@seanmonstar Thanks for your explanation! I don't know whether futures issue cause tokio worker panic, but I think I should cc @carllerche .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants