Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed as not planned
Closed as not planned
Description
Crash report
What happened?
Example on Windows (debug build):
# Taken from _ctypes issue: #116467importsubprocessprogram=r"PCbuild\amd64\_testembed_d.exe"cmd= [program,"test_repeated_init_exec","import datetime"]# or _datetimeforiinrange(1,11):print(f" == Process #{i} ===")proc=subprocess.run(cmd)exitcode=proc.returncodeprint(f"=> exitcode{exitcode}")ifexitcode:breakprint()
Output (7bbce38: CI failures with a similar test):
Running Debug|x64 interpreter... == Process #1 ===--- Loop #1 ------ Loop #2 ---Assertion failed: PyUnicode_CheckExact(ep_key), file C:\a\Objects\dictobject.c, line 1119=> exitcode 3It is an expected error on a debug build, which comes form_PyUnicode_ClearInterned() inunicodeobject.c of the commitea2c001:
void_PyUnicode_ClearInterned(PyInterpreterState*interp){ .../* TODO: * Currently, the runtime is not able to guarantee that it can exit without * allocations that carry over to a future initialization of Python within * the same process. i.e: * ./python -X showrefcount -c 'import itertools' * [237 refs, 237 blocks] * * Therefore, this should remain disabled for until there is a strict guarantee * that no memory will be left after `Py_Finalize`. */#ifdefPy_DEBUG ...
Currently, release builds avoid thedatetime crash by leaking all interned strings. Both the crash and the leak should be fixed before shipping 3.13 final.
This dedicated issue is requested in:
CPython versions tested on:
3.12, CPython main branch
Operating systems tested on:
Linux, macOS, Windows