-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
HTTP/3 Race with Dynamic Table referencing in QPackDecoder #11420
Comments
I got lucky. I managed to reproduce this bug with full DEBUG logs enabled: The text Do you see any potential problems? Next, I'm going to try reproducing the problem with the |
Here is a log of the problem with the I still don't see any obvious problems. |
It looks increasingly likely this is a Chrome bug. I can't reproduce the problem with Firefox, but both Chrome and Brave do trigger it. Check out this interesting log:
Clearly I'll wait for you guys to confirm whether it's possible Jetty is responsible for this bug. Hopefully it is, because I have no clue how to report this to the Chromium team :) |
These headers are not generated by Jetty. They are sent by the client, so I agree that it seems a Chrome bug. |
@sbordet Is it possible that the client sends them correctly but Jetty parses them incorrectly? Is it possible for multiple threads to handle the same stream, or is there a dedicated thread per stream? |
There is only 1 reader thread per connection, so I doubt it's a Jetty issue. |
Thank you for the clarification. I filed a bug report against Chrome: https://issues.chromium.org/issues/325821306 |
@lachlan-roberts would it be possible that there is a bug in the qpack decoding, and we emit headers that don't exist, or emit headers with different values? In the first log file we decode |
@lachlan-roberts any chance you could reply to the previous question? |
Sorry for the delay. I have had time to look into this and I do think it is a bug in the Jetty The instruction to insert into the table is supposed to be a relative index to the last entry inserted into the dynamic table but the I am working on a PR with a fix now. |
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Issue #11420 - fix dynamic table referencing in QpackDecoder
Thanks @lachlan-roberts. I'll give it a try in the next official release. |
Jetty version(s)
12.0.7
Jetty Environment
core
Java version/vendor
(use: java -version)
openjdk version "21.0.1" 2023-10-17 LTS
OpenJDK Runtime Environment Zulu21.30+15-CA (build 21.0.1+12-LTS)
OpenJDK 64-Bit Server VM Zulu21.30+15-CA (build 21.0.1+12-LTS, mixed mode, sharing)
OS type/version
Microsoft Windows [Version 10.0.19045.4046]
Description
I have an
index.html
file that referenceslogin/login.js
.If I open a new Incognito tab and hit
index.html
I sometimes (randomly) get the wrong headers.Here is what a good request looks like:
And here is what a bad request looks like:
If you diff these two, you will notice that:
is replaced by:
The bad request also contains:
which the good request does not. The only reason I caught this is that
accept: script
is invalid.It's not clear to me whether this is caused by a race condition in Jetty (possibly only in HTTP/3 mode) or it's caused by a race race condition on Chrome.
I know that the initial (non-cached) page load is always okay. If I get the bad headers, it is typically on the second (and subsequent) requests when I hit F5 to reload the page.
Because this is a race condition, the more logs I add the less likely I am to run into this problem. I cannot enable all the DEBUG logs.
How do you suggest figuring out which side is at fault?
The text was updated successfully, but these errors were encountered: