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 1731117 - podman exec leaks an exec_pid_<hash> file for every exec in tmpfs
Summary: podman exec leaks an exec_pid_<hash> file for every exec in tmpfs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 8.1
Assignee: Matthew Heon
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1186913 1727325 1731268 1731270 1734574
TreeView+ depends on / blocked
 
Reported: 2019-07-18 10:53 UTC by Michele Baldessari
Modified: 2020-10-29 04:43 UTC (History)
14 users (show)

Fixed In Version: podman-1.4.2-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1731268 1731270 (view as bug list)
Environment:
Last Closed: 2019-11-05 21:02:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fix for podman exec memleak (1.14 KB, patch)
2019-07-18 11:19 UTC, Andrea Arcangeli
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github containers libpod pull 3595 0 'None' closed Remove exec PID files after use to prevent memory leaks 2020-11-27 15:56:30 UTC
Red Hat Product Errata RHSA-2019:3403 0 None None None 2019-11-05 21:03:41 UTC

Description Michele Baldessari 2019-07-18 10:53:20 UTC
Description of problem:
This is the cousin of https://bugzilla.redhat.com/show_bug.cgi?id=1730281

In short for every podman exec we create a file in tmpfs which will then occupy slab then can never be fred:
[root@rhel8newkernelnoselinux rhel8podmanexec]# podman exec flamboyant_roentgen /bin/true
[root@rhel8newkernelnoselinux rhel8podmanexec]# podman exec flamboyant_roentgen /bin/true
[root@rhel8newkernelnoselinux rhel8podmanexec]# podman exec flamboyant_roentgen /bin/true
[root@rhel8newkernelnoselinux rhel8podmanexec]# find /run/containers/storage -type f -iname 'exec_pid_*'
/run/containers/storage/overlay-containers/b6ad46a7e946e4dce574b4c638632bab14ecad91f6d97b30f7503a51763308c8/userdata/exec_pid_c0a6cc05cdca622169d43f9becaf9ebd7ef912c567a5afb7b65902e6c1977c9c
/run/containers/storage/overlay-containers/b6ad46a7e946e4dce574b4c638632bab14ecad91f6d97b30f7503a51763308c8/userdata/exec_pid_e306a2dd784a663e04ad850247bd4b7fe8f91d074458d785619ebc62de345c7f
/run/containers/storage/overlay-containers/b6ad46a7e946e4dce574b4c638632bab14ecad91f6d97b30f7503a51763308c8/userdata/exec_pid_1b3a8510bcda74f39131e01998a75394aaa2200231fc066397e945de8db1b8da

This likely represents the largest chunk of the leak as observed in https://bugzilla.redhat.com/show_bug.cgi?id=1699202

Seen this with podman podman-1.0.2-1.git4426985.module+el8.0.0.z+3525+56c076c3.x86_64 but also with podman 1.4.5-dev with the staticdir return code for the podman create tmpfs leak.

Comment 1 Andrea Arcangeli 2019-07-18 11:19:44 UTC
Created attachment 1591744 [details]
fix for podman exec memleak

Comment 14 Alex Jia 2019-09-27 12:33:44 UTC
I can reproduce this issue in podman-1.0.2-1.git4426985.module+el8.0.0.z+3525+56c076c3.x86_64,
and verified in podman-1.4.2-5.module+el8.1.0+4240+893c1ab8.x86_64.

[root@kvm-06-guest17 ~]# rpm -q podman 
podman-1.0.2-1.git4426985.module+el8.0.0.z+3525+56c076c3.x86_64

[root@kvm-06-guest17 ~]# podman exec youthful_wilson /bin/true
[root@kvm-06-guest17 ~]# podman exec youthful_wilson /bin/true
[root@kvm-06-guest17 ~]# podman exec youthful_wilson /bin/true
[root@kvm-06-guest17 ~]# find /run/containers/storage -type f -iname 'exec_pid_*'
/run/containers/storage/overlay-containers/2765a2e6a96075a6339ba47faf1b5bda76306e33d318b5304e7fa747165132da/userdata/exec_pid_f42eae430ab74ece31888abb0019db85a90ae5b822ab8aa2bc5f59095002c84d
/run/containers/storage/overlay-containers/2765a2e6a96075a6339ba47faf1b5bda76306e33d318b5304e7fa747165132da/userdata/exec_pid_82967412a5d4ac07e49cd160f6dba1bd372d998c67246893addff4b67361f77d
/run/containers/storage/overlay-containers/2765a2e6a96075a6339ba47faf1b5bda76306e33d318b5304e7fa747165132da/userdata/exec_pid_e3970a4f8732fc5405f68454625a2a6bf8aab5acc919ff35bba1f8b7c9294293

[root@kvm-06-guest17 ~]# rpm -q podman
podman-1.4.2-5.module+el8.1.0+4240+893c1ab8.x86_64

[root@kvm-06-guest17 ~]# find /run/containers/storage -type f -iname 'exec_pid_*'
[root@kvm-06-guest17 ~]# podman exec angry_nash /bin/true
[root@kvm-06-guest17 ~]# podman exec angry_nash /bin/true
[root@kvm-06-guest17 ~]# podman exec angry_nash /bin/true
[root@kvm-06-guest17 ~]# find /run/containers/storage -type f -iname 'exec_pid_*'
[root@kvm-06-guest17 ~]#

Comment 15 lichenn 2019-10-11 13:01:35 UTC
Hi guys I also found some issue about podman socket crash with version podman-1.0.2-1.git4426985.module+el8.0.0.z+3525+56c076c3.x86_64 in OCP4.1 coreOS node

How could I get the latest version of podman pacakge podman-1.4.2-5.module+el8.1.0+4240+893c1ab8.x86_64 to verify the issue?

Comment 17 errata-xmlrpc 2019-11-05 21:02:47 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, 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/RHSA-2019:3403


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