Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.98k stars 558 forks source link

Fwd: #5079

Closed p5pRT closed 16 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#8587 (status was 'rejected')

Searchable as RT8587$

p5pRT commented 22 years ago

From miblo@yahoo.com

This is a bug report for perl from miblo@​yahoo.com\, generated with the help of perlbug 1.33 running under perl v5.6.1.

------------------------------- [Please enter your report here]

My problem is that perl 5.6.1-nb6 & -nb7 intermittently coredumps on my NetBSD 1.5.2 system\, when performing a nightly analysis of network traffic. The problem is reproduceable on the system\, but does not occur when running on a Linux or Solaris system. I think the problem is related to the Perl build on the NetBSD system and a memory issue.

I must say I'am not too familiar with NetBSD\, but very familiar with Unix\, and quite familiar with perl. However\, debugging core-dumps with gdb is past my comprehension...

Anyway\, the script reads a 20MB+ file (200000+ lines of data) every night\, parses it\, and i produces a report. The coredump doesn't occur every night\, but roughly every one of three. When the problem occurs\, it just terminates with a 'Segmentation fault'.

When trying to debug the whereabouts of the problem in the code\, it would 'move' depending on where i put the debug statements\, so I can conclude that there is not a specific statement in my code causing the problem. I can also conclude that there aren't any errors in the input file that could be cause for problem.

The size of the input files does not effect the problem. I.e. the files are normally 10-60 MB per night\, and the input files causing problems can be anywhere in that range. If it is a memory leakage problem\, one would expect larger files to cause more problems\, which doesn't seem to be the case. The input files contain nothing more than tcp-audit data\, generated by a software package called 'ipaudit'. Each line is space-delimited\, and contains only ASCII data (i.e. no binary stuff).

In the script\, I use hashes to summarize the data\, and then print everything based on the results in the hashes. There are several hashes\, and they contain things such as which IP sent most packets\, or how many sessions were initiated by a certain IP\, etc.

I have installed Perl 5.6.1-nb6 & -nb7 on NetBSD 1.5.2 with the same results - a perl core-dump.

I have tested the same scripts and input data on similiar Linux-machines and Solaris machines\, with no problems at all.

So\, my question is really\, is this a known problem (which i seriously doubt)\, and if not\, how do I go about troubleshooting the core-dumps to determine where the problem is?

All scripts\, input-files & core-dumps are available on request.

Rgds\,

~Mike

[Please do not change anything below this line]


--- Flags​: category=core severity=medium --- Site configuration information for perl v5.6.1​:

Configured by mibl at Wed Feb 13 14​:19​:51 CET 2002.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration​: Platform​: osname=netbsd\, osvers=1.5.2\, archname=i386-netbsd uname='netbsd netbsd 1.5.2 netbsd 1.5.2 (generic) #3​: sat aug 18 23​:37​:05 cest 2001

he@​hamster.urc.uninett.no​:usrsrcsysarchi386compilegeneric i386 ' config_args='-sde -Dprefix=/usr/pkg -Dscriptdir=/usr/pkg/bin -Darchname=i386-netbsd -Doptimize=-O2 -Dcc=cc -Uusemymalloc -Uinstallusrbinperl -Dlibswanted=m crypt -Duseshrplib' hint=recommended\, useposix=true\, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler​: cc='cc'\, ccflags ='-fno-strict-aliasing -I/usr/pkg/include'\, optimize='-O2'\, cppflags='-fno-strict-aliasing -I/usr/pkg/include' ccversion=''\, gccversion='egcs-2.91.66 19990314 (egcs-1.1.2 release)'\, gccosandvers='' intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234 d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=12 ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8 alignbytes=4\, usemymalloc=n\, prototype=define Linker and Libraries​: ld='cc'\, ldflags ='-Wl\,-R/usr/pkg/lib -L/usr/pkg/lib' libpth=/usr/pkg/lib /usr/lib libs=-lm -lcrypt perllibs=-lm -lcrypt libc=/usr/lib/libc.so\, so=so\, useshrplib=true\, libperl=libperl.so Dynamic Linking​: dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-Wl\,-whole-archive -lgcc -Wl\,-no-whole-archive -Wl\,-E -Wl\,-R/usr/pkg/lib -Wl\,-R/usr/pkg/lib/perl5/5.6.1/i386-netbsd/CORE' cccdlflags='-DPIC -fPIC '\, lddlflags='--whole-archive -shared -Wl\,-R/usr/pkg/lib -L/usr/pkg/lib'

Locally applied patches​:

--- @​INC for perl v5.6.1​: /usr/pkg/lib/perl5/site_perl/5.6.1/i386-netbsd /usr/pkg/lib/perl5/site_perl/5.6.1 /usr/pkg/lib/perl5/site_perl /usr/pkg/lib/perl5/5.6.1/i386-netbsd /usr/pkg/lib/perl5/5.6.1 .

--- Environment for perl v5.6.1​: HOME=/root LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset)

PATH=/home/mibl/bin​:/bin​:/sbin​:/usr/bin​:/usr/sbin​:/usr/X11R6/bin​:/usr/pkg/bin​:/usr/pkg/sbin​:/usr/games​:/usr/local/bin​:/usr/local/sbin PERL_BADLANG (unset) SHELL=/bin/bash

--g1DED5x15292.1013609585/netbsd.ccnox.com--

__________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http​://sports.yahoo.com

p5pRT commented 22 years ago

From @nwc10

On Tue\, Feb 19\, 2002 at 01​:13​:34AM -0800\, Mike Blomgren wrote​:

My problem is that perl 5.6.1-nb6 & -nb7

So\, my question is really\, is this a known problem (which i seriously doubt)\, and if not\, how do I go about troubleshooting the core-dumps to determine where the problem is?

It's a bit tricky from your description.

All scripts\, input-files & core-dumps are available on request.

Is an example script that core dumps small enough to e-mail directly to this list? And if you load the core dump into gdb\, probably something like

gdb /usr/bin/perl core

and then in gdb type

where

you should get a stack backtrace of the function where the coredump happened. Sending that to the perl5-porters list would also be very helpful.

snipped from the perl -V output from perlbug​:

Locally applied patches​:

What's are these -nb6 and -nb7 version that you mention at the top of your message? Are they related to NetBSD packages of perl? If so\, oughtn't they be adding something to the -V output\, to be honest? [That's probably more a NetBSD maintainers question than a question for you]

Nicholas Clark -- EMCFT http​://www.ccl4.org/~nick/CV.html

p5pRT commented 16 years ago

p5p@spam.wizbit.be - Status changed from 'stalled' to 'rejected'