FastNetMon

Friday, 26 September 2014

Как понять в каком месте завис Perl скрипт?

Берем вот этот скрипт: https://raw.githubusercontent.com/ahiguti/gdbperl/master/gdbperl.pl

Стягиваем gdb: yum install -y gdb

Получаем нечто вот такое:
perl gdbperl.pl 755934
command:
gdb -silent -nw /usr/bin/perl 755934

environ:
SHELL=/bin/sh
MAILTO=root
USER=root
PATH=/usr/bin:/bin
PWD=/root
SHLVL=1
HOME=/root
LOGNAME=root
_=/usr/bin/fastvz_backup.pl

c_backtrace:
#0  0x0000003f7540da70 in __read_nocancel () from /lib64/libpthread.so.0
#1  0x0000003f774f0990 in PerlIOUnix_read () from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
#2  0x0000003f774f5055 in PerlIOBuf_fill () from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
#3  0x0000003f774ef848 in Perl_PerlIO_fill () from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
#4  0x0000003f774f4cbf in PerlIOBase_read () from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
#5  0x0000003f774f4dfb in PerlIO_getc () from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
#6  0x0000003f774a29b0 in Perl_sv_gets () from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
#7  0x0000003f7748dbd3 in Perl_do_readline () from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
#8  0x0000003f7748a37e in Perl_runops_standard () from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
#9  0x0000003f774380ba in perl_run () from /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
#10 0x00000000004017bc in main ()

perl_backtrace:
[5] Tool::get_backups_list("7xxxxx", "xxx", "7549") <- /usr/local/lib/perl/FastBackup.pm:253(FastBackup)
[4] Tool::get_last_full_backup_info("xxxx", "xxxx", "7549") <- /usr/bin/fastssad.pl:268(main)
[3] (other) <- /usr/bin/faxxx.pl:266(main)
[2] (loop) <- /usr/bin/fasxxxxx.pl:224(main)
[1] main::function() <- /usr/bin/faxxxx.pl:156(main)
Источник: http://www.slideshare.net/hirose31/inspect-runningperl


No comments :

Post a Comment

Note: only a member of this blog may post a comment.