GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PyThreadState_IsCurrent bug under building Python with --with-experimental-isolated-subinterpreters · Issue #88540 · python/cpython

PyThreadState_IsCurrent bug under building Python with --with-experimental-isolated-subinterpreters #88540

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
PyThreadState_IsCurrent bug under building Python with --with-experimental-isolated-subinterpreters#88540
Copy link
Labels
3.11only security fixesonly security fixestopic-subinterpreters

Description

JunyiXie
mannequin
opened on Jun 10, 2021
Issue body actions
BPO 44374
Nosy @vstinner, @junyixie

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 2021-06-10.10:14:52.708>
labels = ['expert-subinterpreters', '3.11']
title = 'PyThreadState_IsCurrent bug under building Python with --with-experimental-isolated-subinterpreters'
updated_at = <Date 2021-06-10.10:14:52.708>
user = 'https://github.com/JunyiXie'

bugs.python.org fields:

activity = <Date 2021-06-10.10:14:52.708>
actor = 'JunyiXie'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Subinterpreters']
creation = <Date 2021-06-10.10:14:52.708>
creator = 'JunyiXie'
dependencies = []
files = []
hgrepos = []
issue_num = 44374
keywords = []
message_count = 1.0
messages = ['395517']
nosy_count = 2.0
nosy_names = ['vstinner', 'JunyiXie']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue44374'
versions = ['Python 3.11']

Activity

  1. JunyiXie commented on Jun 10, 2021

    @JunyiXie
    JunyiXiemannequin
    on Jun 10, 2021
    MannequinAuthor
    More actions

    under building Python with --with-experimental-isolated-subinterpreters
    PyThreadState_IsCurrent use _PyRuntime.gilstate. is shared by multi sub interpreters.
    Use interpreter gil->last_holder == state can fix it?

    static int
    PyThreadState_IsCurrent(PyThreadState *tstate)
    {
        /* Must be the tstate for this thread */
        struct _gilstate_runtime_state *gilstate = &_PyRuntime.gilstate;
        assert(_PyGILState_GetThisThreadState(gilstate) == tstate);
        return tstate == _PyRuntimeGILState_GetThreadState(gilstate);
    }
    
    static int
    PyThreadState_IsCurrent(PyThreadState *tstate)
    {
    #ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
        PyInterpreterState *interp = tstate->interp;
        struct _ceval_state *ceval2 = &interp->ceval;
        struct _gil_runtime_state *gil = &ceval2->gil;
        return tstate == (PyThreadState*)_Py_atomic_load_relaxed(&gil->last_holder);
    #else
        /* Must be the tstate for this thread */
        struct _gilstate_runtime_state *gilstate = &_PyRuntime.gilstate;
        assert(_PyGILState_GetThisThreadState(gilstate) == tstate);
        return tstate == _PyRuntimeGILState_GetThreadState(gilstate);
    #endif
    }
    
  2. JunyiXie
    added
    3.11only security fixesonly security fixes
    topic-subinterpreters
    on Jun 10, 2021
  3. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  4. ezio-melotti
    added this to Subinterpreterson Apr 15, 2022
  5. ezio-melotti
    moved this to Todo in Subinterpreterson Apr 15, 2022
  6. kumaraditya303 commented on Jul 10, 2022

    @kumaraditya303
    kumaraditya303
    on Jul 10, 2022
    Contributor
    More actions

    Closing as EXPERIMENTAL_ISOLATED_SUBINTERPRETERS was removed in #93185

  7. kumaraditya303
    closed this as not plannedon Jul 10, 2022
  8. Repository owner moved this from Todo to Done in Subinterpreterson Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixesonly security fixestopic-subinterpreters

    Projects

    • Subinterpreters
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.