Skip to content

Crash in _PyXI_ApplyErrorCode() #126986

Closed
Closed
@ericsnowcurrently

Description

@ericsnowcurrently

Crash report

Bug description:

This is a problem in Python/crossinterp.c, as exposed by the _interpreters module.

reproducer:

  1. interp is running as "main" in thread 1
  2. thread 2 calls _PyXI_Enter(), which emits the _PyXI_ERR_ALREADY_RUNNING error code
  3. thread 1 finishes
  4. thread 2 calls _PyXI_ApplyError()
  5. _PyXI_ApplyError() calls _PyInterpreterState_FailIfNotRunning() to raise the exception, but it doesn't raise anything

I noticed this while working on gh-126914.

CPython versions tested on:

3.14

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions