Skip to content

gh-159118: Use MTA COM initialization in _wmi to avoid crashes under load - #159463

Merged
zooba merged 1 commit into
python:mainfrom
utam-1:gh-159118-wmi-mta
Nov 3, 2026
Merged

zooba merged 1 commit into
python:mainfrom
utam-1:gh-159118-wmi-mta

Conversation

@utam-1

@utam-1 utam-1 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Initialize COM with COINIT_MULTITHREADED instead of COINIT_APARTMENTTHREADED in _wmimodule.cpp to prevent hidden window registration contention and RPC_NT_INTERNAL_ERROR crashes under high concurrency.

…under load

Initialize COM with COINIT_MULTITHREADED instead of COINIT_APARTMENTTHREADED in _wmimodule.cpp to prevent hidden window registration contention and RPC_NT_INTERNAL_ERROR crashes under high concurrency.
@utam-1
utam-1 requested a review from a team as a code owner October 15, 2026 13:23
@kumaraditya303 kumaraditya303 added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Nov 3, 2026
@kumaraditya303
kumaraditya303 requested a review from zooba November 3, 2026 15:58
@zooba
zooba merged commit 99799a9 into python:main Nov 3, 2026
62 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @utam-1 for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Nov 3, 2026

Copy link
Copy Markdown

GH-161256 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 3, 2026
@bedevere-app

bedevere-app Bot commented Nov 3, 2026

Copy link
Copy Markdown

GH-161257 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Nov 3, 2026
zooba pushed a commit that referenced this pull request Nov 3, 2026
…9463)

gh-159118: Use multithreaded COM initialization in _wmi (GH-159463)
(cherry picked from commit 99799a9)

Co-authored-by: Uttam Bhadauriya <uttamsinghbhadoriya23@gmail.com>
zooba pushed a commit that referenced this pull request Nov 3, 2026
…9463)

gh-159118: Use multithreaded COM initialization in _wmi (GH-159463)
(cherry picked from commit 99799a9)

Co-authored-by: Uttam Bhadauriya <uttamsinghbhadoriya23@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants