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

Mac terminal resize loop/bug when running kubectl run -it #30714

Closed
dan-ih opened this issue Aug 18, 2023 · 5 comments · Fixed by #46028
Closed

Mac terminal resize loop/bug when running kubectl run -it #30714

dan-ih opened this issue Aug 18, 2023 · 5 comments · Fixed by #46028

Comments

@dan-ih
Copy link

dan-ih commented Aug 18, 2023

Expected behavior:
Terminal stays the same size when starting an interactive command with kubectl run -it

Current behavior:
Terminal rapidly resizes

Bug details:

  • Teleport version:
    Teleport v13.3.2 git:v13.3.2-0-gfc60440 go1.20.7
    Proxy version: 12.4.3
  • Recreation steps:
  1. Log into a kubernetes cluster using tsh.
  2. Start a container in interactive mode with 'kubectl run' in a smaller sized mac terminal window:
  • kubectl run -it alpine --image alpine --command sh
  1. You should see the terminal rapidly resizing back and forth. If you are having difficulty recreating this issue, try a smaller terminal window size.
  • Debug logs
I0818 18:08:20.283314    2787 round_trippers.go:469] Request Headers:
I0818 18:08:20.283327    2787 round_trippers.go:473]     User-Agent: kubectl/v1.28.0 (darwin/arm64) kubernetes/855e7c4
I0818 18:08:20.283338    2787 round_trippers.go:473]     X-Stream-Protocol-Version: v4.channel.k8s.io
I0818 18:08:20.283348    2787 round_trippers.go:473]     X-Stream-Protocol-Version: v3.channel.k8s.io                                                                                                        I0818 18:08:20.283358    2787 round_trippers.go:473]     X-Stream-Protocol-Version: v2.channel.k8s.io
I0818 18:08:20.283368    2787 round_trippers.go:473]     X-Stream-Protocol-Version: channel.k8s.io
I0818 18:08:20.448352    2787 round_trippers.go:574] Response Status: 101 Switching Protocols in 164 milliseconds

I0818 18:08:20.448408    2787 round_trippers.go:580]     Connection: Upgrade
I0818 18:08:20.448416    2787 round_trippers.go:580]     Pragma: no-cache
I0818 18:08:20.448424    2787 round_trippers.go:580]     Referrer-Policy: strict-origin
I0818 18:08:20.448431    2787 round_trippers.go:580]     Upgrade: SPDY/3.1
I0818 18:08:20.448439    2787 round_trippers.go:580]     X-Frame-Options: SAMEORIGIN
I0818 18:08:20.448446    2787 round_trippers.go:580]     Cache-Control: no-cache, no-store, must-revalidate
I0818 18:08:20.448454    2787 round_trippers.go:580]     Expires: 0
                                                                                                              I0818 18:08:20.448461    2787 round_trippers.go:580]     Strict-Transport-Security: max-age=31536000; includeSubDomains
                                                                                                               I0818 18:08:20.448468    2787 round_trippers.go:580]     X-Content-Type-Options: nosniff
