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 — test_importlib test_multiprocessing_pool_circular_import() fails randomly on Thread sanitizer (free-threading) on GitHub Actions · Issue #125221 · python/cpython

test_importlib test_multiprocessing_pool_circular_import() fails randomly on Thread sanitizer (free-threading) on GitHub Actions #125221

New issue
Copy link
New issue
Copy link
Closed
Closed
test_importlib test_multiprocessing_pool_circular_import() fails randomly on Thread sanitizer (free-threading) on GitHub Actions#125221
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-free-threading

Description

@vstinner
vstinner
opened on Oct 9, 2024
Issue body actions

Example: https://github.com/python/cpython/actions/runs/11263361511/job/31321078076?pr=125219

 0:01:54 load avg: 4.86 [ 9/22/1] test_importlib failed (1 failure) (1 min 35 sec) -- running (2): test_io (1 min 20 sec), test_queue (1 min 3 sec)
test test_importlib failed -- Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython/Lib/test/test_importlib/test_threaded_import.py", line 255, in test_multiprocessing_pool_circular_import
    script_helper.assert_python_ok(fn)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "/home/runner/work/cpython/cpython/Lib/test/support/script_helper.py", line 182, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
  File "/home/runner/work/cpython/cpython/Lib/test/support/script_helper.py", line 167, in _assert_python
    res.fail(cmd_line)
    ~~~~~~~~^^^^^^^^^^
  File "/home/runner/work/cpython/cpython/Lib/test/support/script_helper.py", line 80, in fail
    raise AssertionError(f"Process return code is {exitcode}\n"
    ...<10 lines>...
                         f"---")
AssertionError: Process return code is 66
command line: ['/home/runner/work/cpython/cpython/python', '-X', 'faulthandler', '-I', '/home/runner/work/cpython/cpython/Lib/test/test_importlib/partial/pool_in_threads.py']

stdout:
---

---

stderr:
---

---

Linked PRs

  • gh-125221: Fix free-threading data race in object.__reduce_ex__ #125267
  • [3.13] gh-125221: Fix free-threading data race in object.__reduce_ex__ (GH-125267) #125305
Reacted by Sam Gross

Activity

  1. vstinner
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    topic-free-threading
    on Oct 9, 2024
  2. vstinner
    changed the title [-]test_importlib test_multiprocessing_pool_circular_import() fails on Thread sanitizer (free-threading) on GitHub Actions[/-] [+]test_importlib test_multiprocessing_pool_circular_import() fails randomly on Thread sanitizer (free-threading) on GitHub Actions[/+] on Oct 9, 2024
  3. colesbury commented on Oct 9, 2024

    @colesbury
    colesbury
    on Oct 9, 2024
    Contributor
    More actions

    Looks like a data race on objreduce:

    cpython/Objects/typeobject.c

    Lines 7399 to 7409 in 0c5a48c

    #define objreduce \
    (_Py_INTERP_CACHED_OBJECT(_PyInterpreterState_GET(), objreduce))
    PyObject *reduce, *res;
    if (objreduce == NULL) {
    PyObject *dict = lookup_tp_dict(&PyBaseObject_Type);
    objreduce = PyDict_GetItemWithError(dict, &_Py_ID(__reduce__));
    if (objreduce == NULL && PyErr_Occurred()) {
    return NULL;
    }
    }

  4. colesbury
    added a commit that references this issue on Oct 10, 2024

    pythongh-125221: Fix free-threading data race in `object.__reduce_ex__`

    7cb47fe
  5. kumaraditya303
    added a commit that references this issue on Oct 11, 2024

    gh-125221: Fix free-threading data race in `object.__reduce_ex__` (#1…

    b12e992
  6. miss-islington
    added a commit that references this issue on Oct 11, 2024

    pythongh-125221: Fix free-threading data race in `object.__reduce_ex_…

    20e37f4
  7. kumaraditya303
    closed this as completedon Oct 11, 2024
  8. kumaraditya303
    added a commit that references this issue on Oct 11, 2024

    [3.13] gh-125221: Fix free-threading data race in `object.__reduce_ex…

    b3badab
  9. vstinner commented on Oct 11, 2024

    @vstinner
    vstinner
    on Oct 11, 2024
    MemberAuthor
    More actions

    Thank you for the quick fix @colesbury!

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

    testsTests in the Lib/test dirTests in the Lib/test dirtopic-free-threading

    Projects

    No projects

      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.