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 — GitHub free threading CI failing with SIGTERM · Issue #150114 · python/cpython

GitHub free threading CI failing with SIGTERM #150114

New issue
Copy link
New issue
Copy link
Closed
Closed
GitHub free threading CI failing with SIGTERM#150114
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@colesbury
colesbury
opened on May 19, 2026
Issue body actions

Bug report

Randomly GitHub Ubuntu (free-threading) / build and test (ubuntu-24.04) CI is failing with a SIGTERM (exit code 134).

My best guess is that the VM is running out of memory due to a test using too much memory

0:08:51 load avg: 14.72 [272/505] test.test_asyncio.test_pep492 passed -- running (2): test.test_multiprocessing_spawn.test_processes (3 min 23 sec), test_free_threading (6 min)
make: *** [Makefile:2434: ci] Terminated
Error: Process completed with exit code 143.

Examples:

  • https://github.com/python/cpython/actions/runs/26119235383/job/76816784271?pr=150102
  • https://github.com/python/cpython/actions/runs/26119705469/attempts/2?pr=150104
  • https://github.com/python/cpython/actions/runs/26119705469/job/76829435372?pr=150104

Linked PRs

  • gh-150114: Reduce memory usage of test_free_threading.test_iteration #150115
  • [3.15] gh-150114: Reduce memory usage of test_free_threading.test_iteration (gh-150115) #150124
  • [3.14] gh-150114: Reduce memory usage of test_free_threading.test_iteration (gh-150115) #150123
  • gh-150114: Log the memory usage in regrtest #150255
  • gh-150114: Log the memory usage in regrtest in sequential mode #150264
  • gh-150114: Log the memory usage in regrtest on Windows #150267
  • gh-150114: Log the memory usage in regrtest on FreeBSD #150280
  • gh-150114: Log the memory usage in regrtest on macOS #150396
  • gh-150114: Fix get_process_memory_usage() on Windows #150399
  • gh-150114: Use get_process_memory_usage() in memory watchdog #150402

Activity

Next
  1. colesbury
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    testsTests in the Lib/test dirTests in the Lib/test dir
    topic-free-threading
    on May 19, 2026
  2. colesbury
    added 3 commits that reference this issue on May 19, 2026

    gh-150114: Reduce memory usage of test_free_threading.test_iteration (g…

    61f1221

    [3.14] gh-150114: Reduce memory usage of test_free_threading.test_ite…

    dc3a0b4

    [3.15] gh-150114: Reduce memory usage of test_free_threading.test_ite…

    de401ef
  3. jaraco
    marked Ubuntu freethreading build failed twice spuriously #150139 as a duplicate of this issue on May 20, 2026
  4. vstinner commented on May 21, 2026

    @vstinner
    vstinner
    on May 21, 2026
    Member
    More actions

    I close this issue since test_free_threading memory usage was optimized. Reopen the issue if it comes back on the CI.

    Reacted by Sam Gross
  5. vstinner
    closed this as completedon May 21, 2026
  6. colesbury commented on May 21, 2026

    @colesbury
    colesbury
    on May 21, 2026
    ContributorAuthor
    More actions

    I just saw this again on https://github.com/python/cpython/actions/runs/26233474994/job/77200097878?pr=149164:

    0:06:47 load avg: 14.10 [227/505] test_perfmaps passed -- running (4): test_copy (2 min 52 sec), test.test_concurrent_futures.test_shutdown (47.6 sec), test_free_threading (4 min 8 sec), test_zipfile (2 min 11 sec)
    make: *** [Makefile:2434: ci] Terminated
    Error: Process completed with exit code 143.
    
  7. colesbury
    reopened this on May 21, 2026
  8. colesbury commented on May 21, 2026

    @colesbury
    colesbury
    on May 21, 2026
    ContributorAuthor
    More actions

    Another hypothesis:

    When CPU is this saturated, the runner agent process itself struggles to get scheduled. The agent has to send periodic heartbeats to GitHub's control plane. If it misses too many (because the kernel keeps preempting
    it for python workers), the control plane decides the runner is unhealthy and terminates the job — which manifests exactly as "The runner has received a shutdown signal", with no kernel OOM in dmesg, no memory
    exhaustion, and no warning to the test process.

  9. vstinner
    added a commit that references this issue on May 22, 2026

    pythongh-150114: Log the memory usage in regrtest

    6fe3f5a
  10. vstinner commented on May 22, 2026

    @vstinner
    vstinner
    on May 22, 2026
    Member
    More actions

    I created PR gh-150255 to track the memory usage in regrtest. It should help to understand if the "exit code 143" error is related to the memory usage or not.

    On my PR gh-150248, "Ubuntu (free-threading) / build and test (ubuntu-24.04)" failed twice with:

    ...
    0:15:41 load avg: 6.82 [503/505] test_multiprocessing_main_handling passed (34.6 sec) -- running (2): test_profiling (6 min 58 sec), test_free_threading (1 min 11 sec)
    0:16:11 load avg: 5.71 running (2): test_profiling (7 min 28 sec), test_free_threading (1 min 41 sec)
    0:16:41 load avg: 4.96 running (2): test_profiling (7 min 58 sec), test_free_threading (2 min 11 sec)
    0:17:11 load avg: 4.58 running (2): test_profiling (8 min 28 sec), test_free_threading (2 min 41 sec)
    0:17:41 load avg: 4.41 running (2): test_profiling (8 min 58 sec), test_free_threading (3 min 11 sec)
    0:18:11 load avg: 4.28 running (2): test_profiling (9 min 29 sec), test_free_threading (3 min 41 sec)
    make: *** [Makefile:2434: ci] Terminated
    Error: Process completed with exit code 143.
    

    I don't think that the issue here is the CPU usage, since the CPU usage was way higher before: system load of 31.25 at 8 min versus a system load of 4.28 at 18 min when the error occurred.

    0:08:03 load avg: 31.25 [238/505] test_cmd_line_script passed (48.9 sec) -- running (5): test_capi (2 min 14 sec), test.test_multiprocessing_fork.test_manager (42.0 sec), test_set (42.6 sec), test.test_concurrent_futures.test_process_pool (2 min 48 sec), test.test_multiprocessing_forkserver.test_processes (2 min 11 sec)
    
    • Run 1: https://github.com/python/cpython/actions/runs/26288663736/job/77382755158?pr=150248
    • Run 2: https://github.com/python/cpython/actions/runs/26288663736/job/77390671713?pr=150248
  11. vstinner
    added a commit that references this issue on May 22, 2026

    [DEBUG] pythongh-150114: Log the memory usage in regrtest

    293cb66
  12. 3 remaining items

  13. vstinner commented on May 22, 2026

    @vstinner
    vstinner
    on May 22, 2026
    Member
    More actions

    Update:

    • The exit code 143 error is caused by an Out Of Memory (OOM) in the Linux kernel of the GitHub Action runner.
    • I modified regrtest to log the memory usage: commit.
    • Sometimes, test_free_threading.test_pickle enters an unlimited loop and its memory usage grows constantly: issue test_free_threading.test_pickle takes more than 4 minutes and consumes up to 22 GiB of memory #150257.
    • I created PR gh-150257: Skip test_free_threading.test_pickle #150260 to skip the test_free_threading.test_pickle test causing the issue.
    • Only the main branch is affected: test_free_threading.test_pickle only exists in the main branch.
    Reacted by Cody Maloney and Chris Eibl
  14. vstinner commented on May 22, 2026

    @vstinner
    vstinner
    on May 22, 2026
    Member
    More actions

    Only the main branch is affected: test_free_threading.test_pickle only exists in the main branch.

    Oh. The root cause is the change #150025 which was backported to 3.14 and 3.15 branches. So these branches are affected as well, even if they don't have the new test.

  15. vstinner
    added 3 commits that reference this issue on May 22, 2026

    gh-150114: Log the memory usage in regrtest in sequential mode (#150264)

    4e3ead9

    gh-150114: Log the memory usage in regrtest on Windows (#150267)

    a7d5a6c

    gh-150114: Log the memory usage in regrtest on FreeBSD (#150280)

    dfe7ef6
  16. corona10
    added a commit that references this issue on May 25, 2026

    Merge remote-tracking branch 'upstream/main' into pythongh-150114-macos

    e3870ab
  17. vstinner
    added 2 commits that reference this issue on May 25, 2026

    gh-150114: Fix get_process_memory_usage() on Windows (#150399)

    a189e3d

    pythongh-150114: Use get_process_memory_usage() in memory watchdog

    7a72e31
  18. corona10
    added a commit that references this issue on May 25, 2026

    gh-150114: Log the memory usage in regrtest on macOS (gh-150396)

    c714b56
  19. vstinner commented on May 25, 2026

    @vstinner
    vstinner
    on May 25, 2026
    Member
    More actions

    I modified regrtest (Python test runner) to log the memory usage. It's now supported on Linux, Windows, FreeBSD and macOS.

  20. vstinner
    added a commit that references this issue on May 25, 2026

    gh-150114: Use get_process_memory_usage() in memory watchdog (#150402)

    cb60f48
  21. vstinner
    closed this as completedon May 25, 2026
  22. Yhg1s
    added a commit that references this issue on Sep 29, 2026

    [3.13] gh-75876: Run bigmem tests in a subprocess (GH-155302) (#156014)

    20c0747
  23. serhiy-storchaka
    added 2 commits that reference this issue on Oct 9, 2026

    [3.14] gh-75876: Run bigmem tests in a subprocess (GH-155302) (GH-156013

    2a76adb

    [3.15] gh-75876: Run bigmem tests in a subprocess (GH-155302) (GH-159087

    26fa570
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-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    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.