I0818 18:08:20.448475    2787 round_trippers.go:580]     X-Stream-Protocol-Version: v4.channel.k8s.io
I0818 18:08:20.448483    2787 round_trippers.go:580]     X-Xss-Protection: 1; mode=block```
@tigrato
Copy link
Contributor

tigrato commented Sep 20, 2023

@dan-ih

I cannot reproduce this behavior in my config.
Which terminal are you using?
Does the problem persists on new versions of Teleport?

@dan-ih
Copy link
Author

dan-ih commented Sep 20, 2023

@tigrato This seems to happen fairly consistently in the default macos terminal (using Version 2.13 (447)) . I personally use iterm and the issue doesn't happen there, but others in the company who use the default mac terminal have had trouble with this. Unfortunately it looks like something we can't just tell people to ignore, they need to change to iTerm for this to work properly, otherwise it makes it impossible to read anything. I posted a video of what is looks like in the teleport slack workspace when we discussed there.

@tigrato
Copy link
Contributor

tigrato commented Sep 20, 2023

Oh, I tested with iterm that's why I didn't reproduce it.
Will debug it with the default terminal

@dlipofsky
Copy link

dlipofsky commented Jul 2, 2024

I experience the same issue (vibration or jitter of terminal due to rapid continuous resizing) with

  • Terminal 2.14
  • MacOS Sonoma 14.5
  • Teleport v14.3.3
  • Proxy version: 15.3.1
  • AWS EKS 1.29

and it does seem specifically related to teleport, since I can run the same command against the same cluster when connecting via "assume" (granted 0.21.1) and I don't have this issue.

@dlipofsky
Copy link

@tigrato were you able to reproduce?

tigrato added a commit that referenced this issue Aug 29, 2024
When performing a quick resize, the macOS Terminal generates several intermediate window sizes between the original and final terminal sizes. During this resizing process, Teleport receives all the intermediate sizes and broadcasts them to all participants in the session.

If the resizing information is sent back to the party that initiated the resize, it can create a feedback loop where the terminal and Teleport repeatedly attempt to enforce different window sizes.

This PR prevents Teleport from resending the resize event to the party that triggered the initial resize.

Fixes #30714

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot pushed a commit that referenced this issue Aug 30, 2024
When performing a quick resize, the macOS Terminal generates several intermediate window sizes between the original and final terminal sizes. During this resizing process, Teleport receives all the intermediate sizes and broadcasts them to all participants in the session.

If the resizing information is sent back to the party that initiated the resize, it can create a feedback loop where the terminal and Teleport repeatedly attempt to enforce different window sizes.

This PR prevents Teleport from resending the resize event to the party that triggered the initial resize.

Fixes #30714

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-actions bot pushed a commit that referenced this issue Aug 30, 2024
When performing a quick resize, the macOS Terminal generates several intermediate window sizes between the original and final terminal sizes. During this resizing process, Teleport receives all the intermediate sizes and broadcasts them to all participants in the session.

If the resizing information is sent back to the party that initiated the resize, it can create a feedback loop where the terminal and Teleport repeatedly attempt to enforce different window sizes.

This PR prevents Teleport from resending the resize event to the party that triggered the initial resize.

Fixes #30714

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-actions bot pushed a commit that referenced this issue Aug 30, 2024
When performing a quick resize, the macOS Terminal generates several intermediate window sizes between the original and final terminal sizes. During this resizing process, Teleport receives all the intermediate sizes and broadcasts them to all participants in the session.

If the resizing information is sent back to the party that initiated the resize, it can create a feedback loop where the terminal and Teleport repeatedly attempt to enforce different window sizes.

This PR prevents Teleport from resending the resize event to the party that triggered the initial resize.

Fixes #30714

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-actions bot pushed a commit that referenced this issue Aug 30, 2024
When performing a quick resize, the macOS Terminal generates several intermediate window sizes between the original and final terminal sizes. During this resizing process, Teleport receives all the intermediate sizes and broadcasts them to all participants in the session.

If the resizing information is sent back to the party that initiated the resize, it can create a feedback loop where the terminal and Teleport repeatedly attempt to enforce different window sizes.

This PR prevents Teleport from resending the resize event to the party that triggered the initial resize.

Fixes #30714

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot pushed a commit that referenced this issue Aug 30, 2024
When performing a quick resize, the macOS Terminal generates several intermediate window sizes between the original and final terminal sizes. During this resizing process, Teleport receives all the intermediate sizes and broadcasts them to all participants in the session.

If the resizing information is sent back to the party that initiated the resize, it can create a feedback loop where the terminal and Teleport repeatedly attempt to enforce different window sizes.

This PR prevents Teleport from resending the resize event to the party that triggered the initial resize.

Fixes #30714

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot pushed a commit that referenced this issue Aug 30, 2024
When performing a quick resize, the macOS Terminal generates several intermediate window sizes between the original and final terminal sizes. During this resizing process, Teleport receives all the intermediate sizes and broadcasts them to all participants in the session.

If the resizing information is sent back to the party that initiated the resize, it can create a feedback loop where the terminal and Teleport repeatedly attempt to enforce different window sizes.

This PR prevents Teleport from resending the resize event to the party that triggered the initial resize.

Fixes #30714

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot pushed a commit that referenced this issue Aug 30, 2024
When performing a quick resize, the macOS Terminal generates several intermediate window sizes between the original and final terminal sizes. During this resizing process, Teleport receives all the intermediate sizes and broadcasts them to all participants in the session.

If the resizing information is sent back to the party that initiated the resize, it can create a feedback loop where the terminal and Teleport repeatedly attempt to enforce different window sizes.

This PR prevents Teleport from resending the resize event to the party that triggered the initial resize.

Fixes #30714

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants