[CRIU] [PATCH] unix: wait for listen() as well as bind()

Pavel Emelyanov xemul at parallels.com
Thu Jul 16 04:25:49 PDT 2015


On 07/15/2015 05:46 PM, Andrew Vagin wrote:
> On Wed, Jul 15, 2015 at 07:06:25AM -0600, Tycho Andersen wrote:
>> We need to wait for listen() as well as bind() for internal unix sockets, or we
>> can race like this:
>>
>> (00.135950)      1: Opening standalone socket (id 0xb ino 0x9422f peer 0)
>> (00.135974)    353: Error (sk-unix.c:701): Can't connect 0x947c4 socket: Connection refused
>> (00.136390)      1: Error (cr-restore.c:1228): 353 exited, status=1
>> (00.136407)      1:  Putting 0x9422f into listen state
>>
>> (where 0x9422f is the peer for 0x947c4)
>>
>> This race was pretty rare for me, but I've run 1000 tests and it didn't
>> happen so hopefully this patch fixes it :)
>>
> 
> Acked-by: Andrew Vagin <avagin at odin.com> 
>> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>

Applied, thanks!



More information about the CRIU mailing list