Skip to content

intermittent ResourceTracker called reentrantly for resource cleanup in tests #131788

@graingert

Description

@graingert

Bug report

Bug description:

I occasionally see

UserWarning: ResourceTracker called reentrantly for resource cleanup, which is unsupported. The semaphore object '/mp-gtkzf9rd' might leak.

warned in the test logs, I suspect test_force_shutdown_workers_dead_workers is the culprit.

It looks like the ResourceTracker was built to warn on re-entrant execution but I think it can be made to work instead.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

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