8000 local_clear walks the list of threads without holding head_lock. · Issue #67753 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

local_clear walks the list of threads without holding head_lock. #67753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stutzbach mannequin opened this issue Mar 2, 2015 · 3 comments
Closed

local_clear walks the list of threads without holding head_lock. #67753

stutzbach mannequin opened this issue Mar 2, 2015 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@stutzbach
Copy link
Mannequin
stutzbach mannequin commented Mar 2, 2015
BPO 23565
Nosy @pitrou, @vstinner

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2015-03-02.19:45:23.282>
labels = ['type-bug', 'library']
title = 'local_clear walks the list of threads without holding head_lock.'
updated_at = <Date 2021-06-18.23:26:27.957>
user = 'https://bugs.python.org/stutzbach'

bugs.python.org fields:

activity = <Date 2021-06-18.23:26:27.957>
actor = 'iritkatriel'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2015-03-02.19:45:23.282>
creator = 'stutzbach'
dependencies = []
files = []
hgrepos = []
issue_num = 23565
keywords = []
message_count = 1.0
messages = ['237078']
nosy_count = 3.0
nosy_names = ['pitrou', 'vstinner', 'stutzbach']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue23565'
versions = []

@stutzbach
Copy link
Mannequin Author
stutzbach mannequin commented Mar 2, 2015

local_clear in _threadmodule.c walks the list of threads without holding head_mutex. Since the list of threads can change when holding only head_mutex and not on the GIL, the list can change while local_clear is executing, which may cause Bad Things to happen.

@stutzbach stutzbach mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Mar 2, 2015
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@iritkatriel
Copy link
Member

@kumaraditya303 is this the same issue you fixed in #100892?

@kumaraditya303
Copy link
Contributor

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
Development

No branches or pull requests

2 participants
0