|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 qemu-traditional] qemu: Fix race condition when opening ports
>
> Andrew Cooper writes ("[PATCH v2 qemu-traditional] qemu: Fix race
> condition when opening ports"):
> > Two Qemus can race to bind the same VNC port. It is valid for
> > multiple bind()s on the same socket to succeed, but only the first
> > listen() will succeed.
>
> I don't think this is correct. The SuS page for listen(2)
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/listen.html
> doesn't list EADDRINUSE as a possible error condition.
>
> Although wheezy's listen(2) manpage does.
>
> > In the case that two Qemus are starting at the same time, and both
> > trying to grab the next free VNC port, the second one will fail with
> > an EADDRINUSE, and bail with a fatal error which renders the domain
> functionally useless.
> >
> > In the case that listen() fails with EADDRINUSE, rebind the socket
> > again and try for the next port.
>
> My preliminary view is that this is a kernel bug.
>
> Ian.
>
My Ubuntu "man 2 listen" reports
EADDRINUSE
Another socket is already listening on the same port.
(same from http://man7.org/linux/man-pages/man2/listen.2.html)
Frediano
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |