From: Daniel Berrange <1795100@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1795100] Re: VNC unix-domain socket unlink()ed prematurely
Date: Mon, 14 Jan 2019 10:53:29 -0000 [thread overview]
Message-ID: <154746320989.20384.17728890769906581562.malone@soybean.canonical.com> (raw)
In-Reply-To: 153818746845.29396.3425570709275982365.malonedeb@soybean.canonical.com
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
next prev parent reply other threads:[~2019-01-14 11:05 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 ` [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 [this message]
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=154746320989.20384.17728890769906581562.malone@soybean.canonical.com \
--to=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.