Bug 461352 - Infinite loop with "package file" manifests
Infinite loop with "package file" manifests
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-06 07:53 EDT by Ville Skyttä
Modified: 2015-05-26 10:29 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-05-26 10:29:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ville Skyttä 2008-09-06 07:53:26 EDT
$ echo foo > foo
$ rpm -qlp foo

The above causes an apparently infinite loop in rpmq, with no output.

$ echo "bar foo" > foo
$ rpm -qlp foo
error: open of bar failed: No such file or directory
error: open of bar failed: No such file or directory
error: open of bar failed: No such file or directory
[...]

Another infinite loop, this time with output.

I'd expect rpm to detect the loops and break out of them, outputting an error message.
Comment 1 Jeff Johnson 2008-09-06 16:22:00 EDT
Yes, a file that contains its own name will loop forever.

Hint: for extra credit, try the doubly recursive variant
    echo "pong" > ping
    echo "ping" > pong
   rpm -qlp ping

I'm sure you can devise the N+1 failures by induction.
Comment 2 Jeff Johnson 2008-09-06 18:52:43 EDT
Perhaps a progress bar reminescent of the ancient arcade game pong would suffice
to give the user feed back while waiting for memory to be exhausted by rpm. Nah,
that only works with the doubly recursive variant failure mode, and the wit is likely
wasted.
Comment 3 Jeff Johnson 2008-09-06 19:12:37 EDT
And lets not firget this type of recursion either. I too would expect
error messages that are simple, direct, and translated to my specific
locale in every failure instance, including this one:

[jbj@wellfleet rpm]$ cat /etc/rpm/macros.loop
%bing %{bang}
%bang %{boom}
%boom %{bing}

[jbj@wellfleet rpm]$ rpm -qp '%bing'
error: Recursion depth(17) greater than max(16)
 15<                               (empty)
 14<                             (empty)
 13<                           (empty)
 12<                         (empty)
 11<                       (empty)
 10<                     (empty)
  9<                   (empty)
  8<                 (empty)
  7<               (empty)
  6<             (empty)
  5<           (empty)
  4<         (empty)
  3<       (empty)
  2<     (empty)
  1<   (empty)
  0< (empty)
*** Fstrerror((nil))
error: open of  failed: No such file or directory
[jbj@wellfleet rpm]$ rpm --version
rpm (RPM) 5.1.DEVEL

Is that expecting too much? I think not ...
Comment 4 Jeff Johnson 2008-09-06 19:21:12 EDT
Then there are the other variant failures. Note two error messages, that is so so wrong:

jbj@wellfleet wdj51]$ ln -s foo bar
[jbj@wellfleet wdj51]$ ln -s bar foo
[jbj@wellfleet wdj51]$ rpm -qp foo
error: open of foo failed: Too many levels of symbolic links
error: open of foo failed: Too many levels of symbolic links

Shall we move along to named pipes and fifos misbehavior with rpm -qp?
Comment 5 Jeff Johnson 2008-09-06 19:29:46 EDT
And then there is
    [jbj@wellfleet wdj51]$ echo "foo*" > foo
    [jbj@wellfleet wdj51]$ rpm -qp foo
    ^C
that needs to be handled with simple concise error messages.

Don't you hate infinite recursions? I do ...
Comment 6 Bug Zapper 2009-06-09 22:38:14 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Bug Zapper 2010-04-27 08:13:53 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Bug Zapper 2011-06-02 14:27:34 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Fedora End Of Life 2012-08-06 16:03:49 EDT
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Fedora End Of Life 2012-08-06 16:03:50 EDT
This message is a notice that Fedora 15 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 15. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 15 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 11 Fedora End Of Life 2013-07-04 02:43:33 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 12 Panu Matilainen 2013-07-04 02:58:57 EDT
Moving to rawhide to avoid timeouting.
Comment 13 Ľuboš Kardoš 2015-05-26 10:29:38 EDT
Fixed upstream b2bde386f609145f14fe9c98bba67b9db6e2b4ff.

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