RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1020013 - External processes leak file descriptors
Summary: External processes leak file descriptors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-blivet
Version: 7.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: David Lehman
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On: 1016467
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-16 19:05 UTC by David Lehman
Modified: 2021-09-03 14:11 UTC (History)
7 users (show)

Fixed In Version: python-blivet-0.18.7-1
Doc Type: Bug Fix
Doc Text:
Clone Of: 1016467
Environment:
Last Closed: 2014-06-13 09:50:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David Lehman 2013-10-16 19:05:39 UTC
+++ This bug was initially created as a clone of Bug #1016467 +++

Description of problem:
When working with lvm from blivet, I keep seeing messages like this in the log:

"
  INFO:program: Running... lvm pvs --unit=k --nosuffix --nameprefixes --rows --unquoted --noheadings -opv_uuid,pe_start,vg_name,vg_uuid,vg_size,vg_free,vg_extent_size,vg_extent_count,vg_free_count,pv_count --config global {locking_type=4}  /dev/vda4
  INFO:program: File descriptor 8 (/dev/mapper/control) leaked on lvm invocation. Parent PID 19615: python
"

Those may not be a problem, but they are a real problem if blivet tries to parse the output of an external program and instead of the real output, it gets something like "File descriptor 8 (/dev/mapper/control) leaked on lvm invocation. Parent PID 19976: python".


Version-Release number of selected component (if applicable):
python-blivet-0.22-1.fc21.noarch


How reproducible:
Always


Steps to Reproduce:
1. run blivet so it executes thinlvpoolname() in devicelibs/lvm.py
2. observe the output returned by the function


Actual results:
Output contains "File descriptor 8 (/dev/mapper/control) leaked on lvm invocation..." message and not the real output.


Expected results:
Output contains the name of the thin pool name as expected.


Additional info:

--- Additional comment from Jan Synacek on 2013-10-08 04:43:03 EDT ---



--- Additional comment from Jan Safranek on 2013-10-08 04:49:32 EDT ---

Note that leaked file descriptors produce also several AVCs, like mdadm accessing /dev/mapper/control.

Comment 1 David Lehman 2013-10-16 19:06:56 UTC
I have a patch for this.

Comment 3 Jan Stodola 2014-04-08 11:23:06 UTC
Reproduced with python-blivet-0.18.2-1.el7:

>>> blivet.devicelibs.lvm.thinlvpoolname("vgtest", "thin_pool")
'File descriptor 8 (/dev/mapper/control) leaked on lvm invocation. Parent PID 975: python'
>>>

Verified with python-blivet-0.18.34-1.el7:
>>> blivet.devicelibs.lvm.thinlvpoolname("vgtest", "thin_pool")
''
>>>

Moving to VERIFIED.

Comment 4 Ludek Smid 2014-06-13 09:50:36 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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