Skip Menu |
 

This queue is for tickets about the threads-shared CPAN distribution.

Report information
The Basics
Id: 69740
Status: rejected
Priority: 0/
Queue: threads-shared

People
Owner: Nobody in particular
Requestors: philip.reyniers [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.37
Fixed in: (no value)



Subject: Shared Scalars Leak
Download (untitled) / with headers
text/plain 4.2k
Unless I am doing something wrong it appears that threads::shared leaks when doing a scalar attribute assignment. Leaky Code: #! your_path/perl -l use strict; use threads ( 'exit' => 'threads_only' ); use threads::shared; my $semX :shared = 0; exit 0; Test::LeakTrace::Script Output: perl -MTest::LeakTrace::Script -l ./t.pl leaked HASH(0x81743b8) from /apps/perl/1401/i686/lib/attributes.pm line 50. leaked ARRAY(0x8174358) from /apps/perl/1401/i686/lib/attributes.pm line 50. leaked SCALAR(0x8174348) from /apps/perl/1401/i686/lib/attributes.pm line 50. leaked GLOB(0x8174338) from /apps/perl/1401/i686/lib/attributes.pm line 50. leaked SCALAR(0x8173888) from ./t.pl line 5. Non-Leaky Code: #! your_path/perl -l use strict; use threads ( 'exit' => 'threads_only' ); use threads::shared; my $semX; threads::shared::share($semX); exit 0; VERSIONING INFORMATION: Platforms: Linux SuSe 10 and 11 i686 and x86_64 threads::shared VERSIONING: threads-shared Perl extension for sharing data structures between threads Version: 1.37 Released: 2011-04-21 Author: Jerry D. Hedden <jdhedden@cpan.org> Provide: threads::shared version 1.37 Require: Carp Require: Config Require: ExtUtils::testlib Require: Scalar::Util Require: Test Require: Test::More Require: XSLoader Require: strict Require: threads version 1.73 or better Require: warnings Repo: ActiveState Package Repository CPAN: http://search.cpan.org/dist/threads-shared-1.37/ Installed: 1.37 (perl) Perl VERSIONING: Summary of my perl5 (revision 5 version 14 subversion 1) configuration: Platform: osname=linux, osvers=2.6.17-1.2142_fc4, archname=i686-linux-thread-multi uname='linux perl-linux-vm 2.6.17-1.2142_fc4 #1 tue jul 11 22:41:14 edt 2006 i686 i686 i386 gnulinux ' config_args='-ders -Dcc=gcc -Dusethreads -Duseithreads -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Accflags=-DUSE_SITECUSTOMIZE -Duselargefiles -Accflags=-DPERL_RELOCATABLE_INCPUSH -Accflags=-fno-merge-constants -Dprefix=/apps/perl/1401/i686 -Dprivlib=/apps/perl/1401/i686/lib -Darchlib=/apps/perl/1401/i686/lib -Dsiteprefix=/apps/perl/1401/i686/site -Dsitelib=/apps/perl/1401/i686/site/lib -Dsitearch=/apps/perl/1401/i686/site/lib -Dsed=/bin/sed -Duseshrplib -Dcf_by=ActiveState -Dcf_email=support@ActiveState.com' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DUSE_SITECUSTOMIZE -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DUSE_SITECUSTOMIZE -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe' ccversion='', gccversion='4.0.2 20051125 (Red Hat 4.0.2-8)', 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, prototype=define Linker and Libraries: ld='gcc', ldflags ='' libpth=/lib /usr/lib /usr/local/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.3.6.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.3.6' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/apps/perl/1401/i686/lib/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 1401 [294969] Built under linux Compiled at Jun 16 2011 18:35:13 @INC: /apps/perl/1401/i686/site/lib /apps/perl/1401/i686/lib .
Download (untitled) / with headers
text/plain 5.2k
This is not a threads::shared bug. It is a associated attributes: Show quoted text
> perl -MTest::LeakTrace::Script -l -e 'my $x : shared'
leaked SCALAR(0x2003bf00) from -e line 1. leaked HASH(0x2006aca8) from /usr/lib/perl5/5.16.1/cygwin/attributes.pm line 59. leaked ARRAY(0x2006ac18) from /usr/lib/perl5/5.16.1/cygwin/attributes.pm line 59. leaked SCALAR(0x2006ac00) from /usr/lib/perl5/5.16.1/cygwin/attributes.pm line 59. leaked GLOB(0x2006abe8) from /usr/lib/perl5/5.16.1/cygwin/attributes.pm line 59. Notice that neither the 'threads' module, nor the 'threads::shared' module is being loaded. (Curiously, changing 'my' to 'our' doesn't leak anything.) I am rejecting this ticket and submitting a bug report against 'core'. On 2011-07-24 12:49:45, preyniers wrote: Show quoted text
> > Unless I am doing something wrong it appears that threads::shared
leaks Show quoted text
> when doing a scalar attribute assignment. > > Leaky Code: > #! your_path/perl -l > use strict; > use threads ( 'exit' => 'threads_only' ); > use threads::shared; > my $semX :shared = 0; > exit 0; > > Test::LeakTrace::Script Output: > > perl -MTest::LeakTrace::Script -l ./t.pl > leaked HASH(0x81743b8) from /apps/perl/1401/i686/lib/attributes.pm
line 50. Show quoted text
> leaked ARRAY(0x8174358) from /apps/perl/1401/i686/lib/attributes.pm
line 50. Show quoted text
> leaked SCALAR(0x8174348) from /apps/perl/1401/i686/lib/attributes.pm > line 50. > leaked GLOB(0x8174338) from /apps/perl/1401/i686/lib/attributes.pm
line 50. Show quoted text
> leaked SCALAR(0x8173888) from ./t.pl line 5. > > > Non-Leaky Code: > #! your_path/perl -l > use strict; > use threads ( 'exit' => 'threads_only' ); > use threads::shared; > my $semX; > threads::shared::share($semX); > exit 0; > > VERSIONING INFORMATION: > > Platforms: Linux SuSe 10 and 11 i686 and x86_64 > > threads::shared VERSIONING: > > threads-shared > Perl extension for sharing data structures between threads > Version: 1.37 > Released: 2011-04-21 > Author: Jerry D. Hedden <jdhedden@cpan.org> > Provide: threads::shared version 1.37 > Require: Carp > Require: Config > Require: ExtUtils::testlib > Require: Scalar::Util > Require: Test > Require: Test::More > Require: XSLoader > Require: strict > Require: threads version 1.73 or better > Require: warnings > Repo: ActiveState Package Repository > CPAN: http://search.cpan.org/dist/threads-shared-1.37/ > Installed: 1.37 (perl) > > Perl VERSIONING: > Summary of my perl5 (revision 5 version 14 subversion 1)
configuration: Show quoted text
> > Platform: > osname=linux, osvers=2.6.17-1.2142_fc4, archname=i686-linux-
thread-multi Show quoted text
> uname='linux perl-linux-vm 2.6.17-1.2142_fc4 #1 tue jul 11
22:41:14 Show quoted text
> edt 2006 i686 i686 i386 gnulinux ' > config_args='-ders -Dcc=gcc -Dusethreads -Duseithreads > -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= > -Accflags=-DUSE_SITECUSTOMIZE -Duselargefiles > -Accflags=-DPERL_RELOCATABLE_INCPUSH -Accflags=-fno-merge-constants > -Dprefix=/apps/perl/1401/i686 -Dprivlib=/apps/perl/1401/i686/lib > -Darchlib=/apps/perl/1401/i686/lib > -Dsiteprefix=/apps/perl/1401/i686/site > -Dsitelib=/apps/perl/1401/i686/site/lib > -Dsitearch=/apps/perl/1401/i686/site/lib -Dsed=/bin/sed -Duseshrplib > -Dcf_by=ActiveState -Dcf_email=support@ActiveState.com' > hint=recommended, useposix=true, d_sigaction=define > useithreads=define, usemultiplicity=define > useperlio=define, d_sfio=undef, uselargefiles=define,
usesocks=undef Show quoted text
> use64bitint=undef, use64bitall=undef, uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DUSE_SITECUSTOMIZE > -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing > -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', > optimize='-O2', > cppflags='-D_REENTRANT -D_GNU_SOURCE -DUSE_SITECUSTOMIZE > -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -
pipe' Show quoted text
> ccversion='', gccversion='4.0.2 20051125 (Red Hat 4.0.2-8)', > gccosandvers='' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 > d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=12 Show quoted text
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=4, prototype=define > Linker and Libraries: > ld='gcc', ldflags ='' > libpth=/lib /usr/lib /usr/local/lib > libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc > perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc > libc=/lib/libc-2.3.6.so, so=so, useshrplib=true,
libperl=libperl.so Show quoted text
> gnulibc_version='2.3.6' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E > -Wl,-rpath,/apps/perl/1401/i686/lib/CORE' > cccdlflags='-fPIC', lddlflags='-shared -O2' > > > Characteristics of this binary (from libperl): > Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV > PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP > PERL_PRESERVE_IVUV USE_ITHREADS
USE_LARGE_FILES Show quoted text
> USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API > USE_SITECUSTOMIZE > Locally applied patches: > ActivePerl Build 1401 [294969] > Built under linux > Compiled at Jun 16 2011 18:35:13 > @INC: > /apps/perl/1401/i686/site/lib > /apps/perl/1401/i686/lib > .


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.