Bug 1448789 - dnfdaemon leaks file descriptors when running multiple transactions.
Summary: dnfdaemon leaks file descriptors when running multiple transactions.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnfdaemon
Version: 27
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-08 07:23 UTC by Villy Kruse
Modified: 2018-01-01 22:09 UTC (History)
6 users (show)

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:
Clone Of:
Environment:
Last Closed: 2017-12-31 21:25:58 UTC


Attachments (Terms of Use)
lsof listing showing the growth of file descriptors. (292.75 KB, text/plain)
2017-05-08 07:23 UTC, Villy Kruse
no flags Details

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 'besser82' Esser 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.


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