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

6 failed tests in h2spec (conformance testing tool for HTTP/2) run #28997

Open
rsvoboda opened this issue Nov 2, 2022 · 14 comments
Open

6 failed tests in h2spec (conformance testing tool for HTTP/2) run #28997

rsvoboda opened this issue Nov 2, 2022 · 14 comments
Assignees
Labels
area/vertx kind/bug Something isn't working triage/upstream Used for issues which are caused by issues in upstream projects/dependency

Comments

@rsvoboda
Copy link
Member

rsvoboda commented Nov 2, 2022

Describe the bug

6 failed tests in h2spec (conformance testing tool for HTTP/2) run

Failures:

Hypertext Transfer Protocol Version 2 (HTTP/2)
  3. Starting HTTP/2
    3.5. HTTP/2 Connection Preface
      using source address 127.0.0.1:56873
      × 2: Sends invalid connection preface
        -> The endpoint MUST terminate the TCP connection.
           Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                     Connection closed
             Actual: Error: unexpected EOF

  5. Streams and Multiplexing
    5.1. Stream States
      using source address 127.0.0.1:56888
      × 6: half closed (remote): Sends a HEADERS frame
        -> The endpoint MUST respond with a stream error of type STREAM_CLOSED.
           Expected: GOAWAY Frame (Error Code: STREAM_CLOSED)
                     RST_STREAM Frame (Error Code: STREAM_CLOSED)
                     Connection closed
             Actual: Timeout
      using source address 127.0.0.1:56894
      × 12: closed: Sends a HEADERS frame
        -> The endpoint MUST treat this as a connection error of type STREAM_CLOSED.
           Expected: GOAWAY Frame (Error Code: STREAM_CLOSED)
                     Connection closed
             Actual: RST_STREAM Frame (length:4, flags:0x00, stream_id:1)

      5.1.1. Stream Identifiers
        using source address 127.0.0.1:56897
        × 2: Sends stream identifier that is numerically smaller than previous
          -> The endpoint MUST respond with a connection error of type PROTOCOL_ERROR.
             Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                       Connection closed
               Actual: DATA Frame (length:0, flags:0x01, stream_id:5)

  8. HTTP Message Exchanges
    8.1. HTTP Request/Response Exchange
      8.1.2. HTTP Header Fields
        8.1.2.3. Request Pseudo-Header Fields
          using source address 127.0.0.1:56961
          × 1: Sends a HEADERS frame with empty ":path" pseudo-header field
            -> The endpoint MUST respond with a stream error of type PROTOCOL_ERROR.
               Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                         RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
                         Connection closed
                 Actual: HEADERS Frame (length:9, flags:0x25, stream_id:1)

HPACK: Header Compression for HTTP/2
  4. Dynamic Table Management
    4.2. Maximum Table Size
      using source address 127.0.0.1:56973
      × 1: Sends a dynamic table size update at the end of header block
        -> The endpoint MUST treat this as a decoding error.
           Expected: GOAWAY Frame (Error Code: COMPRESSION_ERROR)
                     Connection closed
             Actual: DATA Frame (length:0, flags:0x01, stream_id:1)

Finished in 10.6355 seconds
146 tests, 140 passed, 0 skipped, 6 failed

Tried to run it against WildFly and they have just 2 failed tests.

Expected behavior

To be on par with WildFly, ideally all tests pass

Actual behavior

146 tests, 140 passed, 0 skipped, 6 failed

How to Reproduce?

Output of uname -a or ver

No response

Output of java -version

Java 17

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.13.3.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@rsvoboda rsvoboda added kind/bug Something isn't working area/vertx labels Nov 2, 2022
@rsvoboda
Copy link
Member Author

rsvoboda commented Nov 2, 2022

CC @cescoffier, @geoand

@geoand
Copy link
Contributor

geoand commented Nov 2, 2022

Likely something for @pmlopes and @vietj

@cescoffier
Copy link
Member

All (except maybe the last one) can only be fixed in vertx and maybe netty.

@vietj

@cescoffier cescoffier added the triage/upstream Used for issues which are caused by issues in upstream projects/dependency label Nov 7, 2022
@vietj
Copy link

vietj commented Nov 8, 2022

I will have a look to determine which libraries are faulty (vertx or netty) and create corresponding issues

@vietj
Copy link

vietj commented Nov 8, 2022

http2/3.5 Sends invalid connection preface

Vert.x HTTP server supports both HTTP/2 and HTTP/1.1, when the client sends an incorrect preface over clear text, the server assumes an HTTP/1 client as this is not over a TLS connection and sends an HTTP/1.1 400 Bad request response. The client uses h2c with no prior negotiation (supported by Vert.x), which means it sends directly the connection preface

When the server is accessed over SSL then the test passes.

This behavior seems reasonnable to me.

@vietj
Copy link

vietj commented Nov 9, 2022

http2/5.1.1 Sends stream identifier that is numerically smaller than previous

Seems to be a Netty defect: netty/netty#12985

I will contribute a fix there.

@vietj
Copy link

vietj commented Nov 9, 2022

http2/8.1.2.3 Sends a HEADERS frame with empty ":path" pseudo-header field

Vert.x defect: eclipse-vertx/vert.x#4529

@vietj
Copy link

vietj commented Nov 13, 2022

hpack/4.2 Sends a dynamic table size update at the end of header block

Netty defect: netty/netty#12988

@cescoffier
Copy link
Member

With the update to Vert.x 4.3.5, the following issues are fixed:

  • http2/8.1.2.3 Sends a HEADERS frame with empty ":path" pseudo-header field

@cescoffier
Copy link
Member

HPACK: Header Compression for HTTP/2 is also fixed (netty version updated)

@cescoffier
Copy link
Member

I would consider "http2/5.1.1 Sends stream identifier that is numerically smaller than previous" not really clear. See the discussion from netty/netty#12985. Requiring all the ids in memory is not really possible.

@cescoffier
Copy link
Member

cescoffier commented Feb 13, 2023

Summary:

@geoand
Copy link
Contributor

geoand commented Jul 21, 2023

Is this still a problem?

@rsvoboda
Copy link
Member Author

Not all items are fixed as mentioned in Clement's summary, also

Currenty (Quarkus 3.2.1.Final) results (3.5 fail could be ignored)

Hypertext Transfer Protocol Version 2 (HTTP/2)
  3. Starting HTTP/2
    3.5. HTTP/2 Connection Preface
      using source address 127.0.0.1:54272
      × 2: Sends invalid connection preface
        -> The endpoint MUST terminate the TCP connection.
           Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                     Connection closed
             Actual: Error: unexpected EOF

  5. Streams and Multiplexing
    5.1. Stream States
      using source address 127.0.0.1:54287
      × 6: half closed (remote): Sends a HEADERS frame
        -> The endpoint MUST respond with a stream error of type STREAM_CLOSED.
           Expected: GOAWAY Frame (Error Code: STREAM_CLOSED)
                     RST_STREAM Frame (Error Code: STREAM_CLOSED)
                     Connection closed
             Actual: Timeout
      using source address 127.0.0.1:54293
      × 12: closed: Sends a HEADERS frame
        -> The endpoint MUST treat this as a connection error of type STREAM_CLOSED.
           Expected: GOAWAY Frame (Error Code: STREAM_CLOSED)
                     Connection closed
             Actual: RST_STREAM Frame (length:4, flags:0x00, stream_id:1)

      5.1.1. Stream Identifiers
        using source address 127.0.0.1:54296
        × 2: Sends stream identifier that is numerically smaller than previous
          -> The endpoint MUST respond with a connection error of type PROTOCOL_ERROR.
             Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                       Connection closed
               Actual: DATA Frame (length:0, flags:0x01, stream_id:5)

netty/netty#12985 is still open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertx kind/bug Something isn't working triage/upstream Used for issues which are caused by issues in upstream projects/dependency
Projects
Status: In Progress
Development

No branches or pull requests

4 participants