Skip to content
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

Restored a few error codes and redefined FRAME_ERROR. #521

Closed
wants to merge 9 commits into from

Conversation

janaiyengar
Copy link
Contributor

I'd like to go over this again to ensure we don't leave anything out. In the meanwhile, take a look at the direction I'm pushing in.

@martinthomson
Copy link
Member

It sounds like we're going to be discussing this at the interim. I think that this misses the point of doing a consolidation.

For instance, why would anyone actually send HANDSHAKE_TIMEOUT? For that matter, how would they send it?

@janaiyengar
Copy link
Contributor Author

Good point -- we can remove HANDSHAKE_TIMEOUT. Unless there's a good reason, I'd like to keep the others. I think the errors are useful, and I don't see an advantage to removing the ones that I've listed.

@janaiyengar janaiyengar requested a review from ianswett May 12, 2017 04:32
@martinthomson
Copy link
Member

That was an example, there are quite a number more that fit the same criterion.

@martinthomson
Copy link
Member

This might help understand where I'm coming from here. In going through the existing codes, I asked myself the question "what code would I write to handle a CONNECTION_CLOSE/RST_STREAM that contained this error code?" If the code is the same for two error conditions, the separate codes were redundant. The other question to ask might be "why would I send a CONNECTION_CLOSE/RST_STREAM containing this error code?"

@janaiyengar
Copy link
Contributor Author

I think I understand where you're coming from. That doesn't cover monitoring though; Google monitors these error codes, and we find it useful operationally. I expect that other server will find it useful too. Happy to air this out at the interim for others to weigh in on.

This is just the error codes, not references to those codes.
One interesting change here is that we don't have an error code for running out
of packet numbers.  If you think about this for even a few seconds, you will
realize that you can't send that error code because it can't go in a packet.

And that's even assuming that you manage to keep a connection alive long enough
to send that many packets.  At 1 million packets a second, that's almost 600
thousand years.  Even if we assume that you jump 2^31 packets every time you
switch between networks, and change once a minute, that's 16 thousand years.

I didn't remove the parenthetical mention of QUIC_NO_ERROR because that is
being removed in other pull requests.
@martinthomson
Copy link
Member

@janaiyengar, I had to rebase the transport_errors branch, which means that you probably want to rebase this branch too. git fetch origin;git checkout revised_errors;git rebase origin/transport_errors should do the trick.

martinthomson and others added 3 commits May 12, 2017 15:19
This is just the error codes, not references to those codes.
One interesting change here is that we don't have an error code for running out
of packet numbers.  If you think about this for even a few seconds, you will
realize that you can't send that error code because it can't go in a packet.

And that's even assuming that you manage to keep a connection alive long enough
to send that many packets.  At 1 million packets a second, that's almost 600
thousand years.  Even if we assume that you jump 2^31 packets every time you
switch between networks, and change once a minute, that's 16 thousand years.

I didn't remove the parenthetical mention of QUIC_NO_ERROR because that is
being removed in other pull requests.
@janaiyengar
Copy link
Contributor Author

Thanks for the heads-up; rebased.

Copy link
Contributor

@ianswett ianswett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two issues I feel the strongest on are that I want to tell what frame type caused an error if a frame was invalid, and I want to know about unencrypted stream data. I think the other codes are useful, but the per-frame type codes and the unencrypted data are critical.

@@ -2612,71 +2612,104 @@ CONNECTION_CLOSE or RST_STREAM frame. Error codes share a common code space.
Some error codes apply only to either streams or the entire connection and have
no defined semantics in the other context.

INTERNAL_ERROR (0x80000001):
FRAME_ERROR (0x800000TT):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit: Stream frames and acks frames consume multiple spots in the octet, we should define which spots they should use for errors.

INTERNAL_ERROR (0x80000001):
FRAME_ERROR (0x800000TT):

: An endpoint received a frame that was badly formatted. For instance, an empty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: badly -> incorrectly


: An endpoint received a frame that was badly formatted. For instance, an empty
STREAM frame that omitted the FIN flag, or an ACK frame that has more
acknowledgment ranges than the remainder of the packet could carry. The final
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better ack example would be an ack packet that indicates previously acked packets are now missing.


: A public reset packet was received for this connection post-handshake.

TOO_MANY_RTOS (0x80000108):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be useful, but it does assume one implements a too many RTOs feature.

@ianswett
Copy link
Contributor

Is this PR obsolete?

@MikeBishop MikeBishop deleted the revised_errors branch September 23, 2017 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants