Bug 1781360
Summary: | dnf.Base.close() does not close hawkey.log filedescriptor | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Mike McLean <mikem> |
Component: | dnf | Assignee: | Marek Blaha <mblaha> |
Status: | CLOSED ERRATA | QA Contact: | Radek Bíba <rbiba> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.4 | CC: | extras-qa, james.antill, jmracek, jrohel, mblaha, orion, packaging-team-maint, rpm-software-management, vmukhame |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | 8.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libdnf-0.39.1-2.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1594016 | Environment: | |
Last Closed: | 2020-04-28 16:49:06 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: | |||
Bug Depends On: | 1594016, 1781364 | ||
Bug Blocks: |
Description
Mike McLean
2019-12-09 21:00:36 UTC
The bug with leaking file descriptor has been fixed in upstream by following pull requests: https://github.com/rpm-software-management/libdnf/pull/792 https://github.com/rpm-software-management/libdnf/pull/809 There is still one problem with the reproducer. The base.close() method is not designed to be called multiple times. You should use `reset()` method instead: #!/usr/bin/python3 import dnf import psutil proc = psutil.Process() base = dnf.Base() base.conf.assumeyes = True base.conf.read() for i in [1, 2, 3]: base.fill_sack(load_system_repo='auto') base.reset(sack=True, repos=True, goal=True) print(proc.open_files()) base.close() 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, 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-2020:1823 |