Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Crash on deallocator of type 'time.struct_time' during finalizing for free-threaded Python #122527

Closed
Assignees
colesbury
Labels
3.13bugs and security fixes3.14bugs and security fixestopic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dump
@XuehaiPan

Description

@XuehaiPan

Crash report

What happened?

A simple standalone file:

# test1.pyimporttimeobj=time.struct_time(range(1,10))
$pyenv install 3.14t-dev --debug$pyenvlocal 3.14t-dev-debug$python3 -VVPython 3.14.0a0 experimental free-threading build (heads/main:bd3d31f, Aug  1 2024, 01:22:33) [Clang 15.0.0 (clang-1500.3.9.4)]$python3 test1.pyFatal Python error: _Py_Dealloc: Deallocator of type 'time.struct_time' raised an exceptionPython runtime state: finalizing (tstate=0x00000001018ca548)Exception ignored in the internal traceback machinery:ImportError: sys.meta_path is None, Python is likely shutting downTypeError: Missed attribute 'n_fields' of type time.struct_timeCurrent thread 0x00000001fff70c00 (most recent call first):  Garbage-collecting  <no Python frame>[1]    89377 abort      python3 test1.py$python3 -c'import test1'Fatal Python error: _Py_Dealloc: Deallocator of type 'time.struct_time' raised an exceptionPython runtime state: finalizing (tstate=0x00000001040a2548)Exception ignored in the internal traceback machinery:ImportError: sys.meta_path is None, Python is likely shutting downTypeError: Missed attribute 'n_fields' of type time.struct_timeCurrent thread 0x00000001fff70c00 (most recent call first):  Garbage-collecting  <no Python frame>[1]    89737 abort      python3 -c 'import test1'

If I remove the assignment forobj, the program can exit successfully.

# test2.pyimporttimetime.struct_time(range(1,10))
$python3 test2.py# no output$python3 -c'import test2'# no output

CPython versions tested on:

CPython main branch, CPython 3.13t, CPython 3.14t

Operating systems tested on:

Linux, macOS

Output from running 'python -VV' on the command line:

Python 3.14.0a0 experimental free-threading build (heads/main:bd3d31f, Aug 1 2024, 01:22:33) [Clang 15.0.0 (clang-1500.3.9.4)]

Linked PRs

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixes3.14bugs and security fixestopic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dump

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp