Bug 2087999

Summary: Backport fix for leaks of libsolv's page file descriptors in Base object
Product: Red Hat Enterprise Linux 9 Reporter: Neal Gompa <ngompa13>
Component: dnfAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: davdunc, davide, dbrandon.johnson, dbrandon, dowdle, james.antill, lersek, michel, pablo, rjones, roger.sewell, swm-qe
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.12.0-2.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 2087734 Environment:
Last Closed: 2022-11-15 11:15:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Neal Gompa 2022-05-18 15:46:07 UTC
+++ This bug was initially created as a clone of Bug #2087734 +++

Description of problem:
Image build tools that use the DNF Python API directly have issues completing successfully right now because the Base object leaks page file descriptors, which locks up all the mounts and prevents successful filesystem unmounting to save the final disk.

This was fixed upstream as https://github.com/rpm-software-management/dnf/commit/5ce5ed1ea08ad6e198c1c1642c4d9ea2db6eab86

Please backport this so that this problem is fixed.

Version-Release number of selected component (if applicable):
4.10.0-5.el9_0

Additional info:
This was reported to livecd-tools here: https://github.com/livecd-tools/livecd-tools/issues/232

Comment 1 Richard W.M. Jones 2022-05-18 16:08:31 UTC
I can do dev work here, but someone on the packaging team will need to do QE.
Obviously dnf is quite an important package so we can't leave it to chance.
Very low risk of regressions as far as we know.

Comment 3 Richard W.M. Jones 2022-05-23 13:12:42 UTC
Yeah that'll be fine.  It's more important that we don't break dnf than
that we prove that livecd-tools is fixed :-)

Comment 4 Richard W.M. Jones 2022-05-23 17:42:05 UTC
The baseos-ci.brew-build.ci-dnf-stack-gating.functional test failed with:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test plugins-core/modulesync.feature
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 17:09:42 ] :: [   FAIL   ] :: Command './container-test  run --container-arg='--security-opt' --container-arg='seccomp=unconfined' plugins-core/modulesync.feature' (Expected 0, got 1)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 3s
::   Assertions: 0 good, 1 bad
::   RESULT: FAIL (Test plugins-core/modulesync.feature)

whatever that means.  I can't believe it would be caused by this change.
Also I don't know where these tests are located.

Comment 5 Neal Gompa 2022-05-23 23:05:15 UTC
I believe the tests come from here: https://github.com/rpm-software-management/ci-dnf-stack

Comment 6 Richard W.M. Jones 2022-05-24 09:47:01 UTC
I ran the test 3 times and it failed each time.  It did not fail
on the previous build of this package in RHEL 9.  I don't have a
theory as to why this particular patch could cause a failure in
this particular test.  (The failure might also be caused by environment
changes, so this patch might not be the cause.)

Needs someone who is more familiar with the tests to look at this.

At the moment I don't want to waive this test, given such an important
RHEL package.

Comment 7 Richard W.M. Jones 2022-05-24 09:47:36 UTC
OSCI tests are here FYI:
https://dashboard.osci.redhat.com/#/artifact/brew-build/aid/45482603

Comment 14 Pablo Greco 2022-05-30 17:36:11 UTC
Any chance of this being backported into 9.0? it's creating problems for users trying to generate images

Comment 15 Richard W.M. Jones 2022-05-30 20:01:45 UTC
I set zstream=? flag which should cause this bug to be evaluated for
9.0.z, but for some reason it's being ignored.

Comment 17 errata-xmlrpc 2022-11-15 11:15:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (dnf bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8297