summary refs log tree commit diff stats
path: root/results/scraper/launchpad-without-comments/1795100
blob: 478567c55b27e3686fa6e0b2cc51e7532b43332b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
VNC unix-domain socket unlink()ed prematurely

With qemu 3.0.0 (I don't believe this happened with previous
versions), if I tell it `-vnc unix:/path/to/vnc.sock`, qemu will
unlink() that file when the first client disconnects, meaning that
once I disconnect, I can't ever reconnect without restarting the VM.

A stupid testcase demonstrating the issue:

In terminal A:

    $ qemu-system-x86_64 -vnc unix:$PWD/vnc.sock

In terminal B:

    $ ls vnc.sock
    vnc.sock
    $ socat STDIO UNIX-CONNECT:vnc.sock <<<''
    RFB 003.008
    $ ls vnc.sock
    ls: cannot access 'vnc.sock': No such file or directory

I have determined that the offending unlink() call is the one in
io/channel-socket.c:qio_channel_socket_close().  That call was first
introduced in commit d66f78e1eaa832f73c771d9df1b606fe75d52a50, which
first appeared in version 3.0.0.

This type of premature unlink() does not happen on monitor.sock with
`-monitor unix:/path/to/monitor.sock,server,nowait`.

I am not familiar enough with the QIO subsystem to suggest a fix that
fixes VNC, but preserves the QMP fix targeted in the offending commit.