qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 1795100] [NEW] unix-domain socket unlink()ed premature


From: LukeShu
Subject: [Qemu-devel] [Bug 1795100] [NEW] unix-domain socket unlink()ed prematurely
Date: Sat, 29 Sep 2018 02:17:48 -0000

Public bug reported:

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.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1795100

Title:
  unix-domain socket unlink()ed prematurely

Status in QEMU:
  New

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1795100/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]