Skip to content

set MaxOperationsPerDrain to 0 causes worker thread busy spinning #4705

@qzhuyan

Description

@qzhuyan

Describe the bug

set connection Settings.MaxOperationsPerDrain to 0 causes worker busy spinning and connection hang (no callback.)

Affected OS

  • Windows
  • Linux
  • macOS
  • Other (specify below)

Additional OS information

No response

MsQuic version

v2.3

Steps taken to reproduce bug

  1. In Listener callback handles QUIC_LISTENER_EVENT_NEW_CONNECTION
  2. in another thread (none worker thread), set the new connection settings MaxOperationsPerDrain to zero with
MsQuic->SetParam(Connection,
                                   QUIC_PARAM_CONN_SETTINGS,
                                   sizeof(QUIC_SETTINGS),
                                    &Settings)))

and it returns success.

  1. In the same thread same as above, set conn configuration with MsQuic->ConnectionSetConfiguration
    and it returns success.

  2. One of the worker thread busy spin (100% CPU usage)

Expected behavior

Worker thread should not busy spin.

OR

Disallow set MaxOperationsPerDrain to 0 and step 3) should return error.

AND
Document the usecase of MaxOperationsPerDrain=0 if it is by design.

Actual outcome

  1. One of the worker thread busy spin (100% CPU usage)

Additional details

This is found during prop based fuzzy test of quicer

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CoreRelated to the shared, core protocol logicBug: CoreA code bug in the Core MsQuic codeexternalProposed by non-MSFT

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions