[dancer-users] Get backtrace for stuck Dancer process
John McDermott, CPLP
jjm at jkintl.com
Sat Sep 29 19:43:02 BST 2018
In addition to my earlier suggestion, you might consider use of AOP:
https://metacpan.org/pod/Aspect I have not used it for the need you
have, but there may be a way you can get what you need.
On 9/28/2018 12:39 PM, Warren Young wrote:
> On Sep 28, 2018, at 1:13 AM, Stefan Hornburg (Racke) <racke at linuxia.de> wrote:
>> At any rate, you can strace the Dancer process(es) and see what system calls it does.
> I’m quite familiar with strace, but I rejected that out of hand at the time, since most Perl code is running way above the OS’s syscall interface.
>
> There are only a couple of cases I can think of where what it says might help. E.g. stuck on accept(2).
>
> No, I really do want to be able to produce a Perl-level stack trace, on demand, without killing the program, as via Carp::confess().
>
> It looks like “perl -d” can’t attach to a running program, either, which would let me use some of these fine Perl modules to produce a backtrace.
>
> I found a partial solution, though:
>
> https://metacpan.org/pod/App%3a%3aStacktrace
>
> Unfortunately for me, it requires Perl 5.10, and this problem happened on a box that’s still running 5.8. (Don’t ask, can’t avoid that.)
>
More information about the dancer-users
mailing list