Skip to content

Conversation

@BharatNarasimman
Copy link
Contributor

@BharatNarasimman BharatNarasimman commented Sep 23, 2024

For a VM with virt-console enabled, when a reboot is requested, the console devices are closed during the shutdown path. As part of this the sigwinch listener process and the console resizer pipe could be closed. For the new incarnation of the VM, fresh set of console devices are setup and a new console resizer pipe is created. The new VM should be setup to use the newly created console devices including the console resizer pipe.

Reading from the older console resizer pipe results in unexpected eof error and terminates the cloud hypervisor process.

cloud-hypervisor: 182.581732s: <__console> ERROR:virtio-devices/src/thread_helper.rs:55 -- Error running worker: HandleEvent(Failed to get resize event: Error { kind: UnexpectedEof, message: "failed to fill whole buffer" })

@BharatNarasimman BharatNarasimman requested a review from a team as a code owner September 23, 2024 22:18
@rbradford
Copy link
Member

@alyssais WDYT?

@alyssais
Copy link
Member

Will take a look tomorrow.

@alyssais
Copy link
Member

Code change looks right. Commit message doesn't fit Cloud Hypervisor's conventions. Is it on purpose that there's no space in the signoff / commit author metadata? (I see one in your GitHub display name.)

@rbradford
Copy link
Member

@BharatNarasimman Please make sure to follow CONTRIBUTING.md and use git commit -s to add your SoB.

@BharatNarasimman BharatNarasimman force-pushed the console_sigwinch branch 2 times, most recently from cfe98e1 to d1558f1 Compare September 25, 2024 19:02
@BharatNarasimman
Copy link
Contributor Author

@BharatNarasimman Please make sure to follow CONTRIBUTING.md and use git commit -s to add your SoB.

Thanks @rbradford @alyssais . I have amended the commit.

@rbradford
Copy link
Member

@BharatNarasimman Please make sure to follow CONTRIBUTING.md and use git commit -s to add your SoB.

Thanks @rbradford @alyssais . I have amended the commit.

Thanks. But I think it should be "vmm: ..."

@BharatNarasimman
Copy link
Contributor Author

@alyssais - a question unrelated to this fix,
We seem to allow having console and serial to be configured as pty/tty and tty simultaneously but we seem to reset the console_resize_pipe that was setup during the console device configuration(say here or here) with the one setup during serial device configuration(here). Should these pipes be tracked separately?

@alyssais
Copy link
Member

Only the virtio-console device is resizable, not the serial one. At most one virtio-console device can exist, so there's never more than one resize pipe.

@BharatNarasimman
Copy link
Contributor Author

Only the virtio-console device is resizable, not the serial one. At most one virtio-console device can exist, so there's never more than one resize pipe.
Thanks @alyssais . Then I will raise a change to remove the console_resize_pipe setup for serial mode tty(here) so we dont reset the console resize pipe.

@alyssais
Copy link
Member

Yes, that does look like a bug. Thank you.

@TimePrinciple
Copy link
Member

Could you rebase your commit onto main branch and then force push, it seems inappropriate to have 0b64aba in the commit history :)

For a VM with virt-console enabled, when a reboot is requested, the
console devices are closed during the shutdown path. As part of this
the sigwinch listener process and the console resizer pipe are closed.
For the new incarnation of the VM, fresh set of console devices are
setup and a new console resizer pipe is created. The new VM should
be setup to use the newly created console devices including the console
resizer pipe.

Reading from the older console resizer pipe results in unexpected eof
error and terminates the cloud hypervisor process.

Signed-off-by: BharatNarasimman <[email protected]>
@rbradford rbradford added this pull request to the merge queue Sep 26, 2024
Merged via the queue into cloud-hypervisor:main with commit a0ae3ad Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants