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

set MaxOperationsPerDrain to 0 causes worker thread busy spinning #4705

Closed
1 of 4 tasks
qzhuyan opened this issue Dec 12, 2024 · 0 comments · Fixed by #4706
Closed
1 of 4 tasks

set MaxOperationsPerDrain to 0 causes worker thread busy spinning #4705

qzhuyan opened this issue Dec 12, 2024 · 0 comments · Fixed by #4706
Labels
Area: Core Related to the shared, core protocol logic Bug: Core A code bug in the Core MsQuic code external Proposed by non-MSFT
Milestone

Comments

@qzhuyan
Copy link
Contributor

qzhuyan commented Dec 12, 2024

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

@nibanks nibanks added Bug: Core A code bug in the Core MsQuic code external Proposed by non-MSFT Area: Core Related to the shared, core protocol logic labels Dec 12, 2024
@nibanks nibanks linked a pull request Dec 12, 2024 that will close this issue
@nibanks nibanks added this to the Future milestone Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Related to the shared, core protocol logic Bug: Core A code bug in the Core MsQuic code external Proposed by non-MSFT
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants