Front page | perl.perl5.porters |
Postings from February 2003
[perl #21282] perlio leaks memory
Thread Next
From:
perlbug-followup
Date:
February 18, 2003 07:58
Subject:
[perl #21282] perlio leaks memory
Message ID:
rt-21282-52365.8.32286527361205@bugs6.perl.org
# New Ticket Created by jaw+perlbug@tcp4me.com
# Please include the string: [perl #21282]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=21282 >
This is a bug report for perl from jaw+perlbug@tcp4me.com,
generated with the help of perlbug 1.34 running under perl v5.8.0.
-----------------------------------------------------------------
[Please enter your report here]
summary:
perlio leaks memory. like a sieve.
details:
the enclosed program, if run using a non-perlio perl
does nothing interesting. if run using 5.8.0 with
perlio the enclosed program leaks memory.
solaris 8 leaks 96 bytes per iteration
netbsd 1.6 leaks 410 bytes per iteration
(no other OSes were tested)
for the non-perlio tests, I tried all of 5.8.0 built
without perlio, 5.6.1, and 5.00503. I tried solaris 8
and netbsd 1.6.
note:
perlio is enabled in the default configuration for 5.8.0
perlio is not enabled in the default configurations for older perls
how to reproduce:
run enclosed program.
################################################################
# example program
################################################################
use Socket;
my $n = 0;
my $tcp = getprotobyname('tcp');
sub stats {
# I'm trying to show a problem with 'socket', not with 'ps'
# if your 'ps' works differently, adjust as needed, or just
# delete this completely and run 'top' in another window
chop( my $mem = `ps -p $$ -o rss | tail -1` );
print STDERR "iter: $n => mem: $mem\n";
}
while(1){
socket(S, PF_INET, SOCK_STREAM, $tcp);
close S;
stats() unless ++$n % 5000;
}
# No, this is not my actual program, nor do I claim that the above
# is useful in way, it is just the smallest program I came up with
# that shows the problem. real + useful program available on request.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=high
---
This perlbug was built using Perl v5.8.0 - Sat Feb 15 09:57:52 EST 2003
It is being executed now by Perl v5.8.0 - Wed Feb 5 22:37:03 EST 2003.
Site configuration information for perl v5.8.0:
Configured by jaw at Wed Feb 5 22:37:03 EST 2003.
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos eumaeus.tcp4me.com 5.8 generic_108528-13 sun4u sparc sunw,ultraax-i2 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.8'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.8.0:
/usr/local/lib/perl5/5.8.0/sun4-solaris
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.8.0:
HOME=/home/eumaeus/jaw
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/eumaeus/jaw/bin:/usr/pkg/script:/usr/local/script:/usr/pkg/bin:/usr/local/bin:/usr/local/bin/image:/usr/local/bin/gnu:/usr/local/bin/X:/usr/X11R6/bin:/usr/openwin/bin:/usr/openwin/bin/xview:/usr/ccs/bin:/opt/gnu/bin:/usr/local/lang:/bin:/usr/bin:/usr/local/etc:/usr/etc:/etc:/usr/hosts:/usr/local/bin/games:/usr/games:/usr/local/bin/xhack:/usr/lib:/usr/lib/acct:/usr/lib/uucp:/sbin:/usr/sbin:/usr/pkg/sbin:/usr/local/sbin:/usr/local/pgsql/bin:/usr/ucb:/home/eumaeus/jaw/sysadm
PERL_BADLANG (unset)
SHELL=/bin/csh
Thread Next
-
[perl #21282] perlio leaks memory
by perlbug-followup