gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.59k stars 1.76k forks source link

RDP session gets terminated on resize event with "The server-side graphics subsystem is in an error state and unable to continue graphics encoding" #42487

Open uedvt359 opened 5 months ago

uedvt359 commented 5 months ago

Expected behavior: The session should keep going when resizing the browser a bunch of times

Current behavior:

After updating to 15.4.0, we noticed that sometimes the virtual desktop does not get resized to the browser window size when connecting (and two tiny scrollbars can be used to scroll the viewport). resizing the browser window triggers the resize event, but very often (~60% of the time), the session crashes.

Tested with Chrome: Version 125.0.6422.61 (Offizieller Build) (64-Bit); firefox doesn't work at all

image image

This is the relevant server log of me resizing the browser a few times:

Jun 05 15:07:40 teleport.local teleport[3788386]: [2024-06-05T13:07:40Z ERROR rdp_client] client_run failed: SessionError(Error { context: "ServerSetErrorInfo", kind: Reason("[RDP specific code]: The server-side graphics subsystem is in an error state and unable to continue graphics encoding"), source: None })
Jun 05 15:07:40 teleport.local teleport[3788386]: 2024-06-05T15:07:40+02:00 INFO [WINDOWS_D] Rust RDP loop finished client-ip:192.168.1.100 desktop-addr:10.10.10.10:3389 desktop-name:myserver pid:3788386.2 rdp-addr:10.10.10.10:3389 rdpclient/client.go:342
Jun 05 15:07:40 teleport.local teleport[3788386]: 2024-06-05T15:07:40+02:00 INFO [AUDIT]     windows.desktop.session.end cluster_name:teleport.local code:TDP01I desktop_addr:10.10.10.10:3389 teleport.dev/computer_name:myserver teleport.dev/dns_host_name:myserver teleport.dev/origin:dynamic teleport.dev/os:Windows Server 2019 Standard teleport.dev/os_version:10.0 (17763) teleport.dev/ou:DC=local teleport.dev/windows_domain:local desktop_name:myserver ei:1670 event:windows.desktop.session.end login:myuser participants:[myuser] private_key_policy:none recorded:false session_start:2024-06-05T13:05:26.335Z session_stop:2024-06-05T13:07:40.647150111Z sid:a32563e3-0353-4ebd-b25f-aa3f2043f9fe time:2024-06-05T13:07:40.647Z uid:f80f9325-e2e4-4683-9e90-19a98c692d98 user:myuser user_kind:1 windows_desktop_service:0509a511-76aa-413e-a3d8-f91db10d16a3 windows_domain:local windows_user:myuser with_mfa:49bf498f-6221-4e02-be73-1d24de5b0a2c events/emitter.go:288
Jun 05 15:07:40 teleport.local teleport[3788386]: 2024-06-05T15:07:40+02:00 ERRO [WINDOWS_D] RDP connection failed: RDP client exited with an error: [RDP specific code]: The server-side graphics subsystem is in an error state and unable to continue graphics encoding client-ip:192.168.1.100 desktop-addr:10.10.10.10:3389 desktop-name:myserver pid:3788386.2 desktop/windows_server.go:759
Jun 05 15:07:40 teleport.local teleport[3788386]: 2024-06-05T15:07:40+02:00 INFO [WINDOWS_D] TDP input streaming finished client-ip:192.168.1.100 desktop-addr:10.10.10.10:3389 desktop-name:myserver pid:3788386.2 rdp-addr:10.10.10.10:3389 rdpclient/client.go:380 

Bug details:

ibeckermayer commented 5 months ago

@uedvt359 what version of Windows/Windows Server are you using?

uedvt359 commented 5 months ago

this was a connection to Windows Server 2019 Standard (17763)

ibeckermayer commented 5 months ago

Thanks, as expected. We've found the same error internally with Windows Server 2019.

It's a very tricky one to debug because it doesn't reproduce consistently for me.