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

"Waiting for process to die" and crashes when typing quickly on Gentoo #23

Open
chameco opened this issue Jun 27, 2018 · 11 comments
Open

Comments

@chameco
Copy link
Contributor

chameco commented Jun 27, 2018

I'm getting Waiting for process to die... done in the minibuffer whenever I type a character within helm-system-packages on Gentoo (w/Portage), and when I type multiple characters in relatively quick succession (maybe within a second), the Helm buffer closes with no message. There isn't anything particularly nonstandard about my setup except syncing from git (eix works normally, etc.).

I couldn't find anything that might be causing this in my (admittedly cursory) overview of the source. As far as I can tell, helm-system-packages-refresh is only run at initialization and after commands are executed, and regardless runs without error when invoked manually.

Do you have any advice as to why this might be happening?

@Ambrevar
Copy link
Member

Hmmm... No clue off the top of my head, sorry.
I really wonder why it would even been waiting for the process to die...

The current state of implementation is very good for Guix, pacman and xbps, and should be quite OK for dpkg. Sadly Portage hasn't be updated ever since I overhauled this package and I'm afraid it might be substantially broken.

It would not take much work to bring it up to speed, we only need someone with a Portage-based distro and a few hours on their hands. @chameco Interested? :)

@chameco
Copy link
Contributor Author

chameco commented Jun 27, 2018

Sure, if it's out-of-date then I'll gladly devote some time to fixing it. Give me a day or two and I'll submit a pull request.

@Ambrevar
Copy link
Member

Thanks!
I'd suggest focusing on Pacman as a reference implementation. It's pretty polished and certainly the most complete.

What needs to be done:

  • Backport the cache mechanism.
  • Make sure it works over TRAMP.
  • Drop the deprecated helpers (if any) and the portage-specific helpers/variables, if possible.

The code might not always be as clear as should be :( Let me know if there is any confusion.

@chameco
Copy link
Contributor Author

chameco commented Jun 28, 2018

I've pull-requested a quick fix for this in #24 - the precise issue was that the USE flag source was running portageq in the candidate transformer to determine whether the flag was enabled.

@Ambrevar
Copy link
Member

Thanks for rooting it out! I'll review your pull request as soon as possible!

@Ambrevar
Copy link
Member

Thank you for the pull request.
Now the most important bit is to replace the deprecated helpers. Feel free to give it a shot when you have time :)

@mullikine
Copy link

This also happens with helm-dash when typing and some other helms from memory. Helms that have high latency such as ones that make queries over the internet seem to be affected the most. Would this not be a bug in helm rather than packages that use helm?

@Ambrevar
Copy link
Member

Ambrevar commented May 16, 2021 via email

@mullikine
Copy link

I have investigated it. Happy to understand the problem a little better now. In the function helm-get-candidates, inhibit-quit is set to non-nil if the source is an external process. But I'm guessing that some helm packages will hide this from helm and so to helm it must look like a regular function. The c function call-process will die if it gets the bell. I'm guessing that typing too quickly triggers the terminal bell, which is C-g. The real issue is figuring out how that bell is triggered and how to stop it from happening, but my guess is that it might not be so easy. I've just set inhibit-quit to t permanently in helm-get-candidates and I don't see the issue anymore.

@mullikine
Copy link

I have made a PR to upstream.
emacs-helm/helm#2418

@Ambrevar
Copy link
Member

Ambrevar commented May 17, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants