develooper Front page | perl.perl5.porters | Postings from September 2003

[perl #24061] shared array memory leak in 5.8.1

Thread Previous | Thread Next
Eric Garland
September 28, 2003 16:58
[perl #24061] shared array memory leak in 5.8.1
Message ID:
# New Ticket Created by  Eric Garland 
# Please include the string:  [perl #24061]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.34 running under perl v5.8.1.

[Please enter your report here]

This program will make perl 5.8.1 expand to using 350 mb on my linux 
machine within 60 seconds: 

use threads;
use threads::shared;
my @shared : shared;
@shared = (1) while (1);

On perl 5.8.1-1 in cygwin in Windows 2000 it will crash perl 
within about 20 seconds.  ActivePerl 5.8.1 isn't out but it crashes
5.8.0 build 806 just like cygwin's perl.  

The ability to use threads is a major step forward for perl. With 
it you can easliy use shared variables to tightly integrate 
two separatly scheduled threads of execution to create complex
applications.  There are a lot of things you can do with shared 
scalars but shared arrays and queues are really key to this whole 
threadding thing.  I'm excited to see this functionality in perl 
and I'm really excited to start using it but with this huge leak 
I can't use it for anything but very small, infrequently used 

Am I doing someting wrong or is this a real bug?  If it's a bug
are there any patches that I could try that could fix it?



[Please do not change anything below this line]
Site configuration information for perl v5.8.1:

Configured by egarland at Sun Sep 28 11:14:35 EDT 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
    osname=linux, osvers=2.4.18-19.7.xsmp, archname=i686-linux-thread-multi-64int
    uname='linux 2.4.18-19.7.xsmp #1 smp thu dec 12 07:56:58 est 2002 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.1 2.96-98)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.8.1:

Environment for perl v5.8.1:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About