Skip Menu |
 

This queue is for tickets about the Unix-Lsof CPAN distribution.

Report information
The Basics
Id: 41016
Status: resolved
Priority: 0/
Queue: Unix-Lsof

People
Owner: Nobody in particular
Requestors: nwetters [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: v0.0.5
Fixed in: 0.0.6



Subject: Unix::Lsof dies on open files
Download (untitled) / with headers
text/plain 1.7k
Dies on open files. Use of uninitialized value in hash element at /usr/lib/perl5/site_perl/5.8.8/Unix/Lsof.pm line 208. Can't parse line g17739R17457ctailu2525Lngourlay Version info follows: [ngourlay@doha-daily ~]$ perl -v This is perl, v5.8.8 built for i386-linux-thread-multi Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. [ngourlay@doha-daily ~]$ perl -MUnix::Lsof -e 'print "$Unix::Lsof::VERSION\n"' 0.0.5 [ngourlay@doha-daily ~]$ lsof -v lsof version information: revision: 4.78 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man constructed: Tue Jan 9 15:54:39 EST 2007 constructed by and on: mockbuild@builder5.centos.org compiler: cc compiler version: 4.1.1 20061011 (Red Hat 4.1.1-30) compiler flags: -DLINUXV=26016 -DGLIBCV=205 -DHASIPv6 -DHASSELINUX -D_FILE_OFFSET_BITS=64 -DLSOF_VSTR="2.6.16" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables loader flags: -L./lib -llsof -lselinux system info: Linux builder5.centos.org 2.6.9-42.0.3.ELsmp #1 SMP Fri Oct 6 06:28:26 CDT 2006 i686 i686 i386 GNU/Linux Anyone can list all files. /dev warnings are disabled. Kernel ID check is disabled. [ngourlay@doha-daily ~]$
Download (untitled) / with headers
text/plain 801b
Hi Nigel, thanks a lot for the report. I don't think it really dies (the "uninitialized" error is merely a warning), but it can't parse the line obtained from lsof. And that line looks strange to me, because it begins with the letter "g", whereas according to the lsof man page all lines should begin either with a "p" or an "f". Could you do the following to help me fix it: 1.) Run the lsof command from the command line with the options that you used with Unix::Lsof, and send me the output. 2.) Run the command again, but also specify the option -F0gRcuL and send me the output. 3.) Call Unix::Lsof in your perl script in scalar mode and send me the Data::Dumper output of the result object. e.g. use Unix::Lsof; use Data::Dumper; my $r=lsof(<your options>); print Dumper $r; Cheers, Marc
Download (untitled) / with headers
text/plain 296b
Hi Nigel, umm, sorry, what I said in my last email was wrong, of course it dies (too decaffeinated to read my own code just now;-). So 3. won't work, unless you change line 176 of Unix/Lsof.pm from _idie("Can't parse line $line"); to _iwarn("Can't parse line $line"); first. Cheers, Marc
Download (untitled) / with headers
text/plain 115b
Hi, this bug should now be fixed, please also see https://rt.cpan.org/Ticket/Display.html?id=43394 Cheers, Marc


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.