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_dtrace should try to terminate SystemTap gracefully before SIGKILL · Issue #156722 · python/cpython

test_dtrace should try to terminate SystemTap gracefully before SIGKILL #156722

New issue
Copy link
New issue
Copy link
Closed
Closed
test_dtrace should try to terminate SystemTap gracefully before SIGKILL#156722
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@stratakis
stratakis
opened on Aug 31, 2026
Issue body actions

Bug report

Bug description:

While checking out gh-156701 where the systemtap compilation was taking more than 10 seconds (hence an increase to timeout is required) I noticed also that the buildbot that I was testing at had too many D-state processes. That's possibly due to TraceBackend.trace() sending a SIGKILL immediately to the tracer process group when a timeout happens.

This prevents SystemTap and its children from performing normal cleanup. As mentioned in gh-156701 this left stap* temporary files behind, on the Fedora ppc64le buildbots, but also due repeated SystemTap timeouts, the buildbots had many orphaned staprun processes in Dstate, and the machines waited for them during shutdown.

From the system tap documentation: https://sourceware.org/systemtap/man/stap.1.html#abnormal-termination

One should avoid killing the stap process forcibly, for example with SIGKILL, because the stapio process (a child process of the stap process) and the loaded module may be left running on the system. If this happens, send SIGTERM or SIGINT to any remaining stapio processes, then use rmmod to unload the systemtap module.

Increasing the usability timeout should fix the premature timeout #156720, but genuine timeout still needs to be handled properly with SIGTERM and then if that fails a SIGKILL.

CPython versions tested on:

CPython main branch, 3.16, 3.15

Operating systems tested on:

Linux

Linked PRs

  • gh-156722: Terminate tracing processes gracefully on timeout for test_dtrace #156753
  • [3.15] gh-156722, test_dtrace: Terminate tracing processes gracefully on timeout (GH-156753) #157985

Activity

  1. stratakis
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Aug 31, 2026
  2. StanFromIreland
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Aug 31, 2026
  3. vstinner
    added a commit that references this issue on Sep 23, 2026

    gh-156722, test_dtrace: Terminate tracing processes gracefully on tim…

    55ecc0a
  4. hugovk
    added a commit that references this issue on Sep 28, 2026

    [3.15] gh-156722, test_dtrace: Terminate tracing processes gracefully…

    db379c4
  5. hugovk
    closed this as completedon Oct 11, 2026
  6. vstinner
    added a commit that references this issue on Oct 16, 2026

    [3.14] gh-156701: Backport test_dtrace from main (#159596)

    566f815
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 dirtype-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.