-
Notifications
You must be signed in to change notification settings - Fork 848
h2spec: GOAWAY is needed for receiving frames after a stream closed. #1753
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
Conversation
|
[approve ci] |
|
RAT check successful! https://ci.trafficserver.apache.org/job/RAT-github/358/ |
|
clang format successful! https://ci.trafficserver.apache.org/job/clang-format-github/344/ |
|
@zizhong Nice work! |
|
Linux build successful! https://ci.trafficserver.apache.org/job/linux-github/1932/ |
|
AU check successful! https://ci.trafficserver.apache.org/job/autest-github/342/ |
|
FreeBSD11 build successful! https://ci.trafficserver.apache.org/job/freebsd-github/2040/ |
|
Intel CC build successful! https://ci.trafficserver.apache.org/job/icc-github/471/ |
|
clang-analyzer build successful! https://ci.trafficserver.apache.org/job/clang-analyzer-github/604/ |
maskit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure whether we should change it, it may make h2spec happy though.
An endpoint that receives any frame other than PRIORITY
after receiving a RST_STREAM MUST treat that as a stream error
(Section 5.4.2) of type STREAM_CLOSED. Similarly, an endpoint
that receives any frames after receiving a frame with the
END_STREAM flag set MUST treat that as a connection error
(Section 5.4.1) of type STREAM_CLOSED, unless the frame is
permitted as described below.
Are we sure that this is the second case here?
|
This commit is to fix the issue as follows Here it is definitely the second case. |
|
Well, the h2spec testcase checks the second case, but what I wanted to know is whether the line is used only for the second case. If not, we might be breaking something else which is not covered by h2spec. Give me a few more days to check it. |
|
Yes. No guarantee that this code path is only for the second case. It's for every call on a destroyed stream. I feel like ATS is too aggressive on closing streams. |
|
I confirmed that the line is used for the both cases. I tested it with h2seq and these data. [
{ "action": "send", "stream": 0, "type": "preface"},
{ "action": "send", "stream": 0, "type": "settings", "flags": "", "settings": [] },
{ "action": "send", "stream": 0, "type": "settings", "flags": "ACK", "settings": [] },
{ "action": "send", "stream": 1, "type": "headers", "flags": "END_HEADERS,END_STREAM", "headers": [
[":method", "GET"],
[":scheme", "https"],
[":authority", "localhost"],
[":path", "/"]
]},
{ "action": "pause", "duration": 3000 },
{ "action": "send", "stream": 1, "type": "data"},
{ "action": "pause", "duration": 3000 }
][
{ "action": "send", "stream": 0, "type": "preface"},
{ "action": "send", "stream": 0, "type": "settings", "flags": "", "settings": [] },
{ "action": "send", "stream": 0, "type": "settings", "flags": "ACK", "settings": [] },
{ "action": "send", "stream": 1, "type": "headers", "flags": "END_HEADERS", "headers": [
[":method", "GET"],
[":scheme", "https"],
[":authority", "localhost"],
[":path", "/"]
]},
{ "action": "send", "stream": 1, "type": "rst_stream"},
{ "action": "pause", "duration": 3000 },
{ "action": "send", "stream": 1, "type": "data"},
{ "action": "pause", "duration": 3000 }
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that ATS need to be fixed, however, I'd have to request changes because it fixes one case but also breaks another case.
Maybe we could use some existing flags or have to add a flag to know which case has occurred.
|
It seems each streams have their end state ( Also, according to the spec, the check need to be done not only for DATA frames but also for other frames. @zizhong Would you try this? |
|
@maskit Good suggestion. Let me see. |
|
is there any change on this @zizhong? it would be nice to have a fully compatible release of ATS with H2. |
|
@calavera Yes, I will work on this one after finishing some other stuff. |
a13fb67 to
c8fc08d
Compare
|
@zizhong What is the status on this and should we land this? |
|
@bryancall This needs some future work. Can you put a WIP tag for me? Thanks! |
|
There hasn't been an update on this PR for over 60 days, so I am closing it for now. Feel free to reopen the PR when you have updated it. |
@masaori335 @maskit With #1704, #1747, #1752, and this fix, all test cases of
h2specpassed!