qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Monitor file path length limitation


From: Eric Blake
Subject: Re: [Qemu-devel] Monitor file path length limitation
Date: Wed, 24 May 2017 10:26:58 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

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: signature.asc
Description: OpenPGP digital signature


reply via email to

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