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 — [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash. · Issue #87754 · python/cpython

[Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash. #87754

New issue
Copy link
New issue
Copy link
Closed
Closed
[Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.#87754
Copy link
Labels
3.10 (EOL)end of lifeend of lifetopic-subinterpreterstype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump

Description

JunyiXie
mannequin
opened on Mar 22, 2021
Issue body actions
BPO 43588
Nosy @vstinner, @corona10, @shihai1991, @junyixie, @kumaraditya303
PRs
  • bpo-43588: use static variable module under building Python with --with-experimental-isolated-subinterpreters cause crash. #24963
  • bpo-43551: fix PyImport_Import use static silly_list, under building Python with --with-experimental-isolated-subinterpreters share silly_list in multi sub interpreters cause crash. #24929
  • bpo-43588: fix exceptions.c use static variable under building Python with --with-experimental-isolated-subinterpreters may cause crash. #24965
  • bpo-43588: fix boolobject.c static variables under building under building Python with --with-experimental-isolated-subinterpreters may cause crash #24966
  • bpo-43588: fix codeobject.c static variables under building under building Python with --with-experimental-isolated-subinterpreters may cause crash. #24968
  • bpo-43588: fix sysmodule.c use static variables under building under building Python with --with-experimental-isolated-subinterpreters may cause crash #24969
  • bpo-43588: fix codecs.c static variables under building under building Python with --with-experimental-isolated-subinterpreters may cause crash. #24970
  • bpo-43588: fix _warnings.c static variables under building under building Python with --with-experimental-isolated-subinterpreters may cause crash #24971
  • bpo-43588: fix listobject.c use static variables under building under building Python with --with-experimental-isolated-subinterpreters may cause crash #24972
  • 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-03-22.08:09:32.063>
    labels = ['expert-subinterpreters', '3.10', 'type-crash']
    title = '[Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.'
    updated_at = <Date 2022-04-07.08:17:57.850>
    user = 'https://github.com/JunyiXie'

    bugs.python.org fields:

    activity = <Date 2022-04-07.08:17:57.850>
    actor = 'kumaraditya'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Subinterpreters']
    creation = <Date 2021-03-22.08:09:32.063>
    creator = 'JunyiXie'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43588
    keywords = ['patch']
    message_count = 13.0
    messages = ['389282', '389284', '389292', '389300', '389304', '389310', '389311', '389322', '389323', '389324', '406069', '406080', '416918']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'corona10', 'shihai1991', 'JunyiXie', 'kumaraditya']
    pr_nums = ['24963', '24929', '24965', '24966', '24968', '24969', '24970', '24971', '24972']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue43588'
    versions = ['Python 3.10']

    Activity

    1. JunyiXie commented on Mar 22, 2021

      @JunyiXie
      JunyiXiemannequin
      on Mar 22, 2021
      MannequinAuthor
      More actions
      use static module variable under building Python with --with-experimental-isolated-subinterpreters cause crash.
      compiler_mod(struct compiler *c, mod_ty mod)
      {
          PyCodeObject *co;
          int addNone = 1;
          static PyObject *module;
          if (!module) {
              module = PyUnicode_InternFromString("<module>");
              if (!module)
                  return NULL;
          }
      ...
      }
    2. JunyiXie
      added
      3.10 (EOL)end of lifeend of life
      topic-subinterpreters
      type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
      on Mar 22, 2021
    3. JunyiXie commented on Mar 22, 2021

      @JunyiXie
      JunyiXiemannequin
      on Mar 22, 2021
      MannequinAuthor
      More actions

      43551 [Subinterpreters]: PyImport_Import use static silly_list under building Python with --with-experimental-isolated-subinterpreters share silly_list in multi subinterpreters cause crash.
      https://bugs.python.org/issue43551

    4. JunyiXie commented on Mar 22, 2021

      @JunyiXie
      JunyiXiemannequin
      on Mar 22, 2021
      MannequinAuthor
      More actions

      grep -E 'static (\w+) \(\w+) =' $(find . -name "*.c") | wc -l
      67 static variable may need fix
      ➜ cpython git:(master) grep -E 'static (\w+) \
      (\w+) =' $(find . -name "*.c")
      ./PC/winreg.c:static char *failMsg = "bad operand type";
      ./Python/codecs.c:static _PyUnicode_Name_CAPI *ucnhash_capi = NULL;
      ./Python/initconfig.c:static char *_Py_StandardStreamEncoding = NULL;
      ./Python/initconfig.c:static char *_Py_StandardStreamErrors = NULL;
      ./Python/import.c:static PyObject *extensions = NULL;
      ./Python/import.c: static PyObject *builtins_str = NULL;
      ./Python/import.c: static PyObject *import_str = NULL;
      ./Python/sysmodule.c: static PyObject *newline = NULL;
      ./Python/_warnings.c: static PyObject *importlib_string = NULL;
      ./Python/_warnings.c: static PyObject *bootstrap_string = NULL;
      ./Objects/unicodeobject.c:static _PyUnicode_Name_CAPI *ucnhash_capi = NULL;
      ./Objects/codeobject.c: static PyObject *emptystring = NULL;
      ./Objects/codeobject.c: static PyObject *nulltuple = NULL;
      ./Objects/listobject.c:static PyObject *indexerr = NULL;
      ./Objects/exceptions.c: static PyObject *print_prefix = NULL;
      ./Objects/exceptions.c: static PyObject *exec_prefix = NULL;
      ./Objects/boolobject.c:static PyObject *false_str = NULL;
      ./Objects/boolobject.c:static PyObject *true_str = NULL;
      ./Parser/pegen.c: static void *cache = NULL;
      ./Modules/_cursesmodule.c:static char *screen_encoding = NULL;
      ./Modules/arraymodule.c: static PyObject *array_reconstructor = NULL;
      ./Modules/_tkinter.c: static PyObject *tcl_library_path = NULL;
      ./Modules/_tkinter.c:static PyThreadState *tcl_tstate = NULL;
      ./Modules/_tkinter.c:static PyThreadState *event_tstate = NULL;
      ./Modules/syslogmodule.c:static PyObject *S_ident_o = NULL; /* identifier, held by openlog() */
      ./Modules/_tracemalloc.c:static PyObject *unknown_filename = NULL;
      ./Modules/_tracemalloc.c:static _Py_hashtable_t *tracemalloc_filenames = NULL;
      ./Modules/_tracemalloc.c:static traceback_t *tracemalloc_traceback = NULL;
      ./Modules/_tracemalloc.c:static _Py_hashtable_t *tracemalloc_tracebacks = NULL;
      ./Modules/_tracemalloc.c:static _Py_hashtable_t *tracemalloc_traces = NULL;
      ./Modules/_tracemalloc.c:static _Py_hashtable_t *tracemalloc_domains = NULL;
      ./Modules/_ssl.c: static PyObject *x509_asn = NULL;
      ./Modules/_ssl.c: static PyObject *pkcs_7_asn = NULL;
      ./Modules/_ssl.c:static PyThread_type_lock *_ssl_locks = NULL;
      ./Modules/_testbuffer.c:static PyObject *structmodule = NULL;
      ./Modules/_testbuffer.c:static PyObject *Struct = NULL;
      ./Modules/_testbuffer.c:static PyObject *calcsize = NULL;
      ./Modules/_testbuffer.c:static PyObject *simple_format = NULL;
      ./Modules/_testbuffer.c:static char *infobuf = NULL;
      ./Modules/_io/bufferedio.c: static PyObject *eintr_int = NULL;
      ./Modules/_asynciomodule.c:static futureiterobject *fi_freelist = NULL;
      ./Modules/_zoneinfo.c:static PyObject *io_open = NULL;
      ./Modules/_zoneinfo.c:static PyObject *_tzpath_find_tzfile = NULL;
      ./Modules/_zoneinfo.c:static PyObject *_common_mod = NULL;
      ./Modules/_zoneinfo.c:static PyObject *TIMEDELTA_CACHE = NULL;
      ./Modules/_zoneinfo.c:static PyObject *ZONEINFO_WEAK_CACHE = NULL;
      ./Modules/_zoneinfo.c:static StrongCacheNode *ZONEINFO_STRONG_CACHE = NULL;
      ./Modules/_sqlite/microprotocols.c:static PyObject *psyco_adapters = NULL;
      ./Modules/_ssl/debughelpers.c: static PyThread_type_lock *lock = NULL;
      ./Modules/_datetimemodule.c:static PyObject *us_per_ms = NULL; /* 1000 */
      ./Modules/_datetimemodule.c:static PyObject *us_per_second = NULL; /* 1000000 */
      ./Modules/_datetimemodule.c:static PyObject *us_per_minute = NULL; /* 1e6 * 60 as Python int */
      ./Modules/_datetimemodule.c:static PyObject *us_per_hour = NULL; /* 1e6 * 3600 as Python int */
      ./Modules/_datetimemodule.c:static PyObject *us_per_day = NULL; /* 1e6 * 3600 * 24 as Python int */
      ./Modules/_datetimemodule.c:static PyObject *us_per_week = NULL; /* 1e6*3600*24*7 as Python int */
      ./Modules/_datetimemodule.c:static PyObject *seconds_per_day = NULL; /* 3600*24 as Python int */
      ./Modules/_datetimemodule.c: static PyObject *module = NULL;
      ./Modules/_decimal/_decimal.c:static PyObject *tls_context_key = NULL;
      ./Modules/_decimal/_decimal.c:static PyDecContextObject *cached_context = NULL;
      ./Modules/_decimal/_decimal.c:static PyObject *current_context_var = NULL;
      ./Modules/_decimal/_decimal.c:static PyObject *default_context_template = NULL;
      ./Modules/_decimal/_decimal.c:static PyObject *basic_context_template = NULL;
      ./Modules/_decimal/_decimal.c:static PyObject *extended_context_template = NULL;
      ./Modules/_decimal/_decimal.c:static PyObject *DecimalException = NULL;
      ./Modules/_decimal/_decimal.c:static PyObject *Rational = NULL;
      ./Modules/_decimal/_decimal.c:static PyTypeObject *DecimalTuple = NULL;
      ./Modules/_decimal/_decimal.c: static PyObject *capsule = NULL;

    5. JunyiXie commented on Mar 22, 2021

      @JunyiXie
      JunyiXiemannequin
      on Mar 22, 2021
      MannequinAuthor
      More actions

      fix
      ./Objects/exceptions.c: static PyObject *print_prefix = NULL;
      ./Objects/exceptions.c: static PyObject *exec_prefix = NULL;

      #24965

    6. vstinner commented on Mar 22, 2021

      @vstinner
      vstinner
      on Mar 22, 2021
      Member
      More actions

      Oh. I didn't expect so many "static" variables. I suggest to wait until a PEP is accepted for running multiple interpreters in parallel.

    7. JunyiXie commented on Mar 22, 2021

      @JunyiXie
      JunyiXiemannequin
      on Mar 22, 2021
      MannequinAuthor
      More actions

      Okay, I will fix these problems first. (Need for your own project)

    8. JunyiXie commented on Mar 22, 2021

      @JunyiXie
      JunyiXiemannequin
      on Mar 22, 2021
      MannequinAuthor
      More actions

      -> Okay, I will fix these problems first. (Need for my own project)

    9. JunyiXie commented on Mar 22, 2021

      @JunyiXie
      JunyiXiemannequin
      on Mar 22, 2021
      MannequinAuthor
      More actions

      I will fix the static variable problem of frequently used code

    10. corona10 commented on Mar 22, 2021

      @corona10
      corona10
      on Mar 22, 2021
      Member
      More actions

      @junyixie

      Please wait your patch until the PEP is approved.

    11. vstinner commented on Mar 22, 2021

      @vstinner
      vstinner
      on Mar 22, 2021
      Member
      More actions

      Until the PEP is accepted, you can start working on a branch if you want. You can post the link to your branch.

    12. JunyiXie commented on Nov 10, 2021

      @JunyiXie
      JunyiXiemannequin
      on Nov 10, 2021
      MannequinAuthor
      More actions

      About PEP
      How is the progress? Where can I track it? Is there any relevant plan?
      thanks

    13. vstinner commented on Nov 10, 2021

      @vstinner
      vstinner
      on Nov 10, 2021
      Member
      More actions

      So far, no PEP has been written.

    14. kumaraditya303 commented on Apr 7, 2022

      @kumaraditya303
      kumaraditya303
      on Apr 7, 2022
      Contributor
      More actions

      Most of the static variables were removed by #31366 so I closed those PRs as they were outdated, however some static variable still exist.

    15. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    16. ezio-melotti
      added this to Subinterpreterson Apr 15, 2022
    17. ezio-melotti
      moved this to Todo in Subinterpreterson Apr 15, 2022
    18. erlend-aasland commented on Jul 24, 2022

      @erlend-aasland
      erlend-aasland
      on Jul 24, 2022
      Contributor
      More actions

      Most of the static variables were removed by #75547 so I closed those PRs as they were outdated, however some static variable still exist.

      Kumar, I think you linked to the incorrect issue or PR. Would you mind updating it with the correct number?

    19. kumaraditya303 commented on Jul 24, 2022

      @kumaraditya303
      kumaraditya303
      on Jul 24, 2022
      Contributor
      More actions

      Kumar, I think you linked to the incorrect issue or PR. Would you mind updating it with the correct number?

      Good catch Erlend! Thanks I updated the PR number, I wonder if it was a C&P error on my end or the Github migration caused it.

      Reacted by Erlend E. Aasland
    20. corona10 commented on Oct 21, 2022

      @corona10
      corona10
      on Oct 21, 2022
      Member
      More actions

      The configuration was removed by @ericsnowcurrently
      see: #93185
      We can close this issue.

      Reacted by Eric Snow
    21. corona10
      closed this as completedon Oct 21, 2022
    22. Repository owner moved this from Todo to Done in Subinterpreterson Oct 21, 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.10 (EOL)end of lifeend of lifetopic-subinterpreterstype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump

      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.