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

Failing test: Reentrant close in HttpRequestDecoder #13730

Open
wants to merge 3 commits into
base: 4.1
Choose a base branch
from

Commits on Dec 15, 2023

  1. Failing test: Reentrant close in HttpRequestDecoder

    Discovered by fuzzing, but I'm not sure whether this can actually happen outside EmbeddedChannel.
    
    Normally, HttpRequestDecoder will strictly follow the pattern `(HttpRequest HttpContent* LastHttpContent)*` for downstream handlers. However, when a downstream handler closes the channel inside a `channelRead` for a `HttpRequest`, this may reorder inputs, eg `HttpRequest HttpRequest LastHttpContent LastHttpContent`. This is mostly ByteToMessageDecoder's fault, and I'm not sure how to fix it in a performance-neutral way. Basically, `HttpRequestDecoder.channelInactive` is called while `HttpRequestDecoder.channelRead` is still running, so the next request gets inserted mid-request.
    
    If this can only happen in EmbeddedChannel (which I'm not sure of), then we should just fix EmbeddedChannel instead.
    yawkat committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    93ac861 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. EmbeddedChannel: Ensure tasks are not executed while we already execu…

    …te something else
    
    Motivation:
    
    We need to ensure we only try to run tasks that were submitted for exectuion when we are not currently run other code in the EmbeddedChannel. We failed to do so and so coudl end up executing tasks directly while these should have been only run once the current execution is complete.
    
    Modifications:
    
    - Keep track of how deep our "execution stack" is and only run the pending tasks if we are sure it will not cause out of order problems
    - Testcase
    
    Result:
    
    Correctly respect ordering
    normanmaurer committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    b6dcda3 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2024

  1. Configuration menu
    Copy the full SHA
    d47da3c View commit details
    Browse the repository at this point in the history