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

ssh terminal rendering issues #932

Closed
mukerjee opened this issue Feb 27, 2024 · 2 comments
Closed

ssh terminal rendering issues #932

mukerjee opened this issue Feb 27, 2024 · 2 comments
Labels

Comments

@mukerjee
Copy link
Contributor

What happened?

When using the local docker provider, ssh to the workspace can cause terminal rending when the screen is refreshed.

For example, if you ssh in and start tmux and hit a few times to make a few lines and then create a new tmux pane to the right, the left terminal rendering starts to get messed up. If you then open something that refreshes the screen often (like htop) in both the left and right pane, you will see a lot of funky rendering (i.e., data from the right pane shows up in the left pane and vice-versa).

I'm seeing very similar issues to these other project issues:
microsoft/terminal#6987 --> has a nice gif in the first post
tmux/tmux#224

The issue seems to happen even without tmux, as long as you use some terminal software that renders panes on the screen e.g., vim, emacs, etc. with split left and right panes.

This issue happens in both iTerm2 and macos terminal applications.

This issue does not happen if you just docker exec -it ... bash into the container.

This kind of scrambling of the terminal effectively makes ssh based use of a workspace (e.g., for development work using cli editors like vim / emacs / ...) unusable.

I am currently working around this issue by following the advice in the threads I linked above; if you add:

set -ag terminal-overrides ',*:cud1=\E[1B'

to your ~/.tmux.conf it resolves the issue.

From some reading on those threads, it sounds like the issue has something to do with improper \r's (or \r\n's?) making it into situations where the terminal is expecting \n's.

I did some poking around the code to see if i could find where this might be happening but didn't see anything obvious.

What did you expect to happen instead?

ssh'ing into the a local workspace shouldn't cause rendering issues in the terminal

How can we reproduce the bug? (as minimally and precisely as possible)

  • Spin up a debian container using devpod
  • $ apt update
  • $ apt install tmux htop
  • $ tmux
  • hit enter a few times to create a few lines in the current pane
  • create a new pane on the right: Ctrl-B then %
  • notice how some of the lines in the left pane disappeared and that the tmux pane divider line isn't rendered correctly
  • try running htop in either pane, or both --> notice how its rendering gets strange over time

Local Environment:

  • DevPod Version: 0.53.0
  • Operating System: mac
  • ARCH of the OS: ARM64

DevPod Provider:

  • Local/remote provider: docker

Anything else we need to know?

I'm happy to dig into this if you can point me in the right direction

@89luca89
Copy link
Contributor

Thanks @mukerjee for reporting

Can you see if a pty is correclty instantiated for the various processes?

You can start with running tty on the first shell you land (and maybe ls -la /dev/pts) then open tmux and repeat for each pane

@89luca89
Copy link
Contributor

89luca89 commented May 2, 2024

Closing due to inactivity, feel free to reopen if the problem is persisting

@89luca89 89luca89 closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants