[ruby-core:114517] [Ruby master Bug#19850] Get thread creation time

Issue #19850 has been reported by ngan (Ngan Pham). ---------------------------------------- Bug #19850: Get thread creation time https://bugs.ruby-lang.org/issues/19850 * Author: ngan (Ngan Pham) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I was debugging some threads hanging issue and thought it would be nice to know how long a thread has been around for. Would there be interest in a `Thread#creation_time` (or some other name) that returns the time when the thread was created? -- https://bugs.ruby-lang.org/

Issue #19850 has been updated by mame (Yusuke Endoh). Status changed from Open to Feedback It is unclear what you expect from `Thread#creation_time`. Could you please explain your use case in more detail and how it is useful for the case? ---------------------------------------- Feature #19850: Get thread creation time https://bugs.ruby-lang.org/issues/19850#change-104324 * Author: ngan (Ngan Pham) * Status: Feedback * Priority: Normal ---------------------------------------- I was debugging some threads hanging issue and thought it would be nice to know how long a thread has been around for. Would there be interest in a `Thread#creation_time` (or some other name) that returns the time when the thread was created? -- https://bugs.ruby-lang.org/

Issue #19850 has been updated by ngan (Ngan Pham). In the process of debugging a stuck process on production (Sidekiq), we've been dumping all the threads' backtraces. We can see a thread that's sleeping at `net/http.rb`. (I've filed an issue here: https://github.com/ruby/net-http/issues/149) But I was just thinking it would be nice to know, in general, how long a thread has been running to get a better sense if this thread has been stuck for a while or not. ---------------------------------------- Feature #19850: Get thread creation time https://bugs.ruby-lang.org/issues/19850#change-104339 * Author: ngan (Ngan Pham) * Status: Feedback * Priority: Normal ---------------------------------------- I was debugging some threads hanging issue and thought it would be nice to know how long a thread has been around for. Would there be interest in a `Thread#creation_time` (or some other name) that returns the time when the thread was created? -- https://bugs.ruby-lang.org/

Issue #19850 has been updated by naruse (Yui NARUSE). To investigate when you want to investigate what causes a program hang... ## pid2line https://gist.github.com/nurse/0619b6af90df140508c2 It shows what threads are running or sleeping and where it is as C function name. In your case, it will show _connect. ## rbspy When it is running in infinite loop, rbspy will help where it is. https://rbspy.github.io/ ---------------------------------------- Feature #19850: Get thread creation time https://bugs.ruby-lang.org/issues/19850#change-104580 * Author: ngan (Ngan Pham) * Status: Open * Priority: Normal ---------------------------------------- I was debugging some threads hanging issue and thought it would be nice to know how long a thread has been around for. Would there be interest in a `Thread#creation_time` (or some other name) that returns the time when the thread was created? -- https://bugs.ruby-lang.org/

Issue #19850 has been updated by mame (Yusuke Endoh). Status changed from Open to Rejected We discussed this at the dev meeting, and decided not to implement it. Considering frameworks that implement a thread pool, the time when a Thread object is created is not necessarily useful, but could be rather confusing. It would be better for users or frameworks to record their own time at the start of a process. ---------------------------------------- Feature #19850: Get thread creation time https://bugs.ruby-lang.org/issues/19850#change-104592 * Author: ngan (Ngan Pham) * Status: Rejected * Priority: Normal ---------------------------------------- I was debugging some threads hanging issue and thought it would be nice to know how long a thread has been around for. Would there be interest in a `Thread#creation_time` (or some other name) that returns the time when the thread was created? -- https://bugs.ruby-lang.org/
participants (3)
-
mame (Yusuke Endoh)
-
naruse (Yui NARUSE)
-
ngan (Ngan Pham)