-
Notifications
You must be signed in to change notification settings - Fork 1
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
Streams not gracefully ending during high usage #20
Comments
Cool, progress. I have modified the server and client example and simplified them somewhat. The server does 3 things.
The client does 2 things.
What I'm trying to observe with this test is.
What I finding is,
I think at this stage I have enough evidence to post an upstream issue now. But first I'll confirm no other errors or factors are involved. |
I changed the client code slightly and I can't trigger the problem anymore. The original failures may have been a problem with my example code? So far there are no failures with 15000 streams at 1000 messages each. Back to the drawing board. |
What did you change? |
It was a slight change to the logic for tracking the number of messages sent and when to send the fin frame. |
Forcing congestion control by setting |
Can you roll back your change and replicate it? |
Do you have a branch for this? |
I thought you were replicating it in rust. How did this result in a change to the client code? Are you talking about JS or Rustlang? And if you want to replicate the problem why not just go back to what your original client code is. |
Yes I do have a branch for this, it's I am replicating it in rust. The change was in the client code of the rust example. |
Does this problem still occur with the JavaScript tests? |
Can you explain in detail what you changed and how this impacted the test of stream lifecycles on the JavaScript side. Be comprehensive. |
I haven't touched the javascript since I applied the temp-fix of including data with the end frame. |
I've replicated the client example in ts. it's |
I have a working(ish) server example now. Using them together causes the client to fail though. It might be related to initial negotiation. I tried to have them mimic how the rust examples worked in structure. The main difference is that receiving data handled as an event seperately from it's main processing loop. For the client that's minor but for the server it's a pretty major difference. They're pretty close to the same logic otherwise. There are 4 files for testing this now.
I still need to fix something with the |
Re-based on staging. |
Is this still a problem or fixed by #26? @tegefaulkes |
It's hard to say, it only triggers under certain circumstances. I'm considering it a non-issue for now unless it comes up again. |
Are you still doing the stop gap of sending a single null byte? |
No, it was removed to simplify the code a little bit. If the problem happens again it will be simple enough to re-apply it. For now we want to see if all the other changes may have fixed it. |
This is probably fixed by #53. I'm adding it there. This problem was probably we just didn't understand how streams were meant to be closed and checked. And you've added the necessary functionality to |
It was probably fixed before. Just we couldn't confirm it since I never found the exact condition that caused it. It happened in the concurrency tests when we stressed it a little. AFAIK things should be working and we can resolve this if we never run into the problem after merging #53 and testing within |
Specification
While working on #14 we discovered that during tests with a large amount of streams and data being sent concurrently. Readable streams would fail to end. So far as we could tell, random streams would fail to process a message from
streamRecv
that hadfin = true
. In these cases other streams would send a fin frame, end and clean up on both sides, all after the problematic stream should've done the same.Since then we found a stop-gap solution where we send a single null byte with the finish message. Given that, we're reasonably certain that the problem is related to 0-length messages not being sent or processed event though
fin
was set to true.Normally a 0-length message is not sent but in the case of a finish message they should be. This functionality was added in this commit cloudflare/quiche@cc98af0.
Under normal conditions with low load. Sending fin frames with 0-length messages works fine. The problem only happens under higher loads during testing and even then, somewhat randomly. It's been hard to narrow down the specific conditions that cause the problem
To address this problem multiple things need to be done.
quiche
source code for the problem. based on what I understand is happening. The problem is likely located on the receiving side with marking the stream as readable after it has received the 0-length finish frame. But only during message loads.For now we're using a work-around where we add data to the fin frame message. In this case a single null byte. This should mark the stream as readable regardless of an potential issues with 0-length fin frames.
Additional context
Tasks
quiche
source code for the problem. based on what I understand is happening. The problem is likely located on the receiving side with marking the stream as readable after it has received the 0-length finish frame. But only during message loads.The text was updated successfully, but these errors were encountered: