Skip to content

test_repr_lock leaves a dangling process #155732

Description

@serhiy-storchaka

Bug report

test_repr_lock starts the process P2, terminates it and never joins it, so it is still in multiprocessing.active_children() when the test ends:

$ ./python -m test --fail-env-changed test.test_multiprocessing_fork.test_processes -m test.test_multiprocessing_fork.test_processes.WithProcessesTestLock.test_repr_lock
Warning -- Dangling processes: {<Process name='P2' pid=3761884 parent=3761868 stopped exitcode=-SIGTERM>}
Result: ENV CHANGED

The same for the forkserver and spawn variants.

Running the whole file passes: the process is reaped before the environment is checked.

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    3.13only security fixes
    3.14bugs and security fixes
    3.15bugs and security fixes
    3.16new features, bugs and security fixes
    on Aug 13, 2026
  2. added 2 commits that reference this issue on Aug 14, 2026
  3. added a commit that references this issue on Aug 14, 2026
  4. added a commit that references this issue on Aug 15, 2026
  5. added a commit that references this issue on Aug 27, 2026
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.13only security fixes3.14bugs and security fixes3.15bugs and security fixes3.16new features, bugs and security fixestestsTests in the Lib/test dirtopic-multiprocessingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions