You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not use this module in production environment and do not rely on the format of the data produced by DebugProbes.
It would be great if one core aspect of this facility could be made ready for production, which is the ability to dump the active coroutines. Given that coroutines can suspend, a thread dump is not enough to show what is happening (or not happening) inside a production system. Threads could simply be suspended waiting for an active coroutine to resume, but currently there is no way to obtain this information.
Like thread dumps, it should also be possible to obtain the dump via JMX. This would be analagous to the java.lang.Threading.dumpAllThreads() JMX operation provided by ThreadMXBean. However, a JMX facility could easily be implemented at a later time.
On the page https://github.com/Kotlin/kotlinx.coroutines/tree/master/kotlinx-coroutines-debug, there is still the warning:
It would be great if one core aspect of this facility could be made ready for production, which is the ability to dump the active coroutines. Given that coroutines can suspend, a thread dump is not enough to show what is happening (or not happening) inside a production system. Threads could simply be suspended waiting for an active coroutine to resume, but currently there is no way to obtain this information.
As mentioned by @Vsevolod.Tolstopyatov in Slack, there is a facility to dump coroutines via
kill -5
when the debug agent is installed (https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-debug/src/AgentPremain.kt#L12). I would love to be able to dokill -5
on a production system to dump coroutines.Like thread dumps, it should also be possible to obtain the dump via JMX. This would be analagous to the
java.lang.Threading.dumpAllThreads()
JMX operation provided byThreadMXBean
. However, a JMX facility could easily be implemented at a later time.Original: https://youtrack.jetbrains.com/issue/KT-32953
The text was updated successfully, but these errors were encountered: