The native_thread_id field of the PyThreadState object is not updated after a fork on Linux (at least). This means that child processes spawned by the main thread of the parent process will have a main thread with the parent thread ID.
The native_thread_id is meant to be consumed by tools like Austin and therefore the behaviour is easily observed with these tools. One way to reproduce this is to profile this with Austin
P403n1x87 commentedDec 31, 2022
•
edited by bedevere-bot
Bug report
The
native_thread_id
field of thePyThreadState
object is not updated after a fork on Linux (at least). This means that child processes spawned by the main thread of the parent process will have a main thread with the parent thread ID.The
native_thread_id
is meant to be consumed by tools like Austin and therefore the behaviour is easily observed with these tools. One way to reproduce this is to profile this with Austinand observe that the reported thread IDs coincide with the parent's PID.
Your environment
Linked PRs
The text was updated successfully, but these errors were encountered: