Issue #12741 has been updated by Zach Leslie.
If this gets implemented, I would love to see a document on how to make use of it for people who aren't developers. ---------------------------------------- Feature #12741: Add a hook for dumping thread state / backtrace of a running puppet process https://projects.puppetlabs.com/issues/12741#change-55373 Author: Chris Price Status: Accepted Priority: Normal Assignee: Category: Target version: Affected Puppet version: Keywords: Branch: I was working on a ticket from the community on Friday, and came across a situation where it would have been really valuable to be able to get a backtrace / thread dump from a puppet agent process that he had running in his environment. There are a few existing tools out there that provide some of this sort of functionality... in particular, a gem called "xray". Among other things, it contains a file that you can require: require 'xray/thread_dump_signal_handler' which basically just calls Kernel.trap to add a signal handler for the "QUIT" signal. The signal handler simply calls "caller" and prints it to stdout. It looks like a very low-overhead snippet of code. And, actually, it's only about 4 lines... so we could just add something like this to puppet directly and then we wouldn't need to introduce a dependency on the gem. Considerations: 1. is "QUIT" the best signal to trap for this? 2. we should try to have it dump all threads, not just the current one. it seems like (for ruby 1.8.7) you can't accomplish this without patching the ruby interpreter itself... but for 1.9 You can use "Thread#backtrace". So this code should probably be written to try to leverage that. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
