[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V1 24/32] ui: save/restore vnc socket fds
From: |
Steven Sistare |
Subject: |
Re: [PATCH V1 24/32] ui: save/restore vnc socket fds |
Date: |
Fri, 31 Jul 2020 12:51:51 -0400 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 7/31/2020 5:06 AM, Daniel P. Berrangé wrote:
> On Thu, Jul 30, 2020 at 08:14:28AM -0700, Steve Sistare wrote:
>> From: Mark Kanda <mark.kanda@oracle.com>
>>
>> Iterate through the VNC displays and save/restore the socket fds.
>
> This patch doesn't appear to do anything around the client state, so I
> can't see how this will work in general. eg QEMU is 1/2 way through
> receiving a message from the client, and we trigger re-exec.
>
> The new QEMU is going to startup considering the VNC client is in an
> idle state, and will then read the 2nd 1/2 of the message off the
> client socket. Everything will go rapidly downhill from there.
> Or the reverse, the server has sent a message, but this outbound
> message is still in the buffer and only been partially sent on the
> wire. We re'exec and now we've lost the unsent part of the buffer.
Yes. For partial messages in qemu object buffers, we need to add a draining
phase
between exec-requested and exec, and complete all partial messages.
For kernel socket buffers, we should be OK. If we are accurately preserving vnc
server state (which is the intent), then we can correctly respond to any client
reqwuests that were sent to us pre-exec but read into qemu post-exec.
However, there is another icky issue with vnc. It only works reliably with raw
encoding. Compressed streams accumulate state on the client side which ww
cannot
match on the server when we create a new zlib stream after exec. The vnc
protocol
defines a per-stream reset flag in the compression control word, which sounds
like it
should reset zlib state, but it does not for tigervnc. I have not tried other
clients.
vnc is one of the tricker patches in this series. It may be wisest to close
the connection
and require the client to reconnect. The virtual framebuffer is preserved, so
the same content
will be shown after reconnect.
- Steve
- [PATCH V1 15/32] vl: QEMU_START_FREEZE env var, (continued)
- [PATCH V1 15/32] vl: QEMU_START_FREEZE env var, Steve Sistare, 2020/07/30
- [PATCH V1 16/32] oslib: add qemu_clr_cloexec, Steve Sistare, 2020/07/30
- [PATCH V1 17/32] util: env var helpers, Steve Sistare, 2020/07/30
- [PATCH V1 20/32] vl: add helper to request re-exec, Steve Sistare, 2020/07/30
- [PATCH V1 22/32] char: qio_channel_socket_accept reuse fd, Steve Sistare, 2020/07/30
- [PATCH V1 28/32] char: restore terminal on restart, Steve Sistare, 2020/07/30
- [PATCH V1 29/32] pci: export pci_update_mappings, Steve Sistare, 2020/07/30
- [PATCH V1 25/32] char: save/restore chardev pty fds, Steve Sistare, 2020/07/30
- [PATCH V1 24/32] ui: save/restore vnc socket fds, Steve Sistare, 2020/07/30
- [PATCH V1 31/32] vfio-pci: trace pci config, Steve Sistare, 2020/07/30
- [PATCH V1 02/32] savevm: VM handlers mode mask, Steve Sistare, 2020/07/30
- [PATCH V1 05/32] savevm: QMP command for cprload, Steve Sistare, 2020/07/30
- [PATCH V1 09/32] savevm: prevent cprsave if memory is volatile, Steve Sistare, 2020/07/30
- [PATCH V1 19/32] memory: ram_block_add cosmetic changes, Steve Sistare, 2020/07/30
- [PATCH V1 18/32] osdep: import MADV_DOEXEC, Steve Sistare, 2020/07/30
- [PATCH V1 21/32] exec, memory: exec(3) to restart, Steve Sistare, 2020/07/30
- [PATCH V1 13/32] gdbstub: gdb support for suspended state, Steve Sistare, 2020/07/30