-
Notifications
You must be signed in to change notification settings - Fork 22
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
weird errors related to WINDOW_SIZE
updates
#121
Comments
I have already tried the patches submitted by @edsko in |
Where does this error occurs? The client side or the server side? |
It is x86_64-linux - I will check again whether it only occurs on one side tomorrow and report here :) |
Please check if the size of
|
it should be
the update of the peer settings happens in the sender. I don't know what exactly triggers the increase of the window size by Thank you so much! |
First of all, you should read the documentation of https://hackage.haskell.org/package/network-control-0.1.0/docs/Network-Control.html |
I will try to implement a feature to transfer big data in |
adb6b61in First, run
Then, run
Unfortunately I cannot reproduce your problem. |
FWIW, we are also hunting a bug, we're getting segfaults in a particular test (or sometimes bus error), and we believe it's got something to do with the write buffer. We'll continue digging and let you know. It may or may not be related to the window update problem, I'm unsure. |
@kazu-yamamoto I am pretty sure that it has nothing to do with sending a lot of data but with doing window updates to the max bound concurrently and the sender and receiver getting out of sync. It’s not reproducing in all cases but only in some concurrent scenarios. We have a hunch at what it could be but we can only confirm next week. |
@MangoIV That sounds that |
51cfe54 introduces concurrency:
Paths are dummy. |
@MangoIV If you could identify which version introduce your issue, it would be highly helpful. |
I can bisect on Monday if we’re hitting a dead end - thank you so much for your help :) |
so the outcome is as follows - I won't be able to work on this issue anymore (except for maybe in my free time) as we have decided to prioritize removing our use of http2 client, this is what I found in the meanwhile; the situation is as follows:
As a reproducer I would next try to send a In general I think it occurs because the SETTINGS update and the WINDOW_UPDATE concurrently updating the window size. Sorry this is all very vague, I will try to write an actual reproducer in my free time, I just wanted to share this with you :) |
WINDOW_SIZE
updates -- help wantedWINDOW_SIZE
updates
additionally, I'm very sorry for not being able to be able to actually bisect - each rebuild takes ~ 1 hour, I think if I can write a reproducer, I will be able to actually do the bisection effectively. |
FWIW, the recent patch in http-semantics solved the segfault that @edsko mentioned above, but does not help with this issue according to @MangoIV. |
It’s possible that it may help - but I’m doubtful, it doesn’t seem very related, the traffic in wireshark actually does look weird (in that the server starts sending before the http2 client has sent its hello) and http2 actually does disagree with what nginx and wireshark (as in wireshark does actually seem to calculate correct window sizes when nginx sends the window update frame) are seeing. I can try nonetheless. |
I have tried out a patch together with some other long shots wrt improving atomicity but that didn't do it. |
@MangoIV Could you give me a pcap file (taken by |
I'm beginning to understand the situation. defaultClientConfig { settings = defaultSettings { initialWindowSize = 65535} } |
I’m pretty sure it would, yes, without testing. (I have tested it, this does work) |
I guess that this is connection TX for client (sid == 0 is for connection). This is good.
This is stream RX for client.
|
The initial connection TX for client cannot be modified by server at the beginning. |
2^18 is RX for client. |
OK. I understand. My |
Thank you so much for taking so much time for this, this is really, really nice :) Should I add some more information? E.g. how wireshark sees it when the thing crashes or logs I added to http2 before we crash? |
I will push one commit very soon. |
sure, I will do that! Thank you so much <3 |
branch: https://github.com/kazu-yamamoto/http2/tree/peer-initial-window-size This should fix your issue. |
@kazu-yamamoto but this is just setting to Perhaps this is the issue though - in my tests the |
This is a complete fix, not workaround. |
Alright, thank you - I guess I will try it out then. I have a couple of what I suspect to be chesterton's fences - e.g. for some atomicity things - that I have encountered and I would like to ask you questions about them, should I open an extra issue for that? |
I confirmed that initialWindowSize 2^18 is announced from a client. |
Yes, please open new issues. |
lovely, thank you so much <3 |
thank you for the patch, I think that fixes it! |
Thank you so much! |
A new version has been released. |
when updating from http2 4.1.4 -> 5.2.2 I started encountering occasional failures with this error message:
There's some weird things in the log where it tries to increase the upper bound of the window by
2^31-1
.I have tried trouble shooting it but I haven't had any luck reproducing it with a small example but it looks like maybe it's related to an endianness bug.
I'm at a bit of a loss here. I was looking at whether it might have been
nginx
modifyinghttp2
frames but I'd be very surprised if that would be the case.Do you have any ideas of where I could start trouble shooting?
What code actually picks which size to upgrade the window by?
What would happen if the window upper bound would actually reach
maxBound @Int
, is there any logic to reset the window size?Thank you so much in advance for any pointers!
The text was updated successfully, but these errors were encountered: