Skip Menu |

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

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

People
Owner: MARCB [...] cpan.org
Requestors: rmurri [...] cscs.ch
Cc:
AdminCc:

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



Subject: CPAN install of Unix::Lsof 0.0.5 fails
Date: Wed, 18 Feb 2009 14:19:05 +0100
To: bug-Unix-Lsof [...] rt.cpan.org
From: Riccardo Murri <rmurri [...] cscs.ch>
On a CentOS5.2 (perl 5.8.8, lsof 4.78), installation fails:: # cpan -i Unix::Lsof CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Tue, 17 Feb 2009 17:26:55 GMT Running install for module Unix::Lsof Running make for M/MA/MARCB/Unix-Lsof/Unix-Lsof-v0.0.5.tar.gz CPAN: Digest::MD5 loaded ok CPAN: Compress::Zlib loaded ok Checksum for /root/.cpan/sources/authors/id/M/MA/MARCB/Unix-Lsof/Unix-Lsof-v0.0.5.tar.gz ok Scanning cache /root/.cpan/build for sizes Unix-Lsof-v0.0.5/ Unix-Lsof-v0.0.5/Makefile.PL Unix-Lsof-v0.0.5/MANIFEST Unix-Lsof-v0.0.5/Changes Unix-Lsof-v0.0.5/t/ Unix-Lsof-v0.0.5/t/20.lsof-result.t Unix-Lsof-v0.0.5/t/10.procedural.t Unix-Lsof-v0.0.5/t/pod-coverage.t Unix-Lsof-v0.0.5/t/pod.t Unix-Lsof-v0.0.5/README Unix-Lsof-v0.0.5/META.yml Unix-Lsof-v0.0.5/Build.PL Unix-Lsof-v0.0.5/lib/ Unix-Lsof-v0.0.5/lib/Unix/ Unix-Lsof-v0.0.5/lib/Unix/Lsof.pm Unix-Lsof-v0.0.5/lib/Unix/Lsof/ Unix-Lsof-v0.0.5/lib/Unix/Lsof/Result.pm Removing previously used /root/.cpan/build/Unix-Lsof-v0.0.5 CPAN.pm: Going to build M/MA/MARCB/Unix-Lsof/Unix-Lsof-v0.0.5.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Unix::Lsof cp lib/Unix/Lsof/Result.pm blib/lib/Unix/Lsof/Result.pm cp lib/Unix/Lsof.pm blib/lib/Unix/Lsof.pm Manifying blib/man3/Unix::Lsof::Result.3pm Manifying blib/man3/Unix::Lsof.3pm /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/10.procedural.....ok 1/19Use of uninitialized value in hash element at /root/.cpan/build/Unix-Lsof-v0.0.5/blib/lib/Unix/Lsof.pm line 208. Can't parse line g8186R8239cperlu0Lroot # Looks like you planned 19 tests but only ran 13. # Looks like your test died just after 13. t/10.procedural.....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 14-19 Failed 6/19 tests, 68.42% okay (less 9 skipped tests: 4 okay, 21.05%) t/20.lsof-result....ok 9/62Use of uninitialized value in hash element at /root/.cpan/build/Unix-Lsof-v0.0.5/blib/lib/Unix/Lsof.pm line 208. Can't parse line g8186R8239cperlu0Lroot # Looks like you planned 62 tests but only ran 11. # Looks like your test died just after 11. t/20.lsof-result....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 12-62 Failed 51/62 tests, 17.74% okay t/pod-coverage......skipped all skipped: Test::Pod::Coverage 1.04 required for testing POD coverage t/pod...............skipped all skipped: Test::Pod 1.14 required for testing POD Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/10.procedural.t 255 65280 19 12 63.16% 14-19 t/20.lsof-result.t 255 65280 62 102 164.52% 12-62 2 tests and 9 subtests skipped. Failed 2/4 test scripts, 50.00% okay. 57/81 subtests failed, 29.63% okay. make: *** [test_dynamic] Error 255 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force Using stock Perl 5.8.8: # perl -v This is perl, v5.8.8 built for i386-linux-thread-multi # 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. -- Riccardo Murri CSCS - Swiss National Centre for Supercomputing Galleria 2, via Cantonale CH-6928 Manno (Switzerland) tel.: +41 91 610 8234 Fax: +41 91 610 8282
Hi Riccardo, thank you for reporting this bug. This seems to be the same as http://rt.cpan.org/Ticket/Display.html?id=41016 , the lsof output contains a line starting with the letter "g" (instead of "p" and "f", which, according to the lsof man page, are the only valid letters to start such a line). I can't replicate this behaviour in my tests, but from comparing the output for these two bugs I get the suspicion that this is a bug of lsof in conjunction with an old version of RedHats SELinux. To help me find the cause of this, could you unpack the Unix::Lsof distribution (i.e. "tar -xzf Unix-Lsof-v0.0.5.tar.gz"), cd into that directory, then change line 176 of Unix/Lsof.pm from _idie("Can't parse line $line"); to _iwarn("Can't parse line $line"); And add use Data::Dumper; diag Dumper $lrs; on line 66 of t/20.lsof-result.t If you could then rerun the test (either "make test" or "prove -vl t/" would work) and send me the output of that I may have a clue what is going on. Another thing that would help greatly is if you could rerun the tests with a newer version of lsof (4.81 is the latest, available from ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof , but 4.79 apparently already contained some SELinux fixes and may solve the issue). Thanks again, Marc

Message body is not shown because it is too large.

Hi Riccardo, thank you _very much_ for your mail, the information you sent helped greatly. Apparently the problem is that an error message (after a call by lsof to getpidcon()) returns a NL character at the end, and this causes the rest of the process set output to be returned in a new line (which makes it appear to be a new set). I'm not 100% certain whether the fault lies with getpidcon or lsof here, but will report it upstream to the lsof author. Anyway, I think I've worked around it successfully in the newly released version 0.0.6 of Unix::Lsof, so please try out that version. Cheers, Marc
Subject: Re: [rt.cpan.org #43394] CPAN install of Unix::Lsof 0.0.5 fails
Date: Wed, 25 Mar 2009 15:07:42 +0100
To: MARCB via RT <bug-Unix-Lsof [...] rt.cpan.org>
From: Riccardo Murri <rmurri [...] cscs.ch>
Hi Marc, MARCB via RT wrote: Show quoted text
> Anyway, I think I've worked around it successfully in the newly > released version 0.0.6 of Unix::Lsof, so please try out that version. >
unfortunately, 0.0.6 is still failing:: [root@localhost tmp]# tar -xzf Unix-Lsof-0.0.6.tar.gz [root@localhost tmp]# cd Unix-Lsof-0.0.6 [root@localhost Unix-Lsof-0.0.6]# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Unix::Lsof [root@localhost Unix-Lsof-0.0.6]# make cp lib/Unix/Lsof/Result.pm blib/lib/Unix/Lsof/Result.pm cp lib/Unix/Lsof.pm blib/lib/Unix/Lsof.pm Manifying blib/man3/Unix::Lsof::Result.3pm Manifying blib/man3/Unix::Lsof.3pm [root@localhost Unix-Lsof-0.0.6]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/10.procedural...........ok 1/19Can't parse line g21900R21907cperlu0Lroot # Looks like you planned 19 tests but only ran 13. # Looks like your test died just after 13. t/10.procedural...........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 14-19 Failed 6/19 tests, 68.42% okay (less 9 skipped tests: 4 okay, 21.05%) t/20.lsof-result..........ok 10/62Can't parse line g21900R21907cperlu0Lroot # Looks like you planned 62 tests but only ran 11. # Looks like your test died just after 11. t/20.lsof-result..........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 12-62 Failed 51/62 tests, 17.74% okay t/30.parse_lsof_output....ok 5/8 skipped: various reasons t/pod-coverage............skipped all skipped: Test::Pod::Coverage 1.04 required for testing POD coverage t/pod.....................skipped all skipped: Test::Pod 1.14 required for testing POD Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/10.procedural.t 255 65280 19 12 63.16% 14-19 t/20.lsof-result.t 255 65280 62 102 164.52% 12-62 2 tests and 14 subtests skipped. Failed 2/5 test scripts, 60.00% okay. 57/89 subtests failed, 35.96% okay. make: *** [test_dynamic] Error 255 Thanks for your help, Riccardo -- Riccardo Murri CSCS - Swiss National Centre for Supercomputing Galleria 2, via Cantonale CH-6928 Manno (Switzerland) tel.: +41 91 610 8234 Fax: +41 91 610 8282