All of lore.kernel.org
 help / color / mirror / Atom feed
From: LukeShu <lukeshu@lukeshu.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1795100] Re: unix-domain socket unlink()ed prematurely
Date: Fri, 28 Dec 2018 15:00:08 -0000	[thread overview]
Message-ID: <154600920899.26182.8813360720812578961.malone@chaenomeles.canonical.com> (raw)
In-Reply-To: 153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com

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

       reply	other threads:[~2018-12-28 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com>
2018-12-28 15:00 ` LukeShu [this message]
2019-01-02 14:13 ` [Qemu-devel] [Bug 1795100] Re: VNC unix-domain socket unlink()ed prematurely 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=154600920899.26182.8813360720812578961.malone@chaenomeles.canonical.com \
    --to=lukeshu@lukeshu.com \
    --cc=1795100@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.