Skip to content

tdx-attest: add read/write timeout for QGS vsock - #1454

Merged
kvinwang merged 2 commits into
nextfrom
fix/tdx-attest-qgs-vsock-timeout
Oct 16, 2026
Merged

kvinwang merged 2 commits into
nextfrom
fix/tdx-attest-qgs-vsock-timeout

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Simplified version of #1433 (thanks @ameba23).

An unresponsive QGS could block get_quote_via_vsock forever while holding TDX_LOCK, stalling all later quote requests in the process. This sets a 30s read/write timeout on the vsock stream. Connect is already bounded by the kernel (VSOCK_DEFAULT_CONNECT_TIMEOUT, 2s).

Tested on a TDX host (dstack-0.5.11 CVM, host qgsd on vsock 4050, configfs-tsm hidden so the vsock path is used):

Case Before After
Real QGS ok ok
Peer accepts, never replies hangs EAGAIN after 30.1s

An unresponsive QGS could block get_quote_via_vsock forever while holding
TDX_LOCK, stalling every later quote request in the process. Set a 30s
read/write timeout on the vsock stream; connect is already bounded by the
kernel (2s by default).

Co-authored-by: peg <[email protected]>
Signed-off-by: Kevin Wang <[email protected]>
@kvinwang
kvinwang enabled auto-merge October 16, 2026 06:00
@kvinwang
kvinwang merged commit 61e8bdd into next Oct 16, 2026
12 checks passed
@kvinwang
kvinwang deleted the fix/tdx-attest-qgs-vsock-timeout branch October 16, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant