Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runaway processes #298

Closed
Timoses opened this issue Jul 7, 2021 · 9 comments
Closed

Runaway processes #298

Timoses opened this issue Jul 7, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@Timoses
Copy link

Timoses commented Jul 7, 2021

  • zsh-autocomplete version: latest
  • Zsh version: zsh-5.8-0-g77d203f
  • Framework: none
  • Plugin manager: antibody
  • Operating system: Linux and MacOS

Sofar I am unable to reproduce this with intent. However, I experience this both an MacOS and Linux (Fedora 33).

Sometimes I find zsh processes which use up lots of CPU time.
On my MacOS I noticed this only after installing zsh-autocomplete (the computer fans started going wild although I did nothing computing intense... A look into activity monitor list at least one zsh process using lots of cpu power in these cases) which is why I am quite certain that these come from this plugin.

On Linux I can track these with top.

I haven't done further analysis until now.

Perhaps you have some pointers as to what I may be looking into.

As a side note: I noticed on MacOS that this often happens when I press TAB to autocomplete something and suddenly the zsh shell session closes (Tmux pane vanishes).

@marlonrichert
Copy link
Owner

I noticed on MacOS […] when I press TAB to autocomplete something and suddenly the zsh shell session closes (Tmux pane vanishes).

That one is new to me and sounds like a separate problem. Can you open a separate bug report for that one, with a minimal test case with which I can reproduce the problem? Thanks.

@Timoses
Copy link
Author

Timoses commented Jul 14, 2021

That one is new to me and sounds like a separate problem. Can you open a separate bug report for that one, with a minimal test case with which I can reproduce the problem? Thanks.

It seems to be related because every time TAB completion closes the session I spot a runaway process which I have to kill manually.

Example:

20:52:59 0> ls
backup       bilder       books        kreativkiste music        persona      secure       shared       technikkiste tobs         travel       unikiste
20:53:00 0> pwd
/Users/Timoses/syncthing

In this directory if I type

ls col<TAB>

=> Shell session closes and runaway zsh process starts.

It's very reproducible this way.

@Timoses
Copy link
Author

Timoses commented Jul 14, 2021

I noticed that above (ls col<TAB> => Runway process on MacOS) happens when I have the following configured:

zstyle ':autocomplete:*' insert-unambiguous yes
zstyle ':autocomplete:*' widget-style menu-select

If I have only either or none of them configured it does not happen (only when both are activated).

@marlonrichert
Copy link
Owner

ls col<TAB>

Why exactly do you type col? You don’t seem to have any file with those letters in your pwd.

@Timoses
Copy link
Author

Timoses commented Jul 17, 2021

ls col<TAB>

Why exactly do you type col? You don’t seem to have any file with those letters in your pwd.

Not exactly trying to find a non-existing file, but completion attempts like these via TAB just happen during day-to-day tabbing. It shouldn't just lead to zsh quitting and leaving a runaway process in these cases (or any case I suppose).

Thanks for the attempted fix.

However, it still happens (zsh session closes / tmux pane just quits -> runaway process) after I updated to latest version (which includes 781d322 ) and ensure the change arrived in my autocomplete zsh files.

I checked the process which is still running, however it doesn't seem to tell much of a story:

  501 56412     1   0  8:57PM ??         3:11.01 -zsh
  501 56414 56412   0  8:57PM ??         0:00.00 (zsh)

I left it running for 6 minutes, but it does not seem to stop itself.

@Timoses
Copy link
Author

Timoses commented Jul 17, 2021

If I can do anything to debug the situation please let me know (inserting a specific debug line within autocomplete scripts , ...)

@marlonrichert
Copy link
Owner

I was now able to generate some runaway processes, determine the cause of it, and fix the problem. Please update and let me know if it doesn't fix it for you.

@Timoses
Copy link
Author

Timoses commented Jul 18, 2021

Thanks, this fixes it! No more runaway process. However, the phenomenon of a closing shell still appears: #306

@marlonrichert
Copy link
Owner

You're welcome! 😊


If you enjoy using this software, please consider becoming a sponsor.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants