[
https://issues.apache.org/jira/browse/MESOS-9742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16825471#comment-16825471
]
Benjamin Bannier commented on MESOS-9742:
-----------------------------------------
Linking related MESOS-6778 which is about having callers of {{http::request}}
close the connection.
> If a HTTP endpoint goes away before finishing sending of data HTTP requests
> hang
> --------------------------------------------------------------------------------
>
> Key: MESOS-9742
> URL: https://issues.apache.org/jira/browse/MESOS-9742
> Project: Mesos
> Issue Type: Bug
> Components: libprocess
> Reporter: Benjamin Bannier
> Priority: Major
>
> If a HTTP request is made to a remote that goes away before it finishes
> sending its data the HTTP request hangs forever.
> {code}
> TEST_P(HTTPTest, NOPE)
> {
> Try<inet::Socket > create = inet::Socket::create();
> ASSERT_SOME(create);
> Future<http::Response> response;
> {
> // Post a request which never gets a response.
> Http http;
> EXPECT_CALL(*http.process, body(_));
> response = http::post(http.process->self(), "body/");
> // Wait for some time so the request was posted. There's probably
> // some internal state we could wait for.
> ASSERT_SOME(os::sleep(Milliseconds(300)));
> }
> AWAIT_FAILED(response); // Hangs.
> }
> {code}
> While this has likely been an issue for some time it came up with the
> introduction of agent components which communicate with the agent over HTTP
> connections, e.g., the for the container daemon or storage local resource
> providers. Here it becomes hard to reason about the life cycle of async call
> chains, and also introduces some issues when e.g., executing tests in
> repetition where we effectively leak sockets (by having {{Future}} holding on
> to the sockets but never reaching a terminal state), see MESOS-8428.
> We should evaluate whether we can turn a closed socket into e.g., a failed
> {{Future}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)