From: Eric Blake <eblake@redhat.com>
To: Simon <qemu.bugs@whitewinterwolf.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Monitor file path length limitation
Date: Wed, 24 May 2017 10:26:58 -0500 [thread overview]
Message-ID: <2b6ca5dc-724e-49b0-1665-80f7aa82f584@redhat.com> (raw)
In-Reply-To: <6ace537dec6122d5bd07e600b9ab9b6c@whitewinterwolf.com>
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
On 05/24/2017 10:16 AM, Simon wrote:
> Hello,
>
> It seems that the monitor file path length is limited to about 100
> characters (107 to be precise).
Welcome to the joy of Unix socket (AF_UNIX) files. The kernel imposes a
hard length limit on sockaddr_un.sun_path[] (see 'man 7 unix') - and it
is indeed 107 characters plus a NUL terminator.
> -monitor
> 'unix:/home/user/vmtools/test/out/foobar.iso/foobar.iso_A/foobar.iso_B/foobar.iso_C/foobar.iso_D/foobar.iso_E/monitor.sock,server,nowait'
>
>
> With this command Qemu does not produce any warning or error message but
> create the socket file "mon" instead of the expected "monitor.sock".
Ideally, qemu should be telling you your path is too long to be created
as a unix socket, and failing up front, rather than silently truncating
and perhaps doing the wrong thing.
> Is there a clean way to work around this limitation?
Don't use longer path names than the kernel supports.
>
> As a side-note, is there any technical reason for such a limitation?
Yes, but you'll have to ask kernel folks for the reason.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2017-05-24 15:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 15:16 [Qemu-devel] Monitor file path length limitation Simon
2017-05-24 15:26 ` Eric Blake [this message]
2017-05-24 15:39 ` Simon
2017-05-24 15:42 ` Daniel P. Berrange
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=2b6ca5dc-724e-49b0-1665-80f7aa82f584@redhat.com \
--to=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu.bugs@whitewinterwolf.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).