Bug 206383 - rpmlint hangs on installed file paths containing whitespace
rpmlint hangs on installed file paths containing whitespace
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpmlint (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-13 20:03 EDT by Christopher Stone
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version: 0.78-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-24 12:16:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Christopher Stone 2006-09-13 20:03:42 EDT
Description of problem:
rpmlint hangs

Version-Release number of selected component (if applicable):
rpmlint-0.77-1.fc5

How reproducible:
rpmlint manaworld-music


Steps to Reproduce:
1. rpm -ivh manaworld-music
2. rpmlint manaworld-music
  
Actual results:
rpmlint hangs indefinately


Expected results:
rpmlint doesn't hang

Additional info:
Pressing ctrl-C gives:
Traceback (most recent call last):
  File "/usr/share/rpmlint/rpmlint.py", line 260, in ?
    main()
  File "/usr/share/rpmlint/rpmlint.py", line 85, in main
    runChecks(pkg)
  File "/usr/share/rpmlint/rpmlint.py", line 141, in runChecks
    c.check(pkg)
  File "/usr/share/rpmlint/BinariesCheck.py", line 128, in check
    info=pkg.getFilesInfo()
  File "/usr/share/rpmlint/Pkg.py", line 452, in getFilesInfo
    lines=commands.getoutput(cmd)
  File "/usr/lib64/python2.4/commands.py", line 44, in getoutput
    return getstatusoutput(cmd)[1]
  File "/usr/lib64/python2.4/commands.py", line 54, in getstatusoutput
    text = pipe.read()
KeyboardInterrupt
Comment 1 Wart 2006-09-13 23:13:13 EDT
This seems to be happening on a file with spaces in the name.  Here is the
output from strace.  Note that the complaint about the missing file is happening
on a file with spaces in the name:  "Magik - Casino.ogg"

27863 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
27863 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aaaaabba000
27863 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x2aaaaabbb000
27863 lstat("/usr/share/tmw/data/music/Magick", 0x7fff9fe12a80) = -1 ENOENT (No
such file or directory)
27863 munmap(0x2aaaaabbb000, 266240)    = 0
27863 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x2aaaaabbb000
27863 read(0,
Comment 2 Wart 2006-09-13 23:20:11 EDT
This indeed seems to be a bug in rpmlint when dealing with spaces in filenames.
 I just rebuilt the offending package and replaced the spaces with underscores
in the filenames, and rpmlint ran fine without hanging.
Comment 3 Parag AN(पराग) 2006-09-13 23:36:05 EDT
I reviewed this package and already posted that rpmlint is clean. After seeing
this bug i recheck rpmlint output on both SRPM and RPM and its working fine
absolutely.

Remember this is not special case for manaworld-music. I happened to review a
lot package and i also faced similar problem with rpmlint. i don'r remember
exaclty for which package review but i tried 3 times but still rpmlint was
hanging on SRPMs and RPMs. do the only solution i end up is to restart my system
and then run rpmlint command and it worked fine. After that i have not faced
such problem with rpmlint.

So For me its not a new thing that rpmlint hangs. But yes if we want it to stop
doing that then we need to really check whats happening at the time when user
issued rpmlint and it got hanged. We need to find what user had done previously
before issuing rpmlint command.
Comment 4 Wart 2006-09-13 23:41:29 EDT
I should also note that this problem only appears for me when I run rpmlint on
the installed package.  If rpmlint is run on the rpm file itself, it does not
hang.  This has been 100% reproducible in my tests.
Comment 5 Parag AN(पराग) 2006-09-13 23:52:05 EDT
Wart,
   Can you tell me how can i reproduce your problem? I mean what steps i should
follow? I need to know how can i run rpmlint on installed binary rpm?
Comment 6 Wart 2006-09-13 23:58:25 EDT
(In reply to comment #5)
> Wart,
>    Can you tell me how can i reproduce your problem? I mean what steps i should
> follow? I need to know how can i run rpmlint on installed binary rpm?

After building the RPM for manaworld-music, install it and run rpmlint on the
installed package:

# rpmbuild --rebuild SRPMS/manaworld-music-0.0.20-1.src.rpm
# rpm -ivh RPMS/noarch/manaworld-music-0.0.20-1.noarch.rpm
# rpmlint RPMS/noarch/manaworld-music-0.0.20-1.noarch.rpm
(rpmlint does not hang)
# rpmlint manaworld-music
(rpmlint hangs)
# strace -f -o trace.out rpmlint manaworld-music
(look at trace.out to see where rpmlint hangs)

When you pass the name of a package to rpmlint, instead of the path to a rpm
file, it will run on the files from the installed package.  This will
occasionally expose some problems that don't appear when running rpmlint on the
rpm file alone.
Comment 7 Parag AN(पराग) 2006-09-14 00:11:20 EDT
Ok, you are right. This is problem because of files being installed from RPM
containing spaces in their names.

when i toll trace of rpmlint on manaworld-music i got
3747  execve("/usr/bin/file", ["file", "/usr/share/tmw/data/music/Magick"...,
"-", "Real.ogg", "/usr/share/tmw/data/music/Faith."...,
"/usr/share/tmw/data/music/Magick"..., "-", "Small", "grass.ogg",
"/usr/share/tmw/data/music/Magick"..., "-", "Snow.ogg",
"/usr/share/tmw/data/music/Magick"..., "-", "Casino.ogg",
"/usr/share/tmw/data/music/finalm"..., ...], [/* 43 vars */]) = 0  

AND

Failing statement is 
3747  lstat64("/usr/share/tmw/data/music/Magick", 0xbfa40e8c) = -1 ENOENT (No
such file or directory)

Comment 8 Ville Skyttä 2006-09-14 18:23:23 EDT
Thanks for the report, fixed upstream, will be in the next rpmlint release
really soon now: http://rpmlint.zarb.org/cgi-bin/trac.cgi/changeset/1275

I don't think this bug should block acceptance of manaworld-music (bug 206222
for later reference), removing the blocker.
Comment 9 Ville Skyttä 2006-09-24 12:16:21 EDT
Fixed in 0.78-1.

Note You need to log in before you can comment on or make changes to this bug.