Skip to content
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

Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK() #85234

Open
AndreiPashkin mannequin opened this issue Jun 21, 2020 · 2 comments
Open

Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK() #85234

AndreiPashkin mannequin opened this issue Jun 21, 2020 · 2 comments
Labels
3.11 only security fixes topic-C-API type-feature A feature request or enhancement

Comments

@AndreiPashkin
Copy link
Mannequin

AndreiPashkin mannequin commented Jun 21, 2020

BPO 41062
Nosy @vstinner, @AndreiPashkin

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 2020-06-21.08:53:48.034>
labels = ['expert-C-API', 'type-feature', '3.11']
title = 'Advanced Debugger Support C-API is useless without HEAD_LOCK()/HEAD_UNLOCK()'
updated_at = <Date 2021-12-06.18:25:56.506>
user = 'https://github.com/AndreiPashkin'

bugs.python.org fields:

activity = <Date 2021-12-06.18:25:56.506>
actor = 'iritkatriel'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['C API']
creation = <Date 2020-06-21.08:53:48.034>
creator = 'pashkin'
dependencies = []
files = []
hgrepos = []
issue_num = 41062
keywords = []
message_count = 2.0
messages = ['371988', '371989']
nosy_count = 2.0
nosy_names = ['vstinner', 'pashkin']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue41062'
versions = ['Python 3.11']

@AndreiPashkin
Copy link
Mannequin Author

AndreiPashkin mannequin commented Jun 21, 2020

To me it seems like Advanced Debugger Support C-API doesn't make sense without HEAD_LOCK() and HEAD_UNLOCK() which are private right now.

When researching how C-API works I've found this comment in the source code:

* Because these lists can mutate even when the GIL is held, we

It says that the lists of interpreter-state and thread-state objects (that Adv. Debugger Support API operates on) could be mutated even when GIL is held so there is need to acquire head mutex when accessing them. But there is no way to acquire head mutex using public C-API.

Am I right? If yes - it seems like HEAD_(UN)LOCK() should be made public.

@AndreiPashkin AndreiPashkin mannequin added type-bug An unexpected behavior, bug, or error 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes topic-C-API labels Jun 21, 2020
@AndreiPashkin
Copy link
Mannequin Author

AndreiPashkin mannequin commented Jun 21, 2020

Here is what I mean by "Advanced Debugger Support" API:
https://docs.python.org/dev/c-api/init.html#advanced-debugger-support

@iritkatriel iritkatriel added 3.11 only security fixes type-feature A feature request or enhancement and removed 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes type-bug An unexpected behavior, bug, or error labels Dec 6, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes topic-C-API type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant