-
Notifications
You must be signed in to change notification settings - Fork 126
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
Return an error if the path is not permanent #1698
Conversation
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.
Is there any way that you could generate a test case for this?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1698 +/- ##
==========================================
- Coverage 92.98% 92.97% -0.01%
==========================================
Files 120 120
Lines 37340 37344 +4
==========================================
+ Hits 34719 34721 +2
- Misses 2621 2623 +2 ☔ View full report in Codecov by Sentry. |
It appears that |
@martinthomson , I think I am out of my ideas. |
I spent a little time with process_input and we have several cases that are relevant here:
That last one contains a problem. If we receive a bad packet from a new path AND we don't have a connection ID AND the peer requires a connection ID, the attempt to make a new path will fail. That seems like a reasonable test case to try out. |
I found a way to trigger the crash by calling |
|
||
// See issue #1697. We had a crash when the client had a temporary path and | ||
// process_output is called. | ||
mem::drop(client.process_output(now())); |
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.
This is good. I'd prefer to see this as a separate test case though.
Did you not have any luck with pushing a bad packet in on a new path? You can use the test frame writer to make a garbage packet (a single varint should do the trick, as that will be interpreted as a frame type that we don't support).
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.
Thanks. Will try to write another test case.
cad33f9
to
a4db844
Compare
|
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.
That test is very nice. I'm sure that it took longer to write than it looks, because it looks effortless. Thanks Kershaw. Good work.
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.
Clippy complained, but sort that out and this is good to land.
Benchmark results
|
For issue #1697
This is just a workaround for stop crashing.
The root cause of this crash is still not clear. Maybe necko does something wrong.
Note that the crash signature seems wrong. The frame 9 is
neqo_transport::path::Path::local_cid()
, but the provided link to the code indicates the function isneqo_transport::path::Path::remote_cid()
.