google / google/capsem

[triage:process-blocking-terminal-io] Remaining synchronous terminal I/O runs on Tokio workers

Open
#189 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
72
Forks
13
Avg merge
1d 2h
Merged PRs (30d)
5

Description

## Summary

Independent verification of #133 found two adjacent blocking paths not owned by the serial.log fix:

- `PtyLog::record_output` and `record_input` take a mutex and synchronously write/rotate files from Tokio tasks.
- the stable terminal bridge synchronously calls `write_all` and `flush` on the guest terminal fd inside `tokio::select!`.

## Evidence

These calls are reachable from guest-output and service terminal-input paths in `crates/capsem-process/src/vsock.rs`; `crates/capsem-process/src/pty_log.rs` uses `std::fs::File` and synchronous `Write` operations.

## Impact

Slow disk or guest terminal backpressure can pin Tokio workers and delay unrelated control, IPC, and heartbeat futures.

## Triage

Track independently from #133 so each runtime-blocking defect has its own TDD fix and commit. Sprinty item: `S02-057`.

Contributor guide

Open the contributing guide

Research direction

Read crates/capsem-process/src/vsock.rs and crates/capsem-process/src/pty_log.rs first, tracing the guest-output and service terminal-input paths. Use the issue’s TDD requirement to cover both blocking paths; done means synchronous file and guest-terminal I/O no longer pins Tokio workers under slow I/O or backpressure.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.