On Wed, 18 Nov 2026 17:11:53 GMT, Daniel Fuchs <[email protected]> wrote:
> The HTTP/2 test server in H2GoAwayPromptConnectionClose.java may buffer some > frames when waiting for the SETTINGS frame ACK. It then expects to find or > receive a HEADERS frame just after having obtained the connection settings. > The client typically sends a WINDOW_UPDATE frame right after the SETTINGS > frame. If that frame has been parsed and buffered by the server by the time > we look for the HEADERS frames, everything works fine. However, if that frame > is still sitting in the socket's buffer (or if it arrives later but before > the HEADERS frame), then the server will fail, because it only expects to > receive a HEADERS frame at this point. > > This is timing sensitive, so the test passes most of the time. However from > time to time the WINDOW_UPDATE frame comes a bit late, an exception is raised > and ignored on the server side, the test fails in jtreg timeout and the log > then shows: > > [local=/127.0.0.1:51852, remote=/127.0.0.1:51858] received client preface > [local=/127.0.0.1:51852, remote=/127.0.0.1:51858] received SETTINGS frame > [local=/127.0.0.1:51852, remote=/127.0.0.1:51858] accumulating frames till a > SETTINGS ACK frame is received > [local=/127.0.0.1:51852, remote=/127.0.0.1:51858] received frame type 4 > (SETTINGS) > [local=/127.0.0.1:51852, remote=/127.0.0.1:51858] completed exchanging > SETTINGS frames between client and server > [local=/127.0.0.1:51852, remote=/127.0.0.1:51858] ignoring exception > java.io.IOException: unexpected frame, got type 8, expected 1 that occurred > when handling connection ... > > > Type 8 is the WINDOW_UPDATE frame type, type 1 is the expected HEADERS frame > type. > > The fix is to relax the expectation in `expectFrame` and skip over > WINDOW_UPDATE if it is received before the expected HEADERS frame. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). Thanks Daniel! ------------- PR Comment: https://git.openjdk.org/jdk/pull/33952#issuecomment-7102664061
