[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: netdev-socket test hang (s390 host, mips64el guest, backtrace)
From: |
Peter Maydell |
Subject: |
Re: netdev-socket test hang (s390 host, mips64el guest, backtrace) |
Date: |
Thu, 13 Apr 2023 13:05:12 +0100 |
On Thu, 13 Apr 2023 at 11:50, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> I just found a hung netdev-socket test on our s390 CI runner.
> Looks like a deadlock, no processes using CPU.
> Here's the backtrace; looks like both QEMU processes are sat
> idle but the test process is sat waiting forever for something
> in test_stream_inet_reconnect(). Any ideas?
May well not be related, but I think there's a race condition
in this test's inet_get_free_port() code. The code tries
to find a free port number by creating a socket, looking
at what port it is bound to, and then closing the socket.
If there are several copies of this test running at once
(as is plausible in a 'make -j8' setup), then you can
get an interleaving:
test 1 test 2
find a port number
close the socket
find a port number
(get the same number as test 1)
close the socket
use port number for test
use port number for test
(fail because of test 1)
thanks
-- PMM