STINNER Victor added the comment:
New changeset e9e3eab0b868c7d0b48e472705024240d5c39d5c by Victor Stinner in
branch 'main':
bpo-46417: Finalize structseq types at exit (GH-30645)
https://github.com/python/cpython/commit/e9e3eab0b868c7d0b48e4727050242
Change by STINNER Victor :
--
pull_requests: +28919
pull_request: https://github.com/python/cpython/pull/30732
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 6415e2ee4955b1a995c1e75544e2506b03780c3d by Victor Stinner in
branch 'main':
bpo-46417: _testembed.c avoids Py_SetProgramName() (GH-30732)
https://github.com/python/cpython/commit/6415e2ee4955b1a995c1e75544e250
Change by STINNER Victor :
--
pull_requests: +28920
pull_request: https://github.com/python/cpython/pull/30733
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28921
pull_request: https://github.com/python/cpython/pull/30734
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset f389b37fb1cebe7ed66331cdd373a014695261f6 by Victor Stinner in
branch 'main':
bpo-46417: _thread uses PyStructSequence_NewType() (GH-30733)
https://github.com/python/cpython/commit/f389b37fb1cebe7ed66331cdd373a0
STINNER Victor added the comment:
New changeset 17f268a4ae6190b2659c89c6f32ad2d006e0e3c8 by Victor Stinner in
branch 'main':
bpo-46417: time module uses PyStructSequence_NewType() (GH-30734)
https://github.com/python/cpython/commit/17f268a4ae6190b2659c89c6f32ad2
Change by STINNER Victor :
--
pull_requests: +28922
pull_request: https://github.com/python/cpython/pull/30735
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28923
pull_request: https://github.com/python/cpython/pull/30736
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 1781d55eb34f94029e50970232635fc5082378cb by Victor Stinner in
branch 'main':
bpo-46417: _curses uses PyStructSequence_NewType() (GH-30736)
https://github.com/python/cpython/commit/1781d55eb34f94029e50970232635f
New submission from STINNER Victor :
Using the C program below, I see that _Py_RefTotal is decreasing at each
iteration:
---
#include
int main(int argc, char *argv[])
{
for (int i=1; i <= 100; i++) {
Py_SetProgramName(L"./_testembed");
Py_Initialize();
STINNER Victor added the comment:
See also bpo-46449 "Deep-freezed modules create inconsistency in
sys.gettotalrefcount() (_Py_Reftotal)".
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
New changeset d013b241352e902389f955f8f99d75f16c124ee2 by Victor Stinner in
branch 'main':
bpo-46417: signal uses PyStructSequence_NewType() (GH-30735)
https://github.com/python/cpython/commit/d013b241352e902389f955f8f99d75
Change by STINNER Victor :
--
nosy: +eric.snow, gvanrossum
___
Python tracker
<https://bugs.python.org/issue46449>
___
___
Python-bugs-list mailing list
Unsub
STINNER Victor added the comment:
> Hm, the deep-frozen objects are statically initialized with a very large
> refcount that isn't accounted for (they are intended to be immortal). It
> seems that Py_Finalize() somehow decrefs those objects. I guess this means we
> need
STINNER Victor added the comment:
> This reminds me, since https://github.com/python/cpython/pull/30715 (which I
> merged yesterday) the deep-frozen objects also reference the small ints
> directly, as well as the singleton for b"". Is this even safe across
> Py_Fi
Change by STINNER Victor :
--
pull_requests: +28930
pull_request: https://github.com/python/cpython/pull/30743
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28931
pull_request: https://github.com/python/cpython/pull/30744
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28932
pull_request: https://github.com/python/cpython/pull/30744
___
Python tracker
<https://bugs.python.org/issue1635
STINNER Victor added the comment:
New changeset ea38e436fe1e585fb8c1f0badf5482f525b7f9ff by Victor Stinner in
branch 'main':
bpo-46417: Call _PyDebug_PrintTotalRefs() later (GH-30744)
https://github.com/python/cpython/commit/ea38e436fe1e585fb8c1f0badf5482
STINNER Victor added the comment:
Using "./python -IsS" command, sys.modules now only has 3 extensions which are
not created by PyModuleDef_Init():
* builtins
* _io
* sys
The builtins and sys extensions use many static types. Converting these static
types to heap types is bloc
STINNER Victor added the comment:
New changeset 595225e86dcc6ea520a584839925a878dce7a9b2 by Victor Stinner in
branch 'main':
bpo-46417: Py_Finalize() clears static types (GH-30743)
https://github.com/python/cpython/commit/595225e86dcc6ea520a584839925a8
STINNER Victor added the comment:
I mark this issue as a duplicate of bpo-38865.
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder: -> [subinterpreters] Can Py_Finalize() be called if the current
interpreter is not the main
STINNER Victor added the comment:
I marked bpo-37776 "[subinterpreters] Test Py_Finalize() from a subinterpreter"
as a duplicate of this issue.
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
> bpo-46417: Py_Finalize() clears static types (GH-30743)
Oh, test_unittest crashed on s390x Debian 3.x:
https://buildbot.python.org/all/#/builders/49/builds/1789
I fail to see the relationship between my change and this crash. I don't expect
test_
STINNER Victor added the comment:
Maybe the problem is that I changed the order in which types are initialized in
_PyTypes_InitTypes()?
So far, test_unittest crashed on 4 buildbot workers:
* s390x Debian 3.x: ./configure --prefix '$(PWD)/target' --with-pydebug
https://buildbot.
Change by STINNER Victor :
--
pull_requests: +28936
pull_request: https://github.com/python/cpython/pull/30749
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28937
pull_request: https://github.com/python/cpython/pull/30750
___
Python tracker
<https://bugs.python.org/issue46
New submission from STINNER Victor :
The following command hangs:
./python -u -m test -v test_unittest -m test_debug_cleanup_same_loop -v
2>/dev/null
if the following patch is applied on Python:
diff --git a/Lib/unittest/test/test_async_case.py
b/Lib/unittest/test/test_async_case.py
in
STINNER Victor added the comment:
New changeset fda88864980ffce57add0ea03fb9cbda2798975e by Victor Stinner in
branch 'main':
bpo-46417: Revert remove_subclass() change (GH-30750)
https://github.com/python/cpython/commit/fda88864980ffce57add0ea03fb9cb
STINNER Victor added the comment:
> bpo-46417: Revert remove_subclass() change (GH-30750)
Ok, this change fixed buildbots.
I saw code in typeobject.c which uses a borrowed reference to tp_subclasses
with a loop which can modify tp_subclasses. This code should be modified to
hold a str
STINNER Victor added the comment:
That's not a bug, but a deliberate choice. In Python 3, file descriptors are no
longer inherited by default by child processes (fork+exec). Jelle is right, it
was changed by my PEP 446.
You must use pass_fds=[fd] parameter of subprocess.
Or at least,
STINNER Victor added the comment:
As I already wrote previously, I'm a supporter of requiring debuggers and
profilers to explicitly call PyFrame_FastToLocalsWithError() and
PyFrame_LocalsToFast(). It should only impact a minority of users, whereas the
majority will benefit of way b
STINNER Victor added the comment:
New changeset a1bf329bca80a0259da454c936075e11e6af710f by Victor Stinner in
branch 'main':
bpo-46417: Add missing types of _PyTypes_InitTypes() (GH-30749)
https://github.com/python/cpython/commit/a1bf329bca80a0259da454c936075e
STINNER Victor added the comment:
Oh, it seems like I misunderstood type_ready_mro() change. The check is only
done on static types type. The MRO of heap types is not checked.
--
In my change, I wrote:
// _PyType_GetModuleByDef() must only be called on a heap type created
STINNER Victor added the comment:
An alternative would be to merge PyHeapTypeObject members into PyTypeObject. I
don't get why there is a separated struture: PyTypeObject is excluded from the
stable ABI. See my remark about that:
https://bugs.python.org/issue22079#msg391464
Hav
STINNER Victor added the comment:
#ifdef __cplusplus
char array[1];
#else
char array[];
#endif
Does it change the size of the structure between C and C++,
sizeof(PyBytesObject)? Also, does the size of the struture matter? :-) I guess
that the impart part is the ABI: offset of the
Change by STINNER Victor :
--
pull_requests: +28947
pull_request: https://github.com/python/cpython/pull/30760
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28948
pull_request: https://github.com/python/cpython/pull/30761
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset bc67f189fdd62ed42013fa05cd0ef2df498f5967 by Victor Stinner in
branch 'main':
bpo-46417: Add _PyType_CAST() macro (GH-30760)
https://github.com/python/cpython/commit/bc67f189fdd62ed42013fa05cd0ef2
Change by STINNER Victor :
--
pull_requests: +28949
pull_request: https://github.com/python/cpython/pull/30763
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28950
pull_request: https://github.com/python/cpython/pull/30764
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28954
pull_request: https://github.com/python/cpython/pull/30769
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28955
pull_request: https://github.com/python/cpython/pull/30767
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 8ee07dda139f3fa1d7c58a29532a98efc790568d by Victor Stinner in
branch 'main':
bpo-46417: Add _PyType_GetSubclasses() function (GH-30761)
https://github.com/python/cpython/commit/8ee07dda139f3fa1d7c58a29532a98
STINNER Victor added the comment:
New changeset 7835cbf949c413a746324721a352cc72670a8a36 by Victor Stinner in
branch 'main':
bpo-46417: Use _PyType_CAST() in Python directory (GH-30769)
https://github.com/python/cpython/commit/7835cbf949c413a746324721a352cc
STINNER Victor added the comment:
New changeset ac1f152421fab3ac854fe4565c575b306e2bb4b5 by Victor Stinner in
branch 'main':
bpo-46417: Use _PyType_CAST() in Objects directory (GH-30764)
https://github.com/python/cpython/commit/ac1f152421fab3ac854fe4565c575b
Change by STINNER Victor :
--
pull_requests: +28959
pull_request: https://github.com/python/cpython/pull/30774
___
Python tracker
<https://bugs.python.org/issue29
STINNER Victor added the comment:
New changeset cd8de40b3b10311de2db7b90abdf80af9e35535f by Victor Stinner in
branch 'main':
bpo-29882: _Py_popcount32() doesn't need 64x64 multiply (GH-30774)
https://github.com/python/cpython/commit/cd8de40b3b10311de2db7b90a
Change by STINNER Victor :
--
pull_requests: +28960
pull_request: https://github.com/python/cpython/pull/30775
___
Python tracker
<https://bugs.python.org/issue46
New submission from STINNER Victor :
test_unittest: TestBreakSignalDefault.testInstallHandler() fails if run after
TestBreak:
-
$ ./python -m test -v test_unittest -R 3:3 -m
'*TestBreak.testHandlerReplacedButCalled' -m '*TestBreak.testIns
STINNER Victor added the comment:
It's a regression introduced by the following change:
commit 3163e68c342434db37c69669017f96a4bb2d5f13
Author: Ken Jin <28750310+fidget-spin...@users.noreply.github.com>
Date: Wed Oct 20 07:16:36 2021 +0800
bpo-44525: Specialize ``CALL_FUNCT
STINNER Victor added the comment:
Attached bug.py reproduces the bug without unittest, just run:
./python bug.py
On Python 3.10, it writes:
---
LOOP 0
LOOP 1
(...)
LOOP 14
LOOP 15
---
On the main branch, it fails with:
---
LOOP 0
LOOP 1
LOOP 2
LOOP 3
LOOP 4
LOOP 5
LOOP 6
LOOP 7
Traceback
STINNER Victor added the comment:
> this fd 0 `is` inherited.
File descriptors 0, 1, 2 are special: stdin, stdout and stderr file
descriptors. You should use stdin, stdout, and stderr parameter of subprocess.
Sorry but the bug tracker is not a good place to ask questions about how to
Change by STINNER Victor :
--
pull_requests: +28973
pull_request: https://github.com/python/cpython/pull/30788
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset f1c6ae3270913e095d24ae13ecf96f5a32c8c503 by Victor Stinner in
branch 'main':
bpo-46417: Fix race condition on setting type __bases__ (GH-30788)
https://github.com/python/cpython/commit/f1c6ae3270913e095d24ae13ecf96f
Change by STINNER Victor :
--
pull_requests: +28976
pull_request: https://github.com/python/cpython/pull/30791
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset acda9f3b90c33e4020237cb9e5c676efb38f7847 by Miss Islington (bot)
in branch '3.10':
bpo-46417: Fix race condition on setting type __bases__ (GH-30788) (GH-30789)
https://github.com/python/cpython/commit/acda9f3b90c33e4020237cb9e5c676
STINNER Victor added the comment:
New changeset f1796f29478f08f34e0c30a060622c0b2d843e2c by Miss Islington (bot)
in branch '3.9':
bpo-46417: Fix race condition on setting type __bases__ (GH-30788) (GH-30790)
https://github.com/python/cpython/commit/f1796f29478f08f34e0c30a060622c
Change by STINNER Victor :
--
pull_requests: +28978
pull_request: https://github.com/python/cpython/pull/30793
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 2d03b73cc9c0dada3243eab1373a46dbd98d24a0 by Victor Stinner in
branch 'main':
bpo-46417: remove_subclass() clears tp_subclasses (GH-30793)
https://github.com/python/cpython/commit/2d03b73cc9c0dada3243eab1373a46
Change by STINNER Victor :
--
pull_requests: +28980
pull_request: https://github.com/python/cpython/pull/30795
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28981
pull_request: https://github.com/python/cpython/pull/30796
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 500c146387b01ea797b52e6a54caf228384e184c by Victor Stinner in
branch 'main':
bpo-46417: Clear more static types (GH-30796)
https://github.com/python/cpython/commit/500c146387b01ea797b52e6a54caf2
STINNER Victor added the comment:
New changeset 3a4c15bb9815b6f4652621fe6043ae18e0d202b3 by Victor Stinner in
branch 'main':
bpo-46417: Cleanup typeobject.c code (GH-30795)
https://github.com/python/cpython/commit/3a4c15bb9815b6f4652621fe6043ae
Change by STINNER Victor :
--
pull_requests: +28982
pull_request: https://github.com/python/cpython/pull/30797
___
Python tracker
<https://bugs.python.org/issue45
STINNER Victor added the comment:
I reopen the issue: test_concurrent_futures seems to be also affected by this
bug :-(
Example of recent hang:
https://github.com/python/cpython/runs/4908075699?check_suite_focus=true
---
0:18:04 load avg: 1.34 [417/418] test_peg_generator passed (9 min 46
Change by STINNER Victor :
--
pull_requests: +28983
pull_request: https://github.com/python/cpython/pull/30798
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset ce7d66771ec64488134a1dd114015aa056eef696 by Victor Stinner in
branch 'main':
bpo-45200: GHA Address Sanitizer skips 3 slowest tests (GH-30797)
https://github.com/python/cpython/commit/ce7d66771ec64488134a1dd114015a
Change by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue45200>
___
___
Python-bugs-list
STINNER Victor added the comment:
New changeset 6cacdb42454264ae75cab5e32bb62876da43bf6f by Victor Stinner in
branch 'main':
bpo-46417: _PyTypes_FiniTypes() clears object and type (GH-30798)
https://github.com/python/cpython/commit/6cacdb42454264ae75cab5e32bb628
STINNER Victor added the comment:
Kumar Aditya: "The following patch further reduces the reference but not sure
if it is correct (...)"
Right! PyContext and PyHamt types were on my TODO list ;-) They are now cleared
since this change:
bpo-46417: Clear more static types (GH-30
STINNER Victor added the comment:
In bpo-46417, I pushed a change to call _PyDebug_PrintTotalRefs() after
destroying the interpreter. I backported locally this change to other Python
versions to compare the progress on old Python versions:
./python -I -X showrefcount -c pass command
STINNER Victor added the comment:
Attached cannot_deallocate.patch explains why some static types cannot be
deallocated. It lists (static) types which are not cleard properly at Python
exit.
Simplest example:
---
$ ./python -c pass
Cannot clear type 'object': it still has
Change by STINNER Victor :
--
pull_requests: +28992
pull_request: https://github.com/python/cpython/pull/30804
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset f1bcdeaca6e912a2bec1fbcff76cc49e7f761d38 by Victor Stinner in
branch 'main':
bpo-46417: Factorize _PyExc_InitTypes() code (GH-30804)
https://github.com/python/cpython/commit/f1bcdeaca6e912a2bec1fbcff76cc4
Change by STINNER Victor :
--
pull_requests: +28993
pull_request: https://github.com/python/cpython/pull/30805
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 621a45ccacd121f9ae4d8a539f040410c74b253b by Victor Stinner in
branch 'main':
bpo-46417: Py_Finalize() clears static exceptioins (GH-30805)
https://github.com/python/cpython/commit/621a45ccacd121f9ae4d8a539f0404
Change by STINNER Victor :
--
pull_requests: +28994
pull_request: https://github.com/python/cpython/pull/30806
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 1626bf4ac7aef1244e6f886e63a31f7ed65fbd10 by Victor Stinner in
branch 'main':
bpo-46417: Clear Unicode static types at exit (GH-30806)
https://github.com/python/cpython/commit/1626bf4ac7aef1244e6f886e63a31f
Change by STINNER Victor :
--
pull_requests: +28995
pull_request: https://github.com/python/cpython/pull/30807
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 9c8e490b8f9e40a6fe9815be58bacaecab5369ee by Victor Stinner in
branch 'main':
bpo-46417: Clear _io module static objects at exit (GH-30807)
https://github.com/python/cpython/commit/9c8e490b8f9e40a6fe9815be58baca
Change by STINNER Victor :
--
pull_requests: +28997
pull_request: https://github.com/python/cpython/pull/30809
___
Python tracker
<https://bugs.python.org/issue46
Change by STINNER Victor :
--
pull_requests: +28998
pull_request: https://github.com/python/cpython/pull/30810
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
New changeset 1ded8ed8e817b8f9dae1a0ef92d97983afbc844e by Nikita Sobolev in
branch 'main':
bpo-41682: Skip unstable test_asyncio sendfile test on Windows (GH-30801)
https://github.com/python/cpython/commit/1ded8ed8e817b8f9dae1a0ef92d979
Change by STINNER Victor :
--
nosy: -vstinner
___
Python tracker
<https://bugs.python.org/issue46454>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by STINNER Victor :
--
title: test_unittest: TestBreakSignalDefault.testInstallHandler() fails if run
after TestBreak -> Regression caused by CALL_FUNCTION specialization for C
function calls
___
Python tracker
<https://bugs.pyth
STINNER Victor added the comment:
New changeset 12f4ac3bc848244242d6b8a7ee158b985fd64744 by Victor Stinner in
branch 'main':
bpo-46417: Clear symtable identifiers at exit (GH-30809)
https://github.com/python/cpython/commit/12f4ac3bc848244242d6b8a7ee158b
STINNER Victor added the comment:
New changeset a1444f43584af0f7a0af72aa06ba0a86ae5a87a2 by Victor Stinner in
branch 'main':
bpo-46417: Fix _PyStaticType_Dealloc() (GH-30810)
https://github.com/python/cpython/commit/a1444f43584af0f7a0af72aa06ba0a
STINNER Victor added the comment:
The _PyStaticType_Dealloc() function cannot call PyObject_ClearWeakRefs() if
the refcount is not zero. I am not sure if it's a real issue or not. Maybe the
weakref list must be cleared (release memory), but callbacks must not be c
STINNER Victor added the comment:
cannot_deallocate2.patch: updated patch to debug which types are not cleared at
exit.
--
Added file: https://bugs.python.org/file50577/cannot_deallocate2.patch
___
Python tracker
<https://bugs.python.
STINNER Victor added the comment:
> New changeset a1444f43584af0f7a0af72aa06ba0a86ae5a87a2 by Victor Stinner in
> branch 'main':
> bpo-46417: Fix _PyStaticType_Dealloc() (GH-30810)
> https://github.com/python/cpython/commit/a1444f43584af0f7a0af72aa06ba0a86ae5a87a2
At th
STINNER Victor added the comment:
Is there a way to disable deepfreeze when building Python?
It makes the Python build way slower. For example, a full build (after "make
clean") of Python 3.10 takes 14.9 seconds on my laptop, whereas Python 3.11
takes 24.6 seconds (1.6x slower). I
STINNER Victor added the comment:
My work on bpo-46417 reduces the number of leak references from around 10k to
... minus 4 references :-) Clearing static types and a few "static" objects
helped a lot!
> New changeset a1444f43584af0f7a0af72aa06ba0a86ae5a87a2 by Victor Stinner
New submission from STINNER Victor :
Python leaks around 66 memory blocks at exit. Most of them are allocated by
_Py_Quicken() of Python/specialize.c.
int
_Py_Quicken(PyCodeObject *code) {
...
SpecializedCacheOrInstruction *quickened = allocate(entry_count,
instr_count
Change by STINNER Victor :
--
nosy: +Mark.Shannon, eric.snow, gvanrossum
___
Python tracker
<https://bugs.python.org/issue46476>
___
___
Python-bugs-list mailin
Change by STINNER Victor :
--
title: Not all memory allocated by _Py_Quicken() is not released at Python exit
-> Not all memory allocated by _Py_Quicken() is released at Python exit
___
Python tracker
<https://bugs.python.org/issu
STINNER Victor added the comment:
See also bpo-46476: "Not all memory allocated by _Py_Quicken() is released at
Python exit".
--
___
Python tracker
<https://bugs.python.o
STINNER Victor added the comment:
See also bpo-46476: Not all memory allocated by _Py_Quicken() is released at
Python exit.
--
___
Python tracker
<https://bugs.python.org/issue46
STINNER Victor added the comment:
Patch to disable _Py_Quicken(), to help me debugging other memory leaks at
Python exit:
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h
index dfc75300315..f9cdefed2a2 100644
--- a/Include/internal/pycore_code.h
+++ b/Include
201 - 300 of 35284 matches
Mail list logo