Skip to content

JIT build crashes on assertions (since 3.15): Python/pystate.c:925: interpreter_clear: Assertion cold->vm_data.valid' failed.` #154014

Description

@mgorny

Crash report

What happened?

./configure --enable-experimental-jit --with-assertions
make -j$(nproc)

On 3.15.0b4 and main (9adef68), this results in a _bootstrap_python that crashes on assertions:

$ make
./_bootstrap_python ./Programs/_freeze_module.py abc ./Lib/abc.py Python/frozen_modules/abc.h
_bootstrap_python: Python/pystate.c:925: interpreter_clear: Assertion `cold->vm_data.valid' failed.
make: *** [Makefile:1907: Python/frozen_modules/abc.h] Aborted (core dumped)
make: *** Deleting file 'Python/frozen_modules/abc.h'

For some files, I'm also/instead seeing:

_bootstrap_python: Python/pystate.c:933: interpreter_clear: Assertion `cold_dynamic->vm_data.valid' failed.

Bisect points to 4fa80ce which seems a huge change:

commit 4fa80ce74c6d9f5159bdc5ec3596a194f0391e21
Author:     Ken Jin <kenjin@python.org>
AuthorDate: 2025-11-13 19:08:32 +0100
Commit:     GitHub <noreply@github.com>
CommitDate: 2025-11-13 19:08:32 +0100

    gh-139109: A new tracing JIT compiler frontend for CPython (GH-140310)

CC @Fidget-Spinner

CPython versions tested on:

3.15, CPython main branch

Operating systems tested on:

Linux

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15pre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-JITtype-crashA hard crash of the interpreter, possibly with a core dump

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions