GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — bpo-46070: Fix asyncio initialisation guard by erlend-aasland · Pull Request #30423 · python/cpython Conversation
|
|
Maybe we should run this through the buildbots. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This might qualify for a NEWS entry, as it fixes segfaults on 3.10 and 3.9 (and 3.8, but 3.8 is in security-fix-mode-only). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
module_init() is called in parallel multiple times from different interpreters (in different threads). I understand that module_init() leaks references when calling multiple times in parallel, since it doesn't use |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Yes, there are ref leaks, but as you say they are best fixed by converting global state to module state and implement proper multi-phase init. I've got a private branch for this work. This demands a separate bpo issue, and we should involve the asyncio maintaner before continuing with that effort :) Thanks for reviewing! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Oh, I didn't notice the failing "news" job. Yes, please document the fix. If I understand correctly, this change fix a crash an importing the asyncio module from different sub-interpreters in parallel. And the workaround was to import asyncio in the main interpreter before spawning sub-interpreters. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sure, I'll try to write something sensible :) Also, we could probably use a more compact version of your reproducer as a regression test. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Adding a test is optional for me. It's up to me. But I would like to see a NEWS entry please. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
You got it 🥁 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @erlend-aasland for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
If init flag is set, exit successfully immediately. If not, only set the flag after successful initialization. (cherry picked from commit b127e70) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
|
GH-30453 is a backport of this pull request to the 3.10 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
If init flag is set, exit successfully immediately. If not, only set the flag after successful initialization. (cherry picked from commit b127e70) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
|
GH-30454 is a backport of this pull request to the 3.9 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
If init flag is set, exit successfully immediately. If not, only set the flag after successful initialization. (cherry picked from commit b127e70) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
If init flag is set, exit successfully immediately. If not, only set the flag after successful initialization. (cherry picked from commit b127e70) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.