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

Appearance settings

Fatal Python error from warnings._release_lock() #129766

Copy link
Copy link
@devdanzin

Description

@devdanzin
Issue body actions

Crash report

What happened?

Exposing the mutex used by the _warnings module in #128386 has made it possible to abort the interpreter by calling warnings._release_lock():

import warnings
warnings._release_lock()

Error message:

Fatal Python error: _PyRecursiveMutex_Unlock: unlocking a recursive mutex that is not owned by the current thread
Python runtime state: initialized

Current thread 0x0000718eb9295740 (most recent call first):
  File "<string>", line 1 in <module>
Aborted (core dumped)

Found using fusil by @vstinner.

CPython versions tested on:

CPython main branch, 3.14

Operating systems tested on:

Linux

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

Python 3.14.0a4+ (heads/main:e1006ce1de, Feb 6 2025, 17:22:01) [GCC 13.3.0]

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.