All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1795100] Re: unix-domain socket unlink()ed prematurely
       [not found] <153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com>
@ 2018-12-28 15:00 ` LukeShu
  2019-01-02 14:13 ` [Qemu-devel] [Bug 1795100] Re: VNC " Dr. David Alan Gilbert
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: LukeShu @ 2018-12-28 15:00 UTC (permalink / raw)
  To: qemu-devel

This is still a problem with 3.1.0.

** Summary changed:

- unix-domain socket unlink()ed prematurely
+ VNC unix-domain socket unlink()ed prematurely

-- 
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:
  VNC 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [Bug 1795100] Re: VNC unix-domain socket unlink()ed prematurely
       [not found] <153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com>
  2018-12-28 15:00 ` [Qemu-devel] [Bug 1795100] Re: unix-domain socket unlink()ed prematurely LukeShu
@ 2019-01-02 14:13 ` Dr. David Alan Gilbert
  2019-01-14 10:53 ` Daniel Berrange
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2019-01-02 14:13 UTC (permalink / raw)
  To: qemu-devel

Added Daniel to the bug.

-- 
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:
  VNC 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [Bug 1795100] Re: VNC unix-domain socket unlink()ed prematurely
       [not found] <153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com>
  2018-12-28 15:00 ` [Qemu-devel] [Bug 1795100] Re: unix-domain socket unlink()ed prematurely LukeShu
  2019-01-02 14:13 ` [Qemu-devel] [Bug 1795100] Re: VNC " Dr. David Alan Gilbert
@ 2019-01-14 10:53 ` Daniel Berrange
  2019-01-14 11:55 ` Daniel Berrange
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: Daniel Berrange @ 2019-01-14 10:53 UTC (permalink / raw)
  To: qemu-devel

It only affects VNC, not chardevs because the chardevs fail to call
qio_channel_close() and just rely on finalize() cleaning up the open
socket. To fix this we just need to made the code conditional on it
being a listener socket

  if (qio_channel_has_feature(ioc, QIO_CHANNEL_FEATURE_LISTEN)) {
   ...
  }

-- 
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:
  VNC 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [Bug 1795100] Re: VNC unix-domain socket unlink()ed prematurely
       [not found] <153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com>
                   ` (2 preceding siblings ...)
  2019-01-14 10:53 ` Daniel Berrange
@ 2019-01-14 11:55 ` Daniel Berrange
  2019-01-25  9:59 ` Daniel Berrange
  2019-04-24  6:10 ` Thomas Huth
  5 siblings, 0 replies; 6+ messages in thread
From: Daniel Berrange @ 2019-01-14 11:55 UTC (permalink / raw)
  To: qemu-devel

Patch proposed at

https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg02774.html

-- 
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:
  VNC 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [Bug 1795100] Re: VNC unix-domain socket unlink()ed prematurely
       [not found] <153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com>
                   ` (3 preceding siblings ...)
  2019-01-14 11:55 ` Daniel Berrange
@ 2019-01-25  9:59 ` Daniel Berrange
  2019-04-24  6:10 ` Thomas Huth
  5 siblings, 0 replies; 6+ messages in thread
From: Daniel Berrange @ 2019-01-25  9:59 UTC (permalink / raw)
  To: qemu-devel

Fix merged to git master
https://git.qemu.org/?p=qemu.git;a=commit;h=feff02089113839d233e40a9bd7134241de12d1d

** Changed in: qemu
       Status: New => Fix Committed

-- 
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:
  VNC unix-domain socket unlink()ed prematurely

Status in QEMU:
  Fix Committed

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [Bug 1795100] Re: VNC unix-domain socket unlink()ed prematurely
       [not found] <153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com>
                   ` (4 preceding siblings ...)
  2019-01-25  9:59 ` Daniel Berrange
@ 2019-04-24  6:10 ` Thomas Huth
  5 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2019-04-24  6:10 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: Fix Committed => Fix Released

-- 
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:
  VNC unix-domain socket unlink()ed prematurely

Status in QEMU:
  Fix Released

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-24  6:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com>
2018-12-28 15:00 ` [Qemu-devel] [Bug 1795100] Re: unix-domain socket unlink()ed prematurely LukeShu
2019-01-02 14:13 ` [Qemu-devel] [Bug 1795100] Re: VNC " Dr. David Alan Gilbert
2019-01-14 10:53 ` Daniel Berrange
2019-01-14 11:55 ` Daniel Berrange
2019-01-25  9:59 ` Daniel Berrange
2019-04-24  6:10 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.