1

I upgraded to Fedora 26 the day of the official public release earlier this week and, long story short, ended up screwing up my installation, so I did a partial reformatting . My disk layout is the following:

# df -h | grep dev
/dev/sdb3        40G  5.6G   32G  15% /
/dev/sdb2       477M  138M  311M  31% /boot
/dev/sdb1       200M   34M  167M  17% /boot/efi
/dev/sda2       9.8G  940M  8.4G  10% /var
/dev/sda1       493G  441G   27G  95% /home

/dev/sdb is the SSD where root is mounted and /dev/sda is a normal HDD where I have my /home partition. I decided to do a clean install of Fedora 26 instead of trying to repair my botched upgrade via dnf, so I reformatted all partitions in /dev/sdb, the SSD and re-installed Fedora 26, keeping the /home partition intact. The installation went fine and everything seems to be working normally again except for one thing: Zhs autocompletion is now dog slow with larger directories.

Zsh is my default shell and I have a plethora of plugins installed (Oh My Zsh, FZF, etc.) so I figured one of these might've gone out of whack during/after the upgrade so I switched to Bash: same thing, autocomplete takes a good 10-30 seconds (depending on dir size) to come up. I installed some more shells to troubleshoot the cause and, to my surprise, tcsh and fish work absolutely fine. Under the same setting, these two perform perfectly fine where Bash and Zsh would hang for a good +10 seconds.

I've done the usual diagnostics with Bash, whose config is pretty vanilla compared to my Zsh install: strace, set -x, etc., but couldn't find much of interest. Also ruled out FZF as the problem as the slowness persisted after uninstalling it... Still my gut tells me this must be some sort of weird hashing/caching problem of the completion engine that somehow affects both Zsh and Bash, but I don't really have any evidence to support that. Autocompletion with smaller folders (few files, few subdirectories) works fine across all shells I've tried. Other things I've tried is to run fsck -A -y to make sure I don't have any corrupt partitions and also re-installed bash-completion and zsh just in case some metadata or cache had corrupted.

I think what's really intriguing here is the fact that tcsh and fish have 0 problem autocompleting anything I throw at them, but Bash and Zsh don't. Does anybody know what's going on here? Big thanks to whomever sheds some light into the matter!

2
  • Maybe bash and zsh are doing some network-based completions that are timing out or failing?
    – Jeff Schaller
    Jul 15, 2017 at 14:11
  • Very likely autocompletion tries to access something which doesn't work, and fails after a long timeout. Try to narrow it down: Which autocompletion fails? Commands (what's in PATH)? Arguments (in which directories)? Output of mount?
    – dirkt
    Jul 16, 2017 at 7:20

1 Answer 1

1

Problem solved! I was toying around with perf trace and as lines and lines of output scrolled past I caught a glimpse of a few weird calls to libnotify from Konsole, my default terminal. That seemed weird since after the reformat I no longer had any desktop notification daemon installed (I use i3, which doesn't come with one, you see). That gave me the idea to try a different terminal emulator. So I tried urxvt and lo and behold, the issue disappeared. I also tried with gnome-terminal and no probs at all! Could it be then that Konsole was trying to fire off a desktop notification via dbus/systemd but timing out because there was no libnotify daemon installed to respond to the request? So I installed dunst, which is the daemon I was using before the upgrade and, as I suspected, autocomplete slowness in Konsole is gone!

So I have no idea what the heck Konsole tries to do when autocomplete is invoked because I never see any notifications pop up, not even after installing the daemon, but, at any rate, the issue seems to be fixed now.

I think I'll be taking this one to the KDE team and see what their thoughts are because, even though it was kind of my fault for not having a notification daemon installed, the other terminals I tried handled the problem just fine.

Anyway, thank you all for your help!

You must log in to answer this question.

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