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

[BUG] App process doesn't terminate correctly on MacOS #37

Open
thatfloflo opened this issue Mar 31, 2023 · 3 comments
Open

[BUG] App process doesn't terminate correctly on MacOS #37

thatfloflo opened this issue Mar 31, 2023 · 3 comments
Assignees
Labels
backend Affects the backend bug Something isn't working help wanted Extra attention is needed

Comments

@thatfloflo
Copy link
Member

Describe the bug
On recent versions of MacOS with Python 3.10.10 (and possibly other versions), the app doesn't terminate correctly.

It throws a ValueError saying that the event loop has already been destroyed and thus cannot be destroyed, yet the event loop stays alive and the app doesn't terminate.

This might be connected to libev on *nix and to something upstream with eel, but definitely needs further investigating and fixing.

The only current remedy is to send a KeyboardInterrupt (e.g. Ctrl+C) or kill the process manually to completely exit the app. Users can also close the Terminal window, which will prompt them to terminate the process.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the User Guide instructions to run as a Python package on MacOS
  2. Launch the app in the terminal
  3. Close the frontend Chrome window
  4. See error

Expected behavior
Exit cleanly once all websocket connections have been closed and the timeout has passed.

System information:

  • Device: MacBook
  • OS: MacOS / Darwin
  • Version: Any
@thatfloflo thatfloflo added bug Something isn't working help wanted Extra attention is needed backend Affects the backend labels Mar 31, 2023
@thatfloflo
Copy link
Member Author

Related issue on Linux is now fixed in 48f23a1, needed a different way of killing Gevent's GHub. I think that would've also done it for MacOS, but that needs confirming before closing this issue.

@thatfloflo
Copy link
Member Author

Recent testing on a MacBook shows this still doesn't exit cleanly on MacOS. May still miss an intercept for some signals and needs more in-depth investigation on a physical Apple device.

@thatfloflo
Copy link
Member Author

As of fbb4fe4 on MacOS Monterey 12.7.5 on a Late 2014 Mac mini, I cannot reproduce the problematic behaviour. Everything looks and feels okay (if not quite ideal due to some other MacOS stuff). We should check this on one or two more machines and then close if it cannot be reproduced anymore.

@thatfloflo thatfloflo self-assigned this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Affects the backend bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant