[issue44374] PyThreadState_IsCurrent bug under building Python with --with-experimental-isolated-subinterpreters

2021-06-10 Thread junyixie
New submission from junyixie : under building Python with --with-experimental-isolated-subinterpreters PyThreadState_IsCurrent use _PyRuntime.gilstate. is shared by multi sub interpreters. Use interpreter `gil->last_holder == state` can fix it? ``` static int PyThreadState_IsCurr

[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-06-29 Thread junyixie
New submission from junyixie : In _PyStructSequence_InitType, it will check type is initialized. but when we have multi subinterpreters, type may be initialized expected. when type already been initialized, should return 0 rather than throw exception. ```c /* PyTypeObject has already been

[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-06-29 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +25516 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26949 ___ Python tracker <https://bugs.python.org/issu

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
Change by junyixie : -- pull_requests: +23738 pull_request: https://github.com/python/cpython/pull/24971 ___ Python tracker <https://bugs.python.org/issue43

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
Change by junyixie : -- pull_requests: +23739 pull_request: https://github.com/python/cpython/pull/24972 ___ Python tracker <https://bugs.python.org/issue43

[issue43601] Tools/c-analyzer/check-c-globals.py run throw exception err

2021-03-22 Thread junyixie
New submission from junyixie : how to use Tools/c-analyzer/check-c-globals.py? in readme, python3 Tools/c-analyzer/check-c-globals.py /Users/xiejunyi/cpython/Tools/c-analyzer/c_common/tables.py:236: FutureWarning: Possible nested set at position 12 _COLSPEC_RE = re.compile(textwrap.dedent

[issue43601] Tools/c-analyzer/check-c-globals.py run throw exception err

2021-03-23 Thread junyixie
junyixie added the comment: found in must-reslove.sh function run_capi() { ./python Tools/c-analyzer/c-analyzer.py capi \ --no-progress \ --group-by kind \ --func --inline --macro \ --no-show-empty \ --ignore '' \ $@ } -- resolution

[issue43629] fix _PyRun_SimpleFileObject create __main__ module and cache. Call this function multiple times, the attributes stored in the module dict will affect eachother.

2021-03-26 Thread junyixie
Change by junyixie : -- resolution: -> wont fix ___ Python tracker <https://bugs.python.org/issue43629> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43629] fix _PyRun_SimpleFileObject create __main__ module and cache. Call this function multiple times, the attributes stored in the module dict will affect eachother.

2021-03-25 Thread junyixie
New submission from junyixie : fix _PyRun_SimpleFileObject create __main__ module and cache. Call this function multiple times, the attributes stored in the module dict will affect eachother. create __main__ module, and cache it. for example. if we run fileA, call _PyRun_SimpleFileObject

[issue43629] fix _PyRun_SimpleFileObject create __main__ module and cache. Call this function multiple times, the attributes stored in the module dict will affect eachother.

2021-03-25 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +23773 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25023 ___ Python tracker <https://bugs.python.org/issu

[issue43687] use unicode_state empty string before unicode_init. without define WITH_DOC_STRINGS

2021-03-31 Thread junyixie
New submission from junyixie : use unicode_state empty string before unicode_init. without define WITH_DOC_STRINGS. PyType_Ready call PyUnicode_FromString, if doc string striped, cause crash. unicode_get_empty() must not be called before _PyUnicode_Init() or after _PyUnicode_Fini

[issue43687] use unicode_state empty string before unicode_init. without define WITH_DOC_STRINGS

2021-03-31 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +23876 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25129 ___ Python tracker <https://bugs.python.org/issu

[issue43630] unittest use dir(module) to load test cases. Run unittest file by _PyRun_SimpleFileObject, have bug

2021-03-26 Thread junyixie
New submission from junyixie : _PyRun_SimpleFileObject load __main__ module at cache. Call this function multiple times, the attributes stored in the module dict will affect eachother. for example. if we run test_A.py, call _PyRun_SimpleFileObject will create __main__ module, test_A.py add

[issue43441] [Subinterpreters]: global variable next_version_tag cause method cache bug

2021-03-11 Thread junyixie
junyixie added the comment: under building Python with --with-experimental-isolated-subinterpreters -- ___ Python tracker <https://bugs.python.org/issue43

[issue40601] [C API] Hide static types from the limited C API

2021-03-12 Thread junyixie
junyixie added the comment: It seems that there is no continued progress for move static type in heap.This will make it impossible to continue to achieve sub interpreters parallel. Are there any plans to try other solutions to the problem? In my project, i try to slove this problem, It can

[issue23835] configparser does not convert defaults to strings

2021-03-12 Thread junyixie
Change by junyixie : -- nosy: +JunyiXie nosy_count: 7.0 -> 8.0 pull_requests: +23600 pull_request: https://github.com/python/cpython/pull/24821 ___ Python tracker <https://bugs.python.org/issu

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-03-14 Thread junyixie
junyixie added the comment: Made two changes: 1. support pymalloc for subinterpreters. each subinterpreter has pymalloc_state 2. _copy_raw_string api alloc memory use PyMem_RawFree and PyMem_RawMalloc. I extend _xxsubinterpretermodule.c to support call any function in sub interpreter. when

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-03-14 Thread junyixie
junyixie added the comment: https://github.com/python/cpython/pull/24857 -- ___ Python tracker <https://bugs.python.org/issue43313> ___ ___ Python-bugs-list m

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-03-14 Thread junyixie
junyixie added the comment: github pr -- keywords: +patch message_count: 2.0 -> 3.0 pull_requests: +23617 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24857 ___ Python tracker <https://bugs.python.org/i

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-03-15 Thread junyixie
junyixie added the comment: > malloc pointer in interpreterA and free pointer is usual. malloc pointer in interpreterA and free pointer in interpreterB is usual. -- ___ Python tracker <https://bugs.python.org/issu

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-03-15 Thread junyixie
junyixie added the comment: > 2. when free memory address, find this address in all interpreter pymalloc > pool. and free it.(but it need add lock to pymalloc) when finalize_interp_delete, we need keep interpreter pymalloc pool in linked list.It will be used when search memory in py

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-03-15 Thread junyixie
junyixie added the comment: by the way, There is no operation to destroy the memory pool in the cpython code. Repeated creation of the pymalloc pool will cause memory leaks. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-03-15 Thread junyixie
junyixie added the comment: There is a problem: if we bound pymalloc state with a interpreter. malloc pointer in interpreterA and free pointer is usual. it's cause a problem. when we use PyObject_Free, 1. we look up address in pymalloc pool. 2. if not find, current code will call

[issue43551] [Subinterpreters]: PyImport_Import use static silly_list under building Python with --with-experimental-isolated-subinterpreters share silly_list in multi subinterpreters cause crash.

2021-03-19 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +23691 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24929 ___ Python tracker <https://bugs.python.org/issu

[issue43551] [Subinterpreters]: PyImport_Import use static silly_list under building Python with --with-experimental-isolated-subinterpreters share silly_list in multi subinterpreters cause crash.

2021-03-19 Thread junyixie
New submission from junyixie : fix PyImport_Import use static silly_list under building Python with --with-experimental-isolated-subinterpreters share silly_list in multi subinterpreters cause crash. Under the sub interpreters parallel, PyObject_CallFunction clean stack, Py_DECREF(stack[i

[issue43311] bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create .

2021-03-10 Thread junyixie
junyixie added the comment: Yes, this is an issue under building Python with --with-experimental-isolated-subinterpreters -- ___ Python tracker <https://bugs.python.org/issue43

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
junyixie added the comment: 43551 [Subinterpreters]: PyImport_Import use static silly_list under building Python with --with-experimental-isolated-subinterpreters share silly_list in multi subinterpreters cause crash. https://bugs.python.org/issue43551 -- message_count: 1.0 ->

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
junyixie added the comment: grep -E 'static (\w+) \*(\w+) =' $(find . -name "*.c") | wc -l 67 static variable may need fix ➜ cpython git:(master) grep -E 'static (\w+) \*(\w+) =' $(find . -name "*.c") ./PC/winreg.c:static char *failMsg = "bad operand type&q

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
junyixie added the comment: fix ./Objects/exceptions.c:static PyObject *print_prefix = NULL; ./Objects/exceptions.c:static PyObject *exec_prefix = NULL; https://github.com/python/cpython/pull/24965 -- ___ Python tracker <ht

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
Change by junyixie : -- pull_requests: +23726 pull_request: https://github.com/python/cpython/pull/24966 ___ Python tracker <https://bugs.python.org/issue43

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
New submission from junyixie : use static module variable under building Python with --with-experimental-isolated-subinterpreters cause crash. compiler_mod(struct compiler *c, mod_ty mod) { PyCodeObject *co; int addNone = 1; static PyObject *module; if (!module

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +23720 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24963 ___ Python tracker <https://bugs.python.org/issu

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
Change by junyixie : -- pull_requests: +23724 pull_request: https://github.com/python/cpython/pull/24965 ___ Python tracker <https://bugs.python.org/issue43

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
junyixie added the comment: -> Okay, I will fix these problems first. (Need for my own project) -- ___ Python tracker <https://bugs.python.org/issu

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
junyixie added the comment: Okay, I will fix these problems first. (Need for your own project) -- ___ Python tracker <https://bugs.python.org/issue43

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
Change by junyixie : -- pull_requests: +23727 pull_request: https://github.com/python/cpython/pull/24968 ___ Python tracker <https://bugs.python.org/issue43

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
Change by junyixie : -- pull_requests: +23728 pull_request: https://github.com/python/cpython/pull/24969 ___ Python tracker <https://bugs.python.org/issue43

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
Change by junyixie : -- pull_requests: +23729 pull_request: https://github.com/python/cpython/pull/24970 ___ Python tracker <https://bugs.python.org/issue43

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-03-22 Thread junyixie
Change by junyixie : -- keywords: +patch nosy: +JunyiXie nosy_count: 1.0 -> 2.0 pull_requests: +23730 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24971 ___ Python tracker <https://bugs.p

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-03-22 Thread junyixie
junyixie added the comment: I will fix the static variable problem of frequently used code -- ___ Python tracker <https://bugs.python.org/issue43588> ___ ___

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-03-22 Thread junyixie
Change by junyixie : -- pull_requests: +23731 pull_request: https://github.com/python/cpython/pull/24972 ___ Python tracker <https://bugs.python.org/issue43

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-11 Thread junyixie
junyixie added the comment: Should Make dtoa bigint free list per-interpreter. static Bigint *bigint_freelist[Kmax+1]; -> _is { Bigint *bigint_freelist[Kmax+1]; } -- message_count: 43.0 -> 44.0 nosy: +JunyiXie nosy_count: 5.0 -> 6.0 pull_requests: +23587 pull_reque

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-11 Thread junyixie
junyixie added the comment: https://github.com/python/cpython/pull/24821/commits/9d7681dbd273b5025fd9b19d1be0a1f978a0b12e -- ___ Python tracker <https://bugs.python.org/issue40

[issue43441] [Subinterpreters]: global variable next_version_tag cause method cache bug

2021-03-11 Thread junyixie
Change by junyixie : -- components: +Subinterpreters -Interpreter Core title: mutilcorevm: global variable next_version_tag cause method cache bug -> [Subinterpreters]: global variable next_version_tag cause method cache bug ___ Python trac

[issue43441] [Subinterpreters]: global variable next_version_tag cause method cache bug

2021-03-11 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +23588 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24822 ___ Python tracker <https://bugs.python.org/issu

[issue43441] [Subinterpreters]: global variable next_version_tag cause method cache bug

2021-03-11 Thread junyixie
junyixie added the comment: This is a simple fix. https://github.com/python/cpython/pull/24822/commits/e61ce1dd28a48534ee497aaacb4439193bedfd42 -- ___ Python tracker <https://bugs.python.org/issue43

[issue43441] mutilcorevm: global variable next_version_tag cause method cache bug

2021-03-09 Thread junyixie
Change by junyixie : -- type: -> crash ___ Python tracker <https://bugs.python.org/issue43441> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2021-03-09 Thread junyixie
junyixie added the comment: > Which API should be used in C extensions to be "subinterpreter-safe"? ?> > Currently, Py_None is a singleton shared by multiple interpreters. > > > > Should suddenly all C extensions use a new Py_GetNone() function which &

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-02-24 Thread junyixie
Change by junyixie : -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue43313> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state

2021-02-24 Thread junyixie
New submission from junyixie : https://github.com/ericsnowcurrently/multi-core-python/issues/73 https://github.com/JunyiXie/cpython/commit/820954879fd546fcb29b654d10c424bd47da70ce changes: move pymalloc state in obmalloc.h _is add pymalloc_state pymalloc_allocxx api use subinterpreter

[issue43441] mutilcorevm: global variable next_version_tag cause method cache bug

2021-03-08 Thread junyixie
New submission from junyixie : type->tp_version_tag = next_version_tag++; when sub interpreters parallel, next_version_tag++ is thread-unsafe. may cause different type has same tp_version_tag. cause method cache bug in _PyType_Lookup #define MCACHE_HASH_METHOD(type, n

[issue43441] mutilcorevm: global variable next_version_tag cause method cache bug

2021-03-08 Thread junyixie
junyixie added the comment: fix: only main interpreter fini, clear method cache. void _PyType_Fini(PyInterpreterState *interp) { if (_Py_IsMainInterpreter(interp)) { clear_slotdefs(); _PyType_ClearCache(>type_cache); } } when python4.0? type isolate, each interpre

[issue43442] multicorevm: guarantee type multi sub interpreters safe

2021-03-08 Thread junyixie
New submission from junyixie : in multi core cpython project. when use multi sub interpreters, Type is not safe. Type shared by interpreters. but isolate type may cause python abi/api change. python 4.0? temporary solution: 1. add a type lock to guarantee type object safe in multi

[issue43441] mutilcorevm: global variable next_version_tag cause method cache bug

2021-03-08 Thread junyixie
junyixie added the comment: when sub interpreter finalize. _PyType_ClearCache set next_version_tag = 0. Type shared between interpreters. another interpreter assign_version_tag "1" for a type, the type is first assign. the dealloc interpreter had assign_version_tag "1&qu

[issue43311] PyInterpreterState_New use thread tstate before set.

2021-02-24 Thread junyixie
New submission from junyixie : PyInterpreterState_New use thread tstate before set. PyInterpreterState_New use tstate. but tstate is not set. tstate will set after PyInterpreterState_New. PyInterpreterState *interp = PyInterpreterState_New(); if (interp == NULL) { *tstate_p

[issue43311] PyInterpreterState_New use thread tstate before set.

2021-02-24 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +23420 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24636 ___ Python tracker <https://bugs.python.org/issu

[issue43311] bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create .

2021-02-25 Thread junyixie
junyixie added the comment: PyInterpreterState_New call and use PyThreadState *tstate = _PyThreadState_GET(); _PyRuntime.gilstate.autoTSSkey has to be initialized before pthread_getspecific() or pthread_setspecific() can be used. _PyRuntime.gilstate.autoTSSkey create in _PyGILState_Init

[issue43311] bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create .

2021-02-25 Thread junyixie
Change by junyixie : -- title: PyInterpreterState_New use thread tstate before set. -> bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create . ___ Python tracker <https://bugs.python.org/issu

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie
New submission from junyixie : test_io.py ``` = ==54932==ERROR: AddressSanitizer: requested allocation size 0x7fff (0x80001000 after adjustments for alignment, red zones etc.) exceeds maximum supported size

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie
junyixie added the comment: ignore test_decimal.py crash backtrace. -- ___ Python tracker <https://bugs.python.org/issue45196> ___ ___ Python-bugs-list mailin

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie
Change by junyixie : -- type: -> crash ___ Python tracker <https://bugs.python.org/issue45196> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue45196] macOS. ./configure --with-address-sanitizer; make test; cause test case crash.

2021-09-14 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +26742 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28331 ___ Python tracker <https://bugs.python.org/issu

[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-11-09 Thread junyixie
junyixie added the comment: About PEP How is the progress? Where can I track it? Is there any relevant plan? thanks -- ___ Python tracker <https://bugs.python.org/issue43

[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-11-09 Thread junyixie
junyixie added the comment: Include/internal/pycore_structseq.h: 10 11 12: PyAPI_FUNC(int) _PyStructSequence_InitType( 13 PyTypeObject *type, 14 PyStructSequence_Desc *desc, Modules/_cursesmodule.c: 4794 /* ncurses_version */ 4795

[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread junyixie
New submission from junyixie : wrong: checking build system type... x86_64-apple-darwin20.5.0 checking host system type... x86_64-apple-darwin20.5.0 expect: checking build system type... arm-apple-darwin20.5.0 checking host system type... arm-apple-darwin20.5.0 -- components: macOS

[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread junyixie
junyixie added the comment: subprocess.Popen([], executable=os.path.join(cpython_dir, "configure"), cwd=cpython_dir).wait() -- ___ Python tracker <https://bugs.python.o

[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread junyixie
junyixie added the comment: when run pyperformance compile in apple silicon also have this problem -- ___ Python tracker <https://bugs.python.org/issue45

[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread junyixie
junyixie added the comment: > What's the architecture for the python binary (run "file $(which python3)" in > a shell to get this information, excluding the quotes)? yeah, is x86_64 python executable .../opt/anaconda3/bin/python3: Mach-O 64-bit e