11

Tab completion is hanging when attempting to complete package names. eg dnf info fire[TAB]. How can I fix this?

It works in general for bash, and also for completing dnf options, but not for package names. It appears to freeze the command line and I have to hit Ctrl-C twice to get back the command prompt.

Tab completion used to work on Fedora 28, and this issue started after upgrading to Fedora 29.

I have the bash-completion and sqlite packages installed, which are required for completion.

Using sudo strace -pXXXX -fro /tmp/strace.log (where XXXX is the process ID of the bash terminal where tab completion is being attempted) from here generated a 9MB 80k+ line log file and attached 55 processes. Suggestions of what hints to look for in there?


Observations on dnf package name tab completion

  • does not work for my user
  • works for root
  • does not work after dnf install or dnf info
  • works after dnf remove (including for my user)
6
  • Any repeated patterns, such as reading the same file over and over would be an indication. You might also want to "massage" the data to remove timestamps and such, and use sort | uniq -c | sort -k1 -n (untested) to see if there are any lines which stand out as extremely frequent.
    – l0b0
    Feb 7, 2019 at 1:52
  • @l0b0 Thanks. By not including timestamps and using your commands plus reverse sorting, here are the lines that show up 10 or more times in the log file: paste.fedoraproject.org/paste/DQ1rt0t63463sS6xbFE-bg Any clues?
    – adatum
    Feb 7, 2019 at 7:40
  • @l0b0 I noticed in the full log file that there are some EACCES (Permission denied) entries regarding access to /var/lib/rpm and files within it such as .dbenv.lock and .rpm.lock. Also in that directory is a binary file Packages that is ~300MB, is that normal? I'm just making blind guesses here...
    – adatum
    Feb 7, 2019 at 7:51
  • @adatum Did you find a solution in the end? This issue affects me too and I am unable to find a solution Mar 4, 2019 at 0:46
  • 1
    Finally fixed it! This bug and (the path to) its solution are described here: bugzilla.redhat.com/show_bug.cgi?id=1625674 Mar 4, 2019 at 11:53

3 Answers 3

2

There are some workarounds here https://bugzilla.redhat.com/show_bug.cgi?id=1625674. At some point there will be also a fix.

1

DNF completions is a piece of garbage developed and crafted by redhat.

I do this to remove trash:

sudo rm /usr/share/bash-completion/completions/dnf

NOTE: You may need this command again after updating/upgrading DNF

-1

There are many thousands of packages in the repository. TAB-expansion of package names will take a long time. Be patient... or don't do it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .