Skip to content

openvmm: split fork position 015 into microsoft/openvmm#4605's read fix and a fork-only write-failure drop #1283

Description

Objective

Bring the serial socket commits of feature/microvm/dev in line with microsoft/openvmm#4605, which review narrowed to the read path, keep the write-failure behavior that NVX's consoles rely on as a fork-only commit, and update the roadmap.

Background

Fork position 015 (92d6de98f, PR06) carries the first revision of microsoft/openvmm#4605: a failed write drops the socket and returns the error. It argued that the backend otherwise never reported the disconnect, which was true of virtio-console: without a guest receive buffer, it neither read nor polled poll_disconnect.

In review, jstarks proposed fixing virtio-console instead. microsoft/openvmm#4778 (df6f8884b), which every fork base since v2.4 includes, makes it poll poll_disconnect without a receive queue and while it waits for a receive buffer. microsoft/openvmm#4605 is now narrowed to the read path in 3f0ef5c71: a read error is traced, drops the socket, and is reported as EOF, while writes, flushes, and closes keep upstream's handling, which reports BrokenPipe as success and keeps the socket. The chain and the pull request therefore no longer share a change:

Work

  • On feature/microvm/dev, replace position 015 with two commits:
    • the read fix of serial_socket: report read errors as EOF and drop the connection openvmm#4605 at 3f0ef5c71, with its two tests, mapped to that pull request in PR06. Position 114 (f2dbfa315) adds a Linux-only tests module to net.rs, so the two modules have to merge;
    • a fork-only commit that drops the socket and returns the error on a failed write, whose message gives the output-retention reason above rather than disconnect detection, with a Linux test that a write to an AF_UNIX peer that has closed fails and lets the listener accept a replacement client.
  • Decide where the fork-only commit goes: with its consumers, the Retain policy of PR13's position 046 and the portb console of PR15's position 064, or as an N-class commit. Decide the same for position 016's write handling, and narrow serial_socket: keep Windows named-pipe listeners reconnectable openvmm#4609 if its review raises the same question.
  • Promote the OpenVMM revision into NVX with the nvx-openvmm-promote workflow.
  • Update doc/openvmm-upstream-roadmap.md: PR06's entries and the open-pull-request table for positions 015 and 016, the new fork-only commit and its class, and a note for the rebase that lands serial_socket: report read errors as EOF and drop the connection openvmm#4605: drop only the read fix there and keep the write-failure drop, or Retain consoles and portb start losing output on Linux.

Acceptance criteria

  • poll_read on feature/microvm/dev matches serial_socket: report read errors as EOF and drop the connection openvmm#4605: a read error is traced, drops the socket, and is reported as EOF.
  • A failed write still drops the socket and returns the error, and a Linux test pins it for an AF_UNIX peer that has closed.
  • A test shows that a Retain console keeps the guest output written after its peer leaves and delivers it to the next peer.
  • The roadmap maps the read fix to serial_socket: report read errors as EOF and drop the connection openvmm#4605, classifies the write-failure drop, and carries the rebase note.
  • Package-scoped OpenVMM checks of serial_socket, virtio_console, and chipset pass on Linux and Windows, through available hosts or CI, recording unavailable coverage explicitly.

Coordination

Related work Integration
microsoft/openvmm#4605 Narrowed to the read path in 3f0ef5c71; the chain's read-fix commit tracks it and is dropped when it lands.
microsoft/openvmm#4778 Merged as df6f8884b, in every fork base since v2.4; replaces the write-failure drop for disconnect detection.
microsoft/openvmm#4609 Same write-failure drop for named pipes; may need the same narrowing.
microsoft/openvmm#4887 Position 213; portb's output reaches the next peer only through a failed BrokenPipe write.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions