-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
metrics: add worker thread id #6695
Conversation
This allows querying the thread id of each worker thread. Additional information, such as native thread id, can be collected using runtime::Builder::on_thread_start() and correlated using the thread id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This looks good to me.
/// If additional information about the thread, such as its native id, are | ||
/// required, those can be collected in [`on_thread_start`] and correlated | ||
/// using the thread id. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is enough for your purposes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for now we just want to send SIGABRT to the hanging thread and for that we collect the pthread_t
id of each worker thread in on_thread_start
.
on_thread_park()
and on_thread_unpark()
callbacks (for stuck worker watchdog)
#6353
This allows querying the thread id of each worker thread.
Additional information, such as native thread id, can be collected using
runtime::Builder::on_thread_start()
and correlated using the thread id.Motivation
See #6353 and discussion in #6370.
Solution
Provides thread ids of workers, so that a stuck worker can be correlated to a thread.