net, net/http: unpredictable slowness of TestSendfile and TestOnlyWriteTimeout w/ squeezed TCP windows #19032
Labels
Milestone
Comments
One thing to be added; with the script TestOnlyWriteTimeout crashes like the following:
|
CL https://golang.org/cl/36735 mentions this issue. |
gopherbot
pushed a commit
that referenced
this issue
Mar 22, 2017
TestOnlyWriteTimeout assumes wrongly that: - the Accept method of trackLastConnListener is called only once - the shared variable conn never becomes nil and crashes on some circumstances. Updates #19032. Change-Id: I61de22618cd90b84a2b6401afdb6e5d9b3336b12 Reviewed-on: https://go-review.googlesource.com/36735 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is probably not an issue for the standard library; for the runtime package which retrieves data readable/writable notifications from the kernel, for the net package which invokes read/write system calls, and for the net/http package which adds, drops and manages in-flight connections and IO calls for customer traffic. This happens, as fa as I can observe, on any combination of FreeBSD 10 through 12 and go1.7 through tip.
When we run a script like the following:
TestSendfile takes a bit long time with some window size.
With a quick glance at system call trace, it looks like the kevent system call sometimes takes a long breath.
Not sure the reason; sb{r,w}wakeup miss some important condition? tcp_input miscalculates some threshold for sb{r,w}wakeup? tcp over ip over loopback interface does some special short-circuit/fuse stuff? or runtime-integrated network poller is not invoked appropriately? (the last one is unlikely)
Note that I ran the above test under some VM stuff on my '09 laptop and I guess that test results may vary on circumstances.
The text was updated successfully, but these errors were encountered: