Add timeout for write_serial_console_log function. - #387
Merged
Conversation
Copilot started reviewing on behalf of
Zhidong Peng (ZhidongPeng)
August 25, 2026 20:55
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens Linux startup/provision logging by making write_serial_console_log non-blocking with a bounded timeout to prevent hangs observed on some Linux VMs, and updates call sites accordingly. It also attempts to make CI results more reliable by pinning Rust for lint jobs and making cargo-audit installs deterministic.
Changes:
- Add a non-blocking serial console write helper with a 2s timeout and unit tests (
proxy_agent/src/common/logger.rs). - Update Linux-only call sites to the new
write_serial_console_log(message, path_override)signature (service.rs,provision.rs,helpers.rs). - Update CI lint jobs to use a pinned Rust toolchain and
cargo install --lockedforcargo-audit(.github/workflows/ci.yml).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| proxy_agent/src/service.rs | Updates Linux startup serial-console logging call to new signature. |
| proxy_agent/src/provision.rs | Updates provision-state serial-console logging calls to new signature. |
| proxy_agent/src/common/logger.rs | Implements non-blocking /dev/console writes with timeout + adds unit tests. |
| proxy_agent/src/common/helpers.rs | Updates startup event logging call to new signature. |
| .github/workflows/ci.yml | Attempts to pin Rust for lint jobs and adds --locked for cargo-audit installation. |
Suppressed comments (1)
.github/workflows/ci.yml:44
- Same as linux_lint:
dtolnay/rust-toolchain@1.95.0is an action ref and does not pin the Rust compiler version. Use the action’stoolchaininput to pin Rust, and keep the action itself on a stable tag (or SHA).
- uses: dtolnay/rust-toolchain@1.95.0
with:
components: rustfmt clippy
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Srikrishna Veturi (srikrishnaveturi)
self-requested a review
August 25, 2026 22:47
Srikrishna Veturi (srikrishnaveturi)
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some Linux VM, our GPA VMExtension detects the GPA status are stale and our log from syslog indicates our GPA service may hang at
write_serial_console_log.Side changes to have reliable CI action results, pin the rust version for linux_lint and windows_lint. We will upgrade the rust version in a separate PR.