Perl/Tk SEGV core dump (Perl 5.6.0, Tk 800.022) 
Author Message
 Perl/Tk SEGV core dump (Perl 5.6.0, Tk 800.022)

Hello,

I'm trying to track down a SEGV-related core dump from a Perl/Tk app. I've
included a stack trace from gdb below. The stack trace is not
consistent, but there is always a "<signal handler called>".  Any help
in figuring out what is wrong would be much appreciated.

The app is used to set up an object with a lot of options which are
then passed onto another Perl script (client.pl) using Storable.
client.pl is started using fork-exec like so:

    do {
        unless ($pid = fork()) {
            exec "$PERL_EXE $PERL_OPTIONS $bindir/client.pl";
        }
    } until defined $pid;

Since there can be a lot of clients kicked off (serially, though), this
code was added:

$SIG{'CHLD'} = \&REAPER;

sub REAPER
{
    my $pid         = waitpid(-1, &POSIX::WNOHANG);
    if ($pid == -1) {
        # no child waiting. Ignore it.
    }
    else {
        $EXITED_PID = $pid;
    }
    $SIG{'CHLD'} = \&REAPER; # in case of unreliable signals

Quote:
}

A couple of other things are:

- use Tk::ErrorDialog;
  for bringing up a stacktrace if needed.

- an animation which cycles through a set of images. This is
  started before client.pl is exec'd and stops either when
  $EXITED_PID == client.pl's pid or when client.pl touches
  a file.

- use sigtrap;
  the only thing I'm not sure about is its placement. I have
  it before 'use Tk;' - is that ok?

Given all this, any tips on where I should look?

Thanks
Sameer

...
Program terminated with signal 11, Segmentation Fault.
...
(gdb) where
#0  0x83a0c in Perl_newSVpvn ()
#1  0x65dd4 in S_mess_alloc ()
#2  0x65efc in Perl_vmess ()
#3  0x6616c in Perl_vdie ()
#4  0x66608 in Perl_die ()
#5  0x6e434 in Perl_sighandler ()
#6  <signal handler called>
#7  0x83830 in Perl_sv_newmortal ()
#8  0xfefb2694 in NameFromCv () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#9  0xfefb358c in XStoOption () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#10 0x7a120 in Perl_pp_entersub ()
#11 0x73148 in Perl_runops_standard ()
#12 0x2a838 in S_call_body ()
#13 0x2a534 in Perl_call_sv ()
#14 0xff05af38 in LangCallCallback () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Event/Event.so
#15 0xfefb0dec in LangDoCallback () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#16 0xfefe610c in TkInvokeMenu () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#17 0xfefe5b88 in MenuWidgetCmd () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#18 0xfefb18e0 in Call_Tk () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#19 0xfefa42d4 in XS_Tk_WidgetMethod () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#20 0x7a120 in Perl_pp_entersub ()
#21 0x73148 in Perl_runops_standard ()
#22 0x2a838 in S_call_body ()
#23 0x2a534 in Perl_call_sv ()
#24 0x2a098 in Perl_call_method ()
#25 0xff05aea8 in LangCallCallback () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Event/Event.so
#26 0xfefb6da0 in LangEventCallback () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#27 0xfefc829c in Tk_BindEvent () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#28 0xfefcfd8c in TkBindEventProc () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#29 0xfefd4ba8 in Tk_HandleEvent () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#30 0xfefd51bc in WindowEventProc () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#31 0xff05bb70 in Tcl_ServiceEvent () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Event/Event.so
#32 0xff05be7c in Tcl_DoOneEvent () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Event/Event.so
#33 0xfefa9db4 in XS_Tk_DoOneEvent () from /pkg/perl5/1.0/lib/site_perl/5.6.0/sun4-solaris/auto/Tk/Tk.so
#34 0x7a120 in Perl_pp_entersub ()
#35 0x73148 in Perl_runops_standard ()
#36 0x29cf4 in S_run_body ()
#37 0x29964 in perl_run ()
#38 0x26e84 in main ()

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the



Wed, 31 Mar 2004 02:41:32 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Tk::Optionmenu in Tk 800.022

2. Tk::Optionmenu in Tk 800.022

3. Tk::Optionmenu in Tk 800.022

4. peculiar problem attempting to compile perl tk 800.022

5. Help Compiling perl-Tk 800.022 for Linux

6. Problem installing Perl/Tk 800.022 on Solaris 2.6

7. Core dump running Perl/Tk with HP-UX 10.20

8. Core dump running Perl/Tk with HP-UX 10.20

9. Tracking down core dumps in Perl/Tk

10. perl TK core dumps on HPUX

11. Tk Version 800.022 vs 800.018

12. Problem with TextList vesion 3 with Tk version 800.022

 

 
Powered by phpBB® Forum Software