-
Notifications
You must be signed in to change notification settings - Fork 10
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
High CPU/memory usage after main unison process exits #27
Comments
Having the same issue here. Using version 0.3.4 installed via Homebrew, macOS 14.6.1. (Originally reported this as bcpierce00/unison#1053 but didn't realize this was a third-party version.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue
If the main Unison process exits, e.g. because the SSH connection to the server was dropped, the fsmonitor process continues running and CPU/memory utilization increases dramatically.
When running with debug logs enabled, the following two logs are repeatedly printed after the Unison process exits:
I observed this issue on an M1 MacBook running macOS Sonoma, but I don't believe the issue is platform-dependent.
Reproduction
repeat=watch
and set the destination to a remote server using SSH.Proposed Fix
I believe adding an
exit
statement to thesend_error
function here should resolve the issue by terminating the fsmonitor process after the first invalid input. We could also do something equivalent, like bubbling up an Error fromhandle_event
and exiting the receiver loop.This should be consistent with the reference fsmonitor implementation, which exits after printing an ERROR message (link)
I'm not particularly familiar with Rust or the fsmonitor protocol, so wanted to open this issue before opening a PR. But I'd be happy to work on the fix for this issue.
The text was updated successfully, but these errors were encountered: