Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3844

Don't send GOAWAY frame when receiving a DATA frame on a closed stream

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0.0
    • Component/s: HTTP/2
    • Labels:
      None

      Description

      I am seeing in production we are closing the connection when we get a DATA frame on a closed connection:

      Breakpoint 3, rcv_data_frame (cs=..., cstate=..., frame=...) at Http2ConnectionState.cc:84
      84	Http2ConnectionState.cc: No such file or directory.
      	in Http2ConnectionState.cc
      #0  rcv_data_frame (cs=..., cstate=..., frame=...) at Http2ConnectionState.cc:84
      #1  0x0000000000644359 in Http2ConnectionState::main_event_handler (this=0x2b943c89c298, event=2253, edata=0x7fffc27fd120) at Http2ConnectionState.cc:733
      #2  0x0000000000510b74 in Continuation::handleEvent (this=0x2b943c89c298, event=2253, data=0x7fffc27fd120) at ../iocore/eventsystem/I_Continuation.h:145
      #3  0x000000000063ed1d in send_connection_event (cont=0x2b943c89c298, event=2253, edata=0x7fffc27fd120) at Http2ClientSession.cc:59
      
      $1 = (Http2Stream *) 0x0
      $2 = 87
      $3 = 87
      

      In the code:

        Http2Stream *stream = cstate.find_stream(id);
        if (stream == NULL) {
          if (id <= cstate.get_latest_stream_id()) {
            return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, HTTP2_ERROR_STREAM_CLOSED);  <--- should be changed to HTTP2_ERROR_CLASS_STREAM
          } else {
            return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, HTTP2_ERROR_PROTOCOL_ERROR);
          }
        }
      

      RFC - 5.4.2. Stream Error Handling:

         Normally, an endpoint SHOULD NOT send more than one RST_STREAM frame
         for any stream.  However, an endpoint MAY send additional RST_STREAM
         frames if it receives frames on a closed stream after more than a
         round-trip time.  This behavior is permitted to deal with misbehaving
         implementations.
      

        Attachments

          Activity

            People

            • Assignee:
              bcall Bryan Call
              Reporter:
              bcall Bryan Call
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: