[issue40533] [subinterpreters] Don't share Python objects between interpreters

2022-01-13 Thread STINNER Victor
STINNER Victor added the comment: Sharing objects between multiple interpreters can cause complex bugs leading to crashes: https://bugs.python.org/issue46070#msg410493 For this specific bug, I wrote a workaround (GH-30577). -- ___ Python tracker

[issue40533] [subinterpreters] Don't share Python objects between interpreters

2021-12-15 Thread STINNER Victor
STINNER Victor added the comment: Until all Python stdlib C extensions and all third-party C extensions will be modified to no longer use and define static types and will stop shared Python objects between two interpreters, we can no longer micro-optimize the comparison of two interned

[issue40533] [subinterpreters] Don't share Python objects between interpreters

2021-03-17 Thread STINNER Victor
STINNER Victor added the comment: > To get one GIL per interpreter (bpo-40512), either PyObject.ob_refcnt member > must become an atomic variable, or subinterpreters must not share any object. The current plan is to not share any object between two interpreters, so this PR is not needed. I

[issue40533] [subinterpreters] Don't share Python objects between interpreters

2020-10-31 Thread STINNER Victor
STINNER Victor added the comment: > For example, PyModule_Type is declared statically and so shared by all > interpreters and so PyModule_Type.tp_mro tuple is accessed in parallel by > multiple interpreters. Another example of this issue are parallel Py_INCREF/Py_DECREF calls on the

[issue40533] [subinterpreters] Don't share Python objects between interpreters

2020-05-14 Thread STINNER Victor
Change by STINNER Victor : -- components: +Subinterpreters -Interpreter Core title: Subinterpreters: don't share Python objects between interpreters -> [subinterpreters] Don't share Python objects between interpreters ___ Python tracker

[issue40533] Subinterpreters: don't share Python objects between interpreters

2020-05-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset d8135e913ab7c694db247c86d0a84c450c32d86e by Victor Stinner in branch 'master': bpo-40533: Disable GC in subinterpreters (GH-19961) https://github.com/python/cpython/commit/d8135e913ab7c694db247c86d0a84c450c32d86e --

[issue40533] Subinterpreters: don't share Python objects between interpreters

2020-05-06 Thread STINNER Victor
STINNER Victor added the comment: > Yep, before per-interpreter GIL is official we must get to the point where > *no* PyObject objects are shared. I would like to add: "no PyObject objects are shared in the stdlib" ;-) -- ___ Python tracker

[issue40533] Subinterpreters: don't share Python objects between interpreters

2020-05-06 Thread Eric Snow
Eric Snow added the comment: Yep, before per-interpreter GIL is official we must get to the point where *no* PyObject objects are shared. Making PyObject.ob_refcnt atomic until then (only as part of the experiment) should be fine. -- ___ Python

[issue40533] Subinterpreters: don't share Python objects between interpreters

2020-05-06 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40533] Subinterpreters: don't share Python objects between interpreters

2020-05-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19277 pull_request: https://github.com/python/cpython/pull/19961 ___ Python tracker ___

[issue40533] Subinterpreters: don't share Python objects between interpreters

2020-05-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +19274 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19958 ___ Python tracker ___

[issue40533] Subinterpreters: don't share Python objects between interpreters

2020-05-06 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40533] Subinterpreters: don't share Python objects between interpreters

2020-05-06 Thread STINNER Victor
New submission from STINNER Victor : To get one GIL per interpreter (bpo-40512), either PyObject.ob_refcnt member must become an atomic variable, or subinterpreters must not share any object. Right now, subinterpreters share Python objects. For example, PyModule_Type is declared statically