Title: How to track down "Memory fault"

We recently upgraded several bits of software (OS, database, 3rd party app). We then experienced a performance problem (with memory management). Resetting some OS parameters seems to have cured this problem.

However, during the investigations, the system admins decided to re-install Perl on our test box so that it would match production.

Test:        This is perl, v5.6.1 built for alpha-dec_osf

Prod:        This is perl, v5.6.1 built for alpha-dec_osf-ld

Since this re-build, the following code fragment fails on the test box only.

        [EMAIL PROTECTED]> cat t9
        #! /usr/local/bin/perl
        use Term::ReadKey;
            ReadMode "raw";
            ReadMode "normal";
        exit;

        [EMAIL PROTECTED]> t9
        Memory fault(coredump)

I am having difficulty determining what is different between the two boxes.

Included below is as far as I have currently gone (Unix, C and dbx are all new to me).

I would appreciate any pointers on what to do next   (rebuild Perl with debug for instance??)

Regards,
Paul



        [EMAIL PROTECTED]> dbx  /usr/local/bin/perl5.6.1 core
        dbx version 5.1
        Type 'help' for help.
        Core file created by program "t9"
       
        signal Segmentation fault at >*[., 0x30000003f34]       ldq     a0, 24(a0)
        (dbx)

[EMAIL PROTECTED]> perl -d t9
Default die handler restored.

Loading DB routines from perl5db.pl version 1.07
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(t9:3):       ReadMode "raw";
  DB<1> s
Term::ReadKey::ReadMode(/usr/local/lib/perl5/site_perl/5.6.1/alpha-dec_osf/Term/ReadKey.pm:243):
243:            my($mode) = $modes{$_[0]};
  DB<1> s
Term::ReadKey::ReadMode(/usr/local/lib/perl5/site_perl/5.6.1/alpha-dec_osf/Term/ReadKey.pm:244):
244:            my($fh) = normalizehandle((@_>1?$_[1]:\*STDIN));
  DB<1> s
Term::ReadKey::normalizehandle(/usr/local/lib/perl5/site_perl/5.6.1/alpha-dec_osf/Term/ReadKey.pm:254):
254:            my($file) = @_;
  DB<1> s
Term::ReadKey::normalizehandle(/usr/local/lib/perl5/site_perl/5.6.1/alpha-dec_osf/Term/ReadKey.pm:256):
256:            if(ref($file)) { return $file; } # Reference is fine
  DB<1> s
Term::ReadKey::normalizehandle(/usr/local/lib/perl5/site_perl/5.6.1/alpha-dec_osf/Term/ReadKey.pm:256):
256:            if(ref($file)) { return $file; } # Reference is fine
  DB<1> s
Term::ReadKey::ReadMode(/usr/local/lib/perl5/site_perl/5.6.1/alpha-dec_osf/Term/ReadKey.pm:245):
245:            if(defined($mode))
  DB<1> s
Term::ReadKey::ReadMode(/usr/local/lib/perl5/site_perl/5.6.1/alpha-dec_osf/Term/ReadKey.pm:246):
246:                    { SetReadMode($mode,$fh) }
247:            elsif( $_[0] =~ /^\d/)

********* this is where it start to differ from the production box  *****************
********* which returns to the main routine
*********      DB<1> s
*********      main::(t9:4):       ReadMode "normal";
**************************************************************************************

  DB<1> s
Term::ReadKey::SetReadMode(/usr/local/lib/perl5/5.6.1/Carp.pm:97):
97:         { local $@; require Carp::Heavy; }  # XXX fix require to not clear [EMAIL PROTECTED]
  DB<1> s
Term::ReadKey::SetReadMode(/usr/local/lib/perl5/5.6.1/Carp.pm:97):
97:         { local $@; require Carp::Heavy; }  # XXX fix require to not clear [EMAIL PROTECTED]
  DB<1> s
Term::ReadKey::SetReadMode(/usr/local/lib/perl5/5.6.1/Carp.pm:97):
97:         { local $@; require Carp::Heavy; }  # XXX fix require to not clear [EMAIL PROTECTED]
  DB<1> s
Term::ReadKey::SetReadMode(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:247):
247:    1;
  DB<1> s
Term::ReadKey::SetReadMode(/usr/local/lib/perl5/5.6.1/Carp.pm:98):
98:         goto &longmess_heavy;
  DB<1> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:30):
30:         return @_ if ref $_[0];
  DB<1> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:31):
31:         my $error = join '', @_;
  DB<1> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:32):
32:         my $mess = "";
  DB<1> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:33):
33:         my $i = 1 + $CarpLevel;
  DB<1> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:34):
34:         my ($pack,$file,$line,$sub,$hargs,$eval,$require);
  DB<1> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:35):
35:         my (@a);
  DB<1> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:39):
39:         while (do { { package DB; @a = caller($i++) } } ) {
  DB<1> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:39):
39:         while (do { { package DB; @a = caller($i++) } } ) {
  DB<1> s
Carp::longmess_heavy(/usr/local/lib/perl5/5.6.1/Carp/Heavy.pm:124):
124:        $mess || $error;
  DB<1> s
Signal SEGV:
Resources lost(coredump)

**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

Reply via email to