Skip to content

Fix tests failing with The process cannot access the file because it is being used by another process by force-killing child processes #101601

Open
@arhadthedev

Description

@arhadthedev

Bug report

GitHub Actions continue to sporadically fail with PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\a\\cpython\\cpython\\build\\test_python_5740�\\test_python_worker_5604�'.

The failure happens when a test creates a child process, shares a test directory with it, and the child outlives its parent.

#99464 was the previous attempt. Now we should try to implement #98219 (comment).


Note: this problem was reported a few times before:

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions