Bug 1448789

Summary: dnfdaemon leaks file descriptors when running multiple transactions.
Product: [Fedora] Fedora Reporter: Villy Kruse <ppywlkiqletw>
Component: dnfdaemonAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 27CC: besser82, leigh123linux, loic.yhuel, lupinix.fedora, ngompa13, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: dnfdaemon-0.3.18-5.fc27 dnfdaemon-0.3.18-5.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-31 21:25:58 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:
Attachments:
Description Flags
lsof listing showing the growth of file descriptors. none

Description Villy Kruse 2017-05-08 07:23:28 UTC
Created attachment 1276992 [details]
lsof listing showing the growth of file descriptors.

Description of problem:


Version-Release number of selected component (if applicable):

Installed Packages
dnf.noarch                                         1.1.10-6.fc25        @updates
dnf-conf.noarch                                    1.1.10-6.fc25        @updates
dnf-plugin-system-upgrade.noarch                   0.7.1-4.fc25         @updates
dnf-plugins-core.noarch                            0.1.21-5.fc25        @updates
dnf-plugins-extras.noarch                          0.0.12-4.fc25        @fedora
dnfdaemon.noarch                                   0.3.16-3.fc25        @updates
dnfdaemon-selinux.noarch                           0.3.16-3.fc25        @updates
hawkey.i686                                        0.6.4-3.fc25         @updates
libdnf.i686                                        0.7.3-1.fc25         @updates
libsolv.i686                                       0.6.27-1.fc25        @updates
python3-dbus.i686                                  1.2.4-2.fc25         @fedora
python3-dnf.noarch                                 1.1.10-6.fc25        @updates
python3-dnf-plugin-system-upgrade.noarch           0.7.1-4.fc25         @updates
python3-dnf-plugins-core.noarch                    0.1.21-5.fc25        @updates
python3-dnf-plugins-extras-common.noarch           0.0.12-4.fc25        @fedora
python3-dnf-plugins-extras-leaves.noarch           0.0.12-4.fc25        @fedora
python3-dnf-plugins-extras-repoclosure.noarch      0.0.12-4.fc25        @fedora
python3-dnf-plugins-extras-repograph.noarch        0.0.12-4.fc25        @fedora
python3-dnf-plugins-extras-repomanage.noarch       0.0.12-4.fc25        @fedora
python3-dnf-plugins-extras-rpmconf.noarch          0.0.12-4.fc25        @fedora
python3-dnf-plugins-extras-show-leaves.noarch      0.0.12-4.fc25        @fedora
python3-dnf-plugins-extras-tracer.noarch           0.0.12-4.fc25        @fedora
python3-dnfdaemon.noarch                           0.3.16-3.fc25        @updates
python3-gobject.i686                               3.22.0-1.fc25        @fedora
python3-hawkey.i686                                0.6.4-3.fc25         @updates
python3-iniparse.noarch                            0.4-20.fc25          @fedora
python3-libcomps.i686                              0.1.7-5.fc25         @fedora
python3-librepo.i686                               1.7.18-3.fc25        @fedora
python3-pygpgme.i686                               0.3-18.fc25          @fedora
rpm-libs.i686                                      4.13.0.1-1.fc25      @updates
rpm-plugin-systemd-inhibit.i686                    4.13.0.1-1.fc25      @updates
yumex-dnf.noarch                                   4.3.3-2.fc25         @fedora


How reproducible:

Always
Steps to Reproduce:
1.
      I have a list of pending updates, for example
2.
      Run yumex-dnf and select one item from the list of updates
      and install this item and its dependencies.
3.
      Run lsof to get a list of opened files
4.
      Repeat for the next pending updates.


Actual results:

After each transaction, the number of open files in the dnfdaemon
process is increased by about 20 file descriptors.  When this number
reaches the limit, dnfdaemon will crash.

Expected results:

The number of opened files will stay almost constant,


Additional info:

For the typical case, where you run all updates in a single transaction,
there will be no problems.

Comment 1 Villy Kruse 2017-07-12 06:55:07 UTC
Issue reconfirmed after upgrade to f26.  It also seems to leak memory.
This time I tested using dnfdragora

Comment 2 Loïc Yhuel 2017-07-17 02:50:15 UTC
dnfdragora keeps dnfdaemon running on exit, so the leaks accumulate.
After a few updates, dnfdaemon-systems uses 1GB of VmRSS !

Comment 3 Villy Kruse 2017-07-17 11:49:26 UTC
It is dnfdragora-updater which keeps the dnfdaemon alive.  If you also stop dnfdragora-updater the daemon-system goes away.

Comment 4 Loïc Yhuel 2017-07-17 18:12:44 UTC
(In reply to Villy Kruse from comment #3)
> It is dnfdragora-updater which keeps the dnfdaemon alive.  If you also stop
> dnfdragora-updater the daemon-system goes away.

On F26, I don't have the dnfdragora-gui package, and dnfdaemon runs until I kill it (with a signal, or with "dnfdragora --exit").

Comment 5 Villy Kruse 2017-07-18 06:56:46 UTC
(In reply to Loïc Yhuel from comment #4)
> (In reply to Villy Kruse from comment #3)
> > It is dnfdragora-updater which keeps the dnfdaemon alive.  If you also stop
> > dnfdragora-updater the daemon-system goes away.
> 
> On F26, I don't have the dnfdragora-gui package, and dnfdaemon runs until I
> kill it (with a signal, or with "dnfdragora --exit").

Perhaps using xfce, as I do, makes a difference.

Comment 6 Fedora Update System 2017-12-29 22:43:36 UTC
dnfdragora-1.0.1-7.git20171229.24e4647.fc26 dnfdaemon-0.3.18-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8caadb4a1b

Comment 7 Fedora Update System 2017-12-29 22:43:50 UTC
dnfdragora-1.0.1-7.git20171229.24e4647.fc27 dnfdaemon-0.3.18-5.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d66bd84f06

Comment 8 Fedora Update System 2017-12-30 19:52:36 UTC
dnfdaemon-0.3.18-5.fc27, dnfdragora-1.0.1-8.git20171229.24e4647.fc27 has been pushed to the Fedora 27 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-2017-d66bd84f06

Comment 9 Fedora Update System 2017-12-30 20:38:29 UTC
dnfdaemon-0.3.18-5.fc26, dnfdragora-1.0.1-8.git20171229.24e4647.fc26 has been pushed to the Fedora 26 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-2017-8caadb4a1b

Comment 10 Villy Kruse 2017-12-31 14:43:34 UTC
(In reply to Fedora Update System from comment #8)
> dnfdaemon-0.3.18-5.fc27, dnfdragora-1.0.1-8.git20171229.24e4647.fc27 has
> been pushed to the Fedora 27 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-2017-d66bd84f06



This update has no effect on this bug.  The file descriptor leak is still there.

Installed packages currently.

dnfdaemon.noarch         0.3.18-5.fc27                    @updates-testing
dnfdaemon-selinux.noarch 0.3.18-5.fc27                    @updates-testing
python3-dnfdaemon.noarch 0.3.18-5.fc27                    @updates-testing
dnfdragora.noarch        1.0.1-8.git20171229.24e4647.fc27 @updates-testing

Comment 11 Björn Esser (besser82) 2017-12-31 15:55:52 UTC
Did you restart the updater or logged out and logged in again?

Comment 12 Villy Kruse 2017-12-31 18:26:31 UTC
(In reply to Björn "besser82" Esser from comment #11)
> Did you restart the updater or logged out and logged in again?

I don't even run the updater at all.

While installing the test version I was only logged in in non-graphic mode, and using command line dnf to do the installation.  graphical.target was disabled until after the upgrade.

I repeated my original test case, replacing yumex-dnf by dnfdragora, and the effect is exactly the same as in the original case: for every dnfdragore transaction, the number of opened file descriptors is increasing.

Comment 13 Fedora Update System 2017-12-31 21:25:58 UTC
dnfdaemon-0.3.18-5.fc27, dnfdragora-1.0.1-8.git20171229.24e4647.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2018-01-01 22:09:48 UTC
dnfdaemon-0.3.18-5.fc26, dnfdragora-1.0.1-8.git20171229.24e4647.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.