Description of problem: If QEMU is set to listen on a UNIX socket: qemu-kvm -vnc unix:vnc.sock then connect with a client, disconnect & then try to connect again, the second connection will fail as the socket no longer exists $ 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 $ socat STDIO UNIX-CONNECT:vnc.sock <<<'' 2019/01/14 11:42:04 socat[24546] E connect(5, AF=1 "vnc.sock", 10): No such file or directory This is a regression in QEMU 3.0.0, as the qio_channel_socket_close method mistakenly deletes the server socket. Version-Release number of selected component (if applicable): qemu-kvm-3.1.0-4.module+el8+2681+819ab34d How reproducible: Always Steps to Reproduce: 1. qemu-kvm -vnc unix:vnc.sock 2. socat STDIO UNIX-CONNECT:vnc.sock <<<'' 3. socat STDIO UNIX-CONNECT:vnc.sock <<<'' Actual results: $ socat STDIO UNIX-CONNECT:vnc.sock <<<'' 2019/01/14 11:42:04 socat[24546] E connect(5, AF=1 "vnc.sock", 10): No such file or directory Expected results: $ socat STDIO UNIX-CONNECT:vnc.sock <<<'' RFB 003.008
I left ITR as backlog ('---') and set priority to 'medium' since it was undefined (but I may have underestimated that). Please review and adjust as needed.
https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg02774.html
Merged upstream in commit 73564c407caedf992a1c688b5fea776a8b56ba2a Author: Daniel P. Berrangé <berrange> Date: Mon Jan 14 11:33:18 2019 +0000 io: ensure UNIX client doesn't unlink server socket The qio_channel_socket_close method for was mistakenly unlinking the UNIX server socket, even if the channel was a client connection. This was not noticed with chardevs, since they never call close, but with the VNC server, this caused the VNC server socket to be deleted after the first client quit. The qio_channel_socket_close method also needlessly reimplemented the logic that already exists in socket_listen_cleanup(). Just call that method directly, for listen sockets only. This fixes a regression introduced in QEMU 3.0.0 with commit d66f78e1eaa832f73c771d9df1b606fe75d52a50 Author: Pavel Balaev <mail> Date: Mon May 21 19:17:35 2018 +0300 Delete AF_UNIX socket after close Fixes launchpad #1795100 Reviewed-by: Eric Blake <eblake> Signed-off-by: Daniel P. Berrangé <berrange>
Fix included in qemu-kvm-3.1.0-12.module+el8+2778+279c3c9e
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1293