You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "bneradt (via GitHub)" <gi...@apache.org> on 2026/06/23 21:37:12 UTC

[PR] Downgrade inbound H2 stream error log [trafficserver]

bneradt opened a new pull request, #13316:
URL: https://github.com/apache/trafficserver/pull/13316

   Malformed client HTTP/2 streams can produce noisy error-level
   diagnostics even though the malformed parse details are now available
   in transaction logs via apache/trafficserver#13059. The original
   downgrade targeted the outbound session stream creation path, which
   can hide origin-side signals such as concurrent stream limit failures.
   
   This downgrades the inbound rcv_frame stream-error diagnostic to
   Http2StreamDebug while leaving outbound stream creation errors at Error
   level. This also updates the malformed request AuTest to look for the
   debug diagnostic in traffic.out.
   
   Stacked on apache/trafficserver#13315. Once #13315 lands, this PR should contain only the inbound stream-error log downgrade and matching AuTest update.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Downgrade inbound H2 stream error log [trafficserver]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13316:
URL: https://github.com/apache/trafficserver/pull/13316#discussion_r3463369344


##########
src/proxy/http2/Http2ConnectionState.cc:
##########
@@ -1494,8 +1494,8 @@ Http2ConnectionState::rcv_frame(const Http2Frame *frame)
       // The Http2ClientSession will shutdown because connection_state.is_state_closed() will be true
     } else if (error.cls == Http2ErrorClass::HTTP2_ERROR_CLASS_STREAM) {
       if (error.msg) {
-        Error("HTTP/2 stream error code=0x%02x client_ip=%s session_id=%" PRId64 " stream_id=%u %s", static_cast<int>(error.code),
-              client_ip, session->get_connection_id(), stream_id, error.msg);
+        Http2StreamDebug(session, stream_id, "HTTP/2 stream error code=0x%02x client_ip=%s session_id=%" PRId64 " stream_id=%u %s",
+                         static_cast<int>(error.code), client_ip, session->get_connection_id(), stream_id, error.msg);

Review Comment:
   `Http2StreamDebug` already prefixes the message with the connection id (`[session_id]`) and stream id (`[stream_id]`). Keeping `session_id=%...` and `stream_id=%u` in the formatted message duplicates that data and also requires passing `stream_id` twice, making this log line noisier than the other `Http2StreamDebug` calls in this file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Downgrade inbound H2 stream error log [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt merged PR #13316:
URL: https://github.com/apache/trafficserver/pull/13316


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Downgrade inbound H2 stream error log [trafficserver]

Posted by "bryancall (via GitHub)" <gi...@apache.org>.
bryancall commented on PR #13316:
URL: https://github.com/apache/trafficserver/pull/13316#issuecomment-4792550156

   Heads up on a possible gap in this downgrade. The STREAM-class branch in `rcv_frame` that this moves to `Http2StreamDebug` is reached not only by client protocol errors but by server-side `INTERNAL_ERROR` returns from `rcv_data_frame`:
   
   - `read_vio_writer() == nullptr` -> `HTTP2_ERROR_CLASS_STREAM` / `INTERNAL_ERROR` (`"no writer"`)
   - short `writer->write()` -> `HTTP2_ERROR_CLASS_STREAM` / `INTERNAL_ERROR` (`"Write mismatch"`)
   
   The #13059 rationale covers malformed inbound *requests* (header/parse failures), which are genuine bad-client noise. It doesn't cover a mid-DATA internal write fault: that's ATS failing internally, and after this change the only trace is gated behind the `http2` debug tag, which is off in production. A recurring internal buffer/VIO fault would then surface only as clients seeing intermittent RST_STREAM with no server-side log.
   
   Would it be worth branching on `error.code` here, keeping `Error()` (or a rate-limited `Warning()`) for `HTTP2_ERROR_INTERNAL_ERROR` and using `Http2StreamDebug` for the client-fault codes? One thing I wasn't sure of: whether a null read-VIO or short write is ever client-reachable (e.g. a client resetting its read side mid-stream). If it is, the severity argument weakens and debug is fine.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Downgrade inbound H2 stream error log [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #13316:
URL: https://github.com/apache/trafficserver/pull/13316#discussion_r3463430148


##########
src/proxy/http2/Http2ConnectionState.cc:
##########
@@ -1494,8 +1494,8 @@ Http2ConnectionState::rcv_frame(const Http2Frame *frame)
       // The Http2ClientSession will shutdown because connection_state.is_state_closed() will be true
     } else if (error.cls == Http2ErrorClass::HTTP2_ERROR_CLASS_STREAM) {
       if (error.msg) {
-        Error("HTTP/2 stream error code=0x%02x client_ip=%s session_id=%" PRId64 " stream_id=%u %s", static_cast<int>(error.code),
-              client_ip, session->get_connection_id(), stream_id, error.msg);
+        Http2StreamDebug(session, stream_id, "HTTP/2 stream error code=0x%02x client_ip=%s session_id=%" PRId64 " stream_id=%u %s",
+                         static_cast<int>(error.code), client_ip, session->get_connection_id(), stream_id, error.msg);

Review Comment:
   Good point. I removed the explicit session_id and stream_id fields from the message and rely on Http2StreamDebug’s existing [connection] [stream] prefix; client_ip and the error text remain.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org