Thanks to visit codestin.com
Credit goes to github.com

Skip to content

threading.get_native_id() is not unique across processes on DragonFly #154283

Description

@serhiy-storchaka

On DragonFly BSD, threading.get_native_id() returns lwp_gettid(), which is only unique within a process (the main thread is LWP 1 in every process), so it is not unique across processes as on other platforms.

This makes test_native_id_after_fork and test_process_mainthread_native_id fail with AssertionError: 1 == 1.

Solaris had the same problem (gh-137884), fixed by combining the thread id with the process id. DragonFly can do the same.

Linked PRs

Activity

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.13bugs and security fixes3.14bugs and security fixes3.15pre-release feature fixes, bugs and security fixestestsTests in the Lib/test dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions