This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 1297557 - rpmdeps is recursively called infinitely when using external dependency generator
rpmdeps is recursively called infinitely when using external dependency gener...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
23
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-11 15:53 EST by Helmut Schlattl
Modified: 2016-01-31 21:20 EST (History)
6 users (show)

See Also:
Fixed In Version: rpm-4.13.0-0.rc1.10.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-31 21:20:52 EST
Type: Bug
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 Helmut Schlattl 2016-01-11 15:53:03 EST
Description of problem:
When using the external dependency generator (%_use_internal_dependency_generator 0), then rpmdeps is stuck in a infinite recursive loop.

Version-Release number of selected component (if applicable):
rpm-4.13.0-0.rc1.7.fc23

How reproducible:
Always

Steps to Reproduce:
1. Set %_use_internal_dependency_generator 0 in .rpmmacros.
2. perform rpmbuild on any package, e.g., rpmbuild --rebuild 
3.

Actual results:
The build process stops with
Finding  Provides: /usr/lib/rpm/find-provides
/usr/lib/rpm/find-provides: fork: retry: No child processes
/usr/lib/rpm/find-provides: fork: retry: No child processes
/usr/lib/rpm/find-provides: fork: retry: No child processes
/usr/lib/rpm/find-provides: fork: retry: No child processes
/usr/lib/rpm/find-provides: fork: Resource temporarily unavailable
error: /usr/lib/rpm/find-provides failed: fe00
error: Failed to find Provides:
error: /usr/lib/rpm/find-provides failed: 100

The last two messages are repeated very often, then:

Provides: zlib = 1.2.8-9.1.fc23 zlib(x86-64) = 1.2.8-9.1.fc23
Requires(interp): /sbin/ldconfig /sbin/ldconfig
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig


RPM build errors:
    bogus date in %changelog: Tue Feb 21 2007 Adam Tkac <atkac redhat com> - 1.2.3-8
    /usr/lib/rpm/find-provides failed: 100
    Failed to find Provides:



Expected results:
Clear build

Additional info:
The external dependency generator is defined in the macro '__find_provides', which per default is '/usr/lib/rpm/find-provides'. /usr/lib/rpm/find-provides is a script calling /usr/lib/rpm/rpmdeps. 

The routine "rpmfcApplyExternal" in build/rpmfc.c (part of rpmdeps) is parsing depMsgs, causing the macro '__find_provides' to be expanded and executed, i.e., starting again rpmdeps and so on.
Comment 2 Panu Matilainen 2016-01-18 03:16:50 EST
(In reply to Helmut Schlattl from comment #0)
> Description of problem:
> When using the external dependency generator
> (%_use_internal_dependency_generator 0), then rpmdeps is stuck in a infinite
> recursive loop.
> 
> Version-Release number of selected component (if applicable):
> rpm-4.13.0-0.rc1.7.fc23
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> 1. Set %_use_internal_dependency_generator 0 in .rpmmacros.

You really, really should not be doing that.

The old external dependency generator exists only for backwards compatibility with specs from older distros that rely on external depgen specifics (eg for filtering and custom deps). It should not be used for new packages, and certainly not as a global default.

Perhaps a deprecation warning should finally be added to external depgen usage.
Comment 3 Helmut Schlattl 2016-01-18 13:32:18 EST
(In reply to Ľuboš Kardoš from comment #1)
> Fixed upstream:
> 
> https://github.com/rpm-software-management/rpm/commit/
> 33158b3b009e830036d05c138a6b308c1574effe

Thanks a lot. Sometimes it's easier than anticipated.
Comment 4 Helmut Schlattl 2016-01-18 13:42:49 EST
(In reply to Panu Matilainen from comment #2)

> > Steps to Reproduce:
> > 1. Set %_use_internal_dependency_generator 0 in .rpmmacros.
> 
> You really, really should not be doing that.
> 
> The old external dependency generator exists only for backwards
> compatibility with specs from older distros that rely on external depgen
> specifics (eg for filtering and custom deps). It should not be used for new
> packages, and certainly not as a global default.
> 
> Perhaps a deprecation warning should finally be added to external depgen
> usage.

It's a pity, if this option would be discarded, just because it is not required for the standard distro.

I a trying to set up a cross compile toolchain using rpm, and for this I found the external dependency generator convenient, since the script can be modified, e.g., to add the target architecture to the dependencies found by rpmdeps.
Comment 5 Panu Matilainen 2016-01-19 02:10:07 EST
The internal generator is fully customizable too these days (see http://rpm.org/wiki/PackagerDocs/DependencyGenerator) and that's what eg the mingw cross-compilation environment in Fedora uses for its dependendencies. Just FWIW.
Comment 6 Fedora Update System 2016-01-29 11:43:08 EST
rpm-4.13.0-0.rc1.10.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8caca0b06d
Comment 7 Fedora Update System 2016-01-30 14:55:29 EST
rpm-4.13.0-0.rc1.10.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8caca0b06d
Comment 8 Fedora Update System 2016-01-31 21:20:44 EST
rpm-4.13.0-0.rc1.10.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

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