Bug 1471466 - dnf-makecache.service hangs and blocks dnf/yumex-dnf
dnf-makecache.service hangs and blocks dnf/yumex-dnf
Status: CLOSED DUPLICATE of bug 1470352
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
All Linux
unspecified Severity high
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-16 02:22 EDT by Lars S. Jensen
Modified: 2017-07-19 07:17 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-19 07:17:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lars S. Jensen 2017-07-16 02:22:47 EDT
Description of problem:
dnf/yumex-dnf hands because the programs wait for dnf-makecache.service to finsh and release dnf lock

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

How reproducible:

Steps to Reproduce:
dnf update
Hangs with:
Waiting for process with pid XXXXX to finish. 
2.systemctl status  dnf-makecache
  Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.service; static; vendor
  Active: activating (start) since Sun 2017-07-16 06:49:08 CEST; 56min ago
Main PID: 17850 (dnf)
   Tasks: 1 (limit: 4915)
   CGroup: /system.slice/dnf-makecache.service
           └─17850 /usr/libexec/system-python /usr/bin/dnf makecache timer
3. restart 
systemctl restart  dnf-makecache 
and now systemctl restart hangs:-(

Additional info:
       dnf [options] makecache --timer

Change line 14 in  /usr/lib/systemd/system/dnf-makecache.service
-ExecStart=/usr/bin/dnf makecache timer
+ExecStart=/usr/bin/dnf makecache --timer

systemctl restart  dnf-makecache 
works and:
systemctl status  dnf-makecache
   Active: inactive (dead) since Sun 2017-07-16 08:01:10 CEST; 9min ago
  Process: 18950 ExecStart=/usr/bin/dnf makecache --timer (code=exited, status=0
 Main PID: 18950 (code=exited, status=0/SUCCESS)
Comment 1 Lars S. Jensen 2017-07-16 10:48:36 EDT
The old syntax was restored in dnf-2.5.1-1.fc26 or before, so it was not the solution. 

It is still hanging and seen on 2 machines and it is not reproducible every time it runs:

systemctl status  dnf-makecache
● dnf-makecache.service - dnf makecache
   Loaded: loaded (/usr/lib/systemd/system/dnf-makecache.service; static; vendor
   Active: activating (start) since Sun 2017-07-16 15:01:13 CEST; 1h 4min ago
 Main PID: 27522 (dnf)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/dnf-makecache.service
           └─27522 /usr/libexec/system-python /usr/bin/dnf makecache --timer

Is should have a timeout so it don't block yumex-dnf in case of an issue.
Comment 2 Pascal Ernster 2017-07-18 11:57:29 EDT
I see this as well on several Fedora 25 machines.

According to "strace -f -p $PID" (with $PID being the pid that "systemctl status dnf-makecache" gives me), it hangs with FUTEX_WAIT_PRIVATE.

A first "systemctl restart dnf-makecache", cancelled by Ctrl+C after a few seconds, and then followed by a second "systemctl restart dnf-makecache", temporarily fixes the problem until the corresponding systemd timer triggers the time.
Comment 3 Pascal Ernster 2017-07-18 12:05:06 EDT
Just to be complete: the affected oackage version on my Fedora 25 machines is dnf 0:1.1.10-6.fc25. Though I have installed these machines quite recently so I don't know if previous versions of the dnf package are affected as well.
Comment 4 Igor Gnatenko 2017-07-19 07:17:34 EDT

*** This bug has been marked as a duplicate of bug 1470352 ***

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