net, net/http: Deadline and Timeout Fail to Close Hung Connections. #48125
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, this has been tested on 1.17
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Context:
I am part of a research project called "Project-Lernaean". We are working on mapping and surveying the internet for both developers and security researchers. We have been using Colly quite successfully in our scans but recently have run into a fairly obscure issue. In a variety of cases, we run into IPs that deadlock something during a page request.
Test Cases:
Two test repositories have been created to show the bug in action. One uses Colly and the other is pure
net/http
andnet
.https://github.com/dherbst/deadlinetest (Thanks to the work of https://github.com/dherbst)
https://github.com/Project-Lernaean/CollyTimeoutError
In both cases,
Deadline
andTimeout
setting withinhttp.Transport
fail to terminate these connections and hang indefinitely.Transport Settings:
What did you expect to see?
I would expect that
Deadline
would be the absolute max time a connection can take before it is forcefully terminated.What did you see instead?
The connection never fails and remains "open" indefinitely.
The text was updated successfully, but these errors were encountered: