Skip to content

[HTTP3] Loopback server WaitForCancellationAsync logic is wrong #58234

Closed

Description

@geoffkizer

See here:

public async Task WaitForCancellationAsync(bool ignoreIncomingData = true)

All we are doing here is reading to the end of the read stream.

What we should be doing is validating that the client cancels the request, by aborting read and write with H3_REQUEST_CANCELLED. For reference, see the HTTP2 loopback implementation, which is waiting to receive a RST_STREAM.

Perhaps ironically, we need to implement #58229 in order to do be able to do this.

This means that any test that uses WaitForCancellationAsync is not actually validating cancellation properly. For better or worse, most of our cancellation tests don't actually use WaitForCancellationAsync anyway -- though they probably should. I will file a separate issue on that.

Activity

  1. ghost added
    untriaged
    on Aug 27, 2021
  2. geoffkizer commented on Aug 27, 2021

    @geoffkizer
    ContributorAuthor

    The biggest impact of this is the test IncompleteResponseStream_ResponseDropped_CancelsRequestToServer.

    This is intended to test response finalization. Right now, though, it's not working correctly because WaitForCancellationAsync is just returning immediately.

  3. added
    disabled-test
    on Aug 27, 2021
  4. geoffkizer commented on Aug 27, 2021

    @geoffkizer
    ContributorAuthor

    Added "disabled-test" label to track re-enabling the IncompleteResponseStream_ResponseDropped_CancelsRequestToServer test, which will be disabled as part of #58088

  5. added this to the 7.0.0 milestone on Aug 27, 2021
  6. added
    test-enhancement
    and removed
    untriaged
    on Aug 27, 2021
  7. changed the title [-]HTTP3: Loopback server WaitForCancellationAsync logic is wrong[/-] [+][HTTP3] Loopback server WaitForCancellationAsync logic is wrong[/+] on Aug 31, 2021
  8. self-assigned this
    on Sep 17, 2021
  9. CarnaViire commented on Oct 7, 2021

    @CarnaViire
    Member

    While I can fix WaitForCancellationAsync now, the only HTTP/3 test that uses it (IncompleteResponseStream_ResponseDropped_CancelsRequestToServer) still would not work because of #60141

  10. ghost added
    in-pr
    on Oct 14, 2021
  11. added a commit that references this issue on Oct 14, 2021
    edf638f
  12. ghost removed
    in-pr
    on Oct 14, 2021
  13. ghost locked as resolved and limited conversation to collaborators on Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.Net.Httpdisabled-testtest-enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions