Skip Menu |

This queue is for tickets about the Pod-POM-Web CPAN distribution.

Report information
The Basics
Id: 28419
Status: resolved
Priority: 0/
Queue: Pod-POM-Web

People
Owner: Nobody in particular
Requestors: offer.kaye [...] gmail.com
Cc:
AdminCc:

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



Subject: Pod::POM::Web::Indexer not working
Date: Sun, 22 Jul 2007 10:44:58 +0300
To: bug-Pod-POM-Web [...] rt.cpan.org
From: "Offer Kaye" <offer.kaye [...] gmail.com>
Hi, I tried Pod::POM::Web::Indexer, specifically the command: Show quoted text
> perl -MPod::POM::Web::Indexer -e 'Pod::POM::Web::Indexer->new->index'
And all I got were the following 2 lines: DIR /util/Local/perl/linux/lib/5.8.8/i686-linux-thread-multi Use of freed value in iteration at /util/Local/perl/linux/lib/site_perl/5.8.8/Pod/POM/Web/Indexer.pm line 314. My perl details (basically ActivePerl 5.8.8 running on Linux): Show quoted text
> perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.2.17, archname=i686-linux-thread-multi uname='linux gimlet 2.2.17 #1 sun jun 25 09:24:41 est 2000 i686 unknown ' config_args='-ders -Dcc=gcc -Dusethreads -Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Accflags=-DUSE_SITECUSTOMIZE -Duselargefiles -Accflags=-DNO_HASH_SEED -Dinc_version_list=5.8.7/$archname 5.8.7 5.8.6/$archname 5.8.6 5.8.4/$archname 5.8.4 5.8.3/$archname 5.8.3 5.8.2/$archname 5.8.2 5.8.1/$archname 5.8.1 5.8.0/$archname 5.8.0 -Dconfig_heavy=Config_static.pl -Dprefix=/util/Local/perl/linux -Dcf_by=ActiveState -Dcf_email=support@ActiveState.com' 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=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -fno-strict-aliasing -pipe' ccversion='', gccversion='2.95.2 20000220 (Debian GNU/Linux)', 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 -lndbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lposix perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -lposix libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.1.3' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fpic', lddlflags='-shared' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 817 [257965] Iin_load_module moved for compatibility with build 806 PerlEx support in CGI::Carp Less verbose ExtUtils::Install and Pod::Find Patch for CAN-2005-0448 from Debian with modifications Partly reverted 24733 to preserve binary compatibilty 27528 win32_pclose() error exit doesn't unlock mutex 27527 win32_async_check() can loop indefinitely 27515 ignore directories when searching @INC 27359 Fix -d:Foo=bar syntax 27210 Fix quote typo in c2ph 27203 Allow compiling swigged C++ code 27200 Make stat() on Windows handle trailing slashes correctly 27194 Get perl_fini() running on HP-UX again 27133 Initialise lastparen in the regexp structure 27034 Avoid "Prototype mismatch" warnings with autouse 26970 Make Passive mode the default for Net::FTP 26921 Avoid getprotobyname/number calls in IO::Socket::INET 26897,26903 Make common IPPROTO_* constants always available 26670 Make '-s' on the shebang line parse -foo=bar switches 26379 Fix alarm() for Windows 2003 26087 Storable 0.1 compatibility 25861 IO::File performace issue 25084 long groups entry could cause memory exhaustion 24699 ICMP_UNREACHABLE handling in Net::Ping Built under linux Compiled at Mar 20 2006 19:08:58 @INC: /util/Local/perl/linux/lib/5.8.8/i686-linux-thread-multi /util/Local/perl/linux/lib/5.8.8 /util/Local/perl/linux/lib/site_perl/5.8.8/i686-linux-thread-multi /util/Local/perl/linux/lib/site_perl/5.8.8 /util/Local/perl/linux/lib/site_perl . Regards, -- Offer Kaye
Le Dim. Jul. 22 03:45:24 2007, offer.kaye@gmail.com a écrit : Show quoted text
> Hi, > I tried Pod::POM::Web::Indexer, specifically the command: >
> > perl -MPod::POM::Web::Indexer -e 'Pod::POM::Web::Indexer->new- > >index'
> > And all I got were the following 2 lines: > > DIR /util/Local/perl/linux/lib/5.8.8/i686-linux-thread-multi > Use of freed value in iteration at > /util/Local/perl/linux/lib/site_perl/5.8.8/Pod/POM/Web/Indexer.pm
line Show quoted text
> 314.
Hi, thanks for the bug report. From what I understand, there seems to be an aliasing problem with a sorted list of filenames, but nobody met that problem before ... strange ! To help debugging, could you please 1) send me a listing of the directory mentioned in the message. 2) replace line 314 in Indexer.pm as follows : instead of foreach my $file (sort @$files) { next unless $file =~ s/\.(pm|pod)$//; try foreach my $foo (sort @$files) { my $file = $foo; next unless $file =~ s/\.(pm|pod)$//; and see if that solves the bug. Thanks in advance, L. Dami
Subject: Re: [rt.cpan.org #28419] Pod::POM::Web::Indexer not working
Date: Wed, 1 Aug 2007 11:56:09 +0300
To: bug-Pod-POM-Web [...] rt.cpan.org
From: "Offer Kaye" <offer.kaye [...] gmail.com>
On 7/31/07, Laurent Dami via RT <bug-Pod-POM-Web@rt.cpan.org> wrote: Show quoted text
> > Hi, > > thanks for the bug report. From what I understand, there seems to be > an aliasing problem with a sorted list of filenames, but nobody met > that problem before ... strange ! > > To help debugging, could you please > 1) send me a listing of the directory mentioned in the message.
Here it is ('ll' is an alias to '/bin/ls -laFq --color=always'): Show quoted text
> ll /util/Local/perl/linux/lib/5.8.8/i686-linux-thread-multi/
total 1036 drwxr-xr-x 21 oferk users 4096 Apr 5 2006 ./ drwxr-xr-x 43 oferk users 12288 Jul 24 09:12 ../ -rw-r--r-- 1 oferk users 130794 Apr 5 2006 .packlist drwxr-xr-x 2 oferk users 4096 Mar 21 2006 B/ -r--r--r-- 1 oferk users 22770 Mar 21 2006 B.pm -r--r--r-- 1 oferk users 687 Mar 21 2006 ByteLoader.pm drwxr-xr-x 2 oferk users 8192 Mar 21 2006 CORE/ -r--r--r-- 1 oferk users 3097 Apr 5 2006 Config.pm -r--r--r-- 1 oferk users 212630 Mar 21 2006 Config.pod -r--r--r-- 1 oferk users 33471 Apr 5 2006 Config_dynamic.pl -r--r--r-- 1 oferk users 33354 Apr 5 2006 Config_static.pl -r--r--r-- 1 oferk users 18517 Mar 4 2006 Cwd.pm -r--r--r-- 1 oferk users 63389 Mar 21 2006 DB_File.pm drwxr-xr-x 2 oferk users 4096 Mar 21 2006 Data/ drwxr-xr-x 2 oferk users 4096 Mar 21 2006 Devel/ drwxr-xr-x 2 oferk users 4096 Mar 21 2006 Digest/ -r--r--r-- 1 oferk users 28125 Mar 21 2006 DynaLoader.pm drwxr-xr-x 2 oferk users 4096 Mar 21 2006 Encode/ -r--r--r-- 1 oferk users 25497 Mar 21 2006 Encode.pm -r--r--r-- 1 oferk users 7315 Mar 21 2006 Errno.pm -r--r--r-- 1 oferk users 5346 Mar 21 2006 Fcntl.pm drwxr-xr-x 3 oferk users 4096 Apr 5 2006 File/ drwxr-xr-x 3 oferk users 4096 Mar 21 2006 Filter/ drwxr-xr-x 2 oferk users 4096 Mar 21 2006 I18N/ drwxr-xr-x 2 oferk users 4096 Mar 21 2006 IO/ -r--r--r-- 1 oferk users 1401 Mar 21 2006 IO.pm drwxr-xr-x 2 oferk users 4096 Mar 21 2006 IPC/ drwxr-xr-x 2 oferk users 4096 Mar 21 2006 MIME/ -r--r--r-- 1 oferk users 4241 Mar 21 2006 O.pm -r--r--r-- 1 oferk users 15234 Mar 21 2006 Opcode.pm -r--r--r-- 1 oferk users 18905 Mar 21 2006 POSIX.pm -r--r--r-- 1 oferk users 55394 Mar 21 2006 POSIX.pod drwxr-xr-x 2 oferk users 4096 Mar 21 2006 PerlIO/ -r--r--r-- 1 oferk users 2515 Mar 21 2006 SDBM_File.pm -r--r--r-- 1 oferk users 17276 Mar 21 2006 Safe.pm -r--r--r-- 1 oferk users 9843 Mar 21 2006 Socket.pm -r--r--r-- 1 oferk users 36444 Mar 21 2006 Storable.pm drwxr-xr-x 2 oferk users 4096 Mar 21 2006 Sys/ drwxr-xr-x 2 oferk users 4096 Mar 21 2006 Time/ drwxr-xr-x 2 oferk users 4096 Mar 21 2006 Unicode/ drwxr-xr-x 2 oferk users 4096 Mar 21 2006 XS/ -r--r--r-- 1 oferk users 10461 Mar 21 2006 XSLoader.pm -r--r--r-- 1 oferk users 1435 Mar 21 2006 attrs.pm drwxr-xr-x 37 oferk users 4096 Jul 16 19:23 auto/ -r--r--r-- 1 oferk users 18653 Mar 21 2006 encoding.pm -r--r--r-- 1 oferk users 5679 Mar 21 2006 lib.pm -r--r--r-- 1 oferk users 994 Mar 21 2006 ops.pm -rw-r--r-- 1 oferk users 66399 Jul 31 07:32 perllocal.pod -r--r--r-- 1 oferk users 4018 Mar 21 2006 re.pm drwxr-xr-x 2 oferk users 4096 Mar 21 2006 threads/ -r--r--r-- 1 oferk users 15118 Mar 21 2006 threads.pm Show quoted text
> 2) replace line 314 in Indexer.pm as follows : instead of > > foreach my $file (sort @$files) { > next unless $file =~ s/\.(pm|pod)$//; > > try > > foreach my $foo (sort @$files) { > my $file = $foo; > next unless $file =~ s/\.(pm|pod)$//; > > and see if that solves the bug. >
I'm sorry to say it didn't :( some debugging: I changed the code to: print "Just before loop...\n"; foreach my $foo (sort @$files) { my $file = $foo; print "Looking at file '$file'\n"; next unless $file =~ s/\.(pm|pod)$//; $extensions{$file}{$1} = 1; } And I got: Show quoted text
> perl -MPod::POM::Web::Indexer -e "Pod::POM::Web::Indexer->new->index"
DIR /util/Local/perl/linux/lib/5.8.8/i686-linux-thread-multi Just before loop... Use of freed value in iteration at /util/Local/perl/linux/lib/site_perl/5.8.8/Pod/POM/Web/Indexer.pm line 317. So it looks like the print inside the loop isn't even executed once, it's like the $files is problematic... So I added a Dumper statement just before the foreach: use Data::Dumper;print Dumper ($files); And here I got *really* strange ouptut: Show quoted text
> perl -MPod::POM::Web::Indexer -e "Pod::POM::Web::Indexer->new->index"
DIR /util/Local/perl/linux/lib/5.8.8/i686-linux-thread-multi Just before loop... $VAR1 = [ 139285120, '$VAR1', '', undef, undef, undef, undef, 0, 2, '', ' ', '', ' ', ' => ', \$VAR1->[4], [ $VAR1 ], \$VAR1->[3], 'VAR', 0, 0, 0, '', '', 0, 1, 'bless', 0, 0, 0 ]; Bizarre copy of ARRAY in sassign at /util/Local/perl/linux/lib/site_perl/5.8.8/Pod/POM/Web/Indexer.pm line 318. It didn't even give the usual message, it died on the Dumper statement. And I've never seen that message from Dumper - I wonder what "sassign" is... The contents of $files doesn't look like a list of files at all, worse, there is a circular reference inside there ($files->[15] = [$files] ???) Very strange... Cheers, -- Offer Kaye
Well, this looks like the XS code in List::MoreUtils::part is doing weird things. Try reinstall List::MoreUtils. Then run the following script and see what comes out. use strict; use warnings; use List::MoreUtils qw/part/; use Data::Dumper; my $dirname = "/util/Local/perl/linux/lib/5.8.8/i686-linux-thread- multi"; # read directory entries opendir my $dh, $dirname or die $!; my @entries = grep {!/^\./} readdir $dh; print Dumper(\@entries); # partition into subdirs and files my ($dirs, $files) = part { -d $_ ? 0 : 1} @entries; print Dumper($dirs, $files);
Subject: Re: [rt.cpan.org #28419] Pod::POM::Web::Indexer not working
Date: Thu, 2 Aug 2007 14:04:08 +0300
To: bug-Pod-POM-Web [...] rt.cpan.org
From: "Offer Kaye" <offer.kaye [...] gmail.com>
On 8/2/07, Laurent Dami via RT wrote: Show quoted text
> > Well, this looks like the XS code in List::MoreUtils::part is doing > weird things. Try reinstall List::MoreUtils. Then run the following > script and see what comes out. >
That fixed it :) For future reference, I had the 0.19 version of List::MoreUtils installed and the version that I installed now and fixed the problem is 0.21. Thanks for all the help! Best regards, -- Offer Kaye
ticket closed