-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
Deadlock on ssh_domain connect when stdout is printed from remote .bashrc #1860
Comments
stdout is reserved for the mux protocol when using an ssh_domain. In general, you should avoid printing to stdout from your shell rcfiles as this sort of thing can impact a variety of different programs, not just wezterm! If you must output stuff from your rcfiles, I would recommend making it conditional on being an interactive shell, and outputting to stderr instead of stdout. |
Thanks for the quick response. In fact usually I'm far from being dependent on printing stuff to stdout from my bashrc - that was just a relict from a recent debug session 😅. Maybe
|
Use some heuristics to verify the data that is about to be parsed; this can help to detect eg: data being output to stdout prior to us sending any encoded data to the remote mux. In addition, add a timeout to help avoid waiting forever in the case that we didn't detect a problem. refs: #1860
I've added some logic to try to detect this case and error out more quickly with a hint:
|
Thanks @wez . Just tried it and indeed see above output. Personally, I'm fine with the |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
What Operating System(s) are you seeing this problem on?
Linux X11
WezTerm version
20220408-101518-b908e2dd
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
Hi, and thanks for this gorgeous project!
I encountered the following issue: when connecting via ssh_domains and the remote bashrc prints something to stdout, a deadlock occurs.
The following is printed, before it is stuck:
When the echo line is removed from remote ~/.bashrc, everything is fine.
To Reproduce
On the remote host, put the following to the beginning of ~/.bashrc (bash must be ssh's login shell)
echo foobar
On localhost, add the respective ssh_domain to wezterm's config file (configure remote_hostname as usual in ~/.ssh/config)
Then on localhost execute
wezterm connect remote-test
, to see it deadlock.Configuration
see above.
Expected Behavior
No deadlock (:
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: