lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 30 Aug 2023 16:55:59 +0800
From: Xu Kuohai <xukuohai@...weicloud.com>
To: Daniel Borkmann <daniel@...earbox.net>, bpf@...r.kernel.org,
 netdev@...r.kernel.org, John Fastabend <john.fastabend@...il.com>,
 Bobby Eshleman <bobby.eshleman@...edance.com>
Cc: Jakub Sitnicki <jakub@...udflare.com>,
 "David S . Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Alexei Starovoitov <ast@...nel.org>,
 Cong Wang <cong.wang@...edance.com>
Subject: Re: [PATCH bpf v3 3/4] selftests/bpf: fix a CI failure caused by
 vsock sockmap test

On 8/30/2023 4:10 PM, Daniel Borkmann wrote:
> Hi Xu,
> 
> On 8/4/23 9:37 AM, Xu Kuohai wrote:
>> From: Xu Kuohai <xukuohai@...wei.com>
>>
>> BPF CI has reported the following failure:
>>
>> Error: #200/79 sockmap_listen/sockmap VSOCK test_vsock_redir
>>    Error: #200/79 sockmap_listen/sockmap VSOCK test_vsock_redir
>>    ./test_progs:vsock_unix_redir_connectible:1506: egress: write: Transport endpoint is not connected
>>    vsock_unix_redir_connectible:FAIL:1506
>>    ./test_progs:vsock_unix_redir_connectible:1506: ingress: write: Transport endpoint is not connected
>>    vsock_unix_redir_connectible:FAIL:1506
>>    ./test_progs:vsock_unix_redir_connectible:1506: egress: write: Transport endpoint is not connected
>>    vsock_unix_redir_connectible:FAIL:1506
>>    ./test_progs:vsock_unix_redir_connectible:1514: ingress: recv() err, errno=11
>>    vsock_unix_redir_connectible:FAIL:1514
>>    ./test_progs:vsock_unix_redir_connectible:1518: ingress: vsock socket map failed, a != b
>>    vsock_unix_redir_connectible:FAIL:1518
>>    ./test_progs:vsock_unix_redir_connectible:1525: ingress: want pass count 1, have 0
>>
>> It’s because the recv(... MSG_DONTWAIT) syscall in the test case is
>> called before the queued work sk_psock_backlog() in the kernel finishes
>> executing. So the data to be read is still queued in psock->ingress_skb
>> and cannot be read by the user program. Therefore, the non-blocking
>> recv() reads nothing and reports an EAGAIN error.
>>
>> So replace recv(... MSG_DONTWAIT) with xrecv_nonblock(), which calls
>> select() to wait for data to be readable or timeout before calls recv().
>>
>> Fixes: d61bd8c1fd02 ("selftests/bpf: add a test case for vsock sockmap")
>> Signed-off-by: Xu Kuohai <xukuohai@...wei.com>
> 
> This is unfortunately still flaky and showing up from time to time in BPF CI, e.g. a
> very recent one can be found here:
> 
> https://github.com/kernel-patches/bpf/actions/runs/6021475685/job/16335248421
> 
> [...]
> Error: #211 sockmap_listen
> Error: #211/79 sockmap_listen/sockmap VSOCK test_vsock_redir
>    Error: #211/79 sockmap_listen/sockmap VSOCK test_vsock_redir
>    ./test_progs:vsock_unix_redir_connectible:1501: egress: write: Transport endpoint is not connected
>    vsock_unix_redir_connectible:FAIL:1501
>    ./test_progs:vsock_unix_redir_connectible:1501: ingress: write: Transport endpoint is not connected
>    vsock_unix_redir_connectible:FAIL:1501
>    ./test_progs:vsock_unix_redir_connectible:1501: egress: write: Transport endpoint is not connected
>    vsock_unix_redir_connectible:FAIL:1501
> 
> Could you continue to look into it to make the test more robust?
> 

OK, it looks like I only noticed the recv failure and ignored the
write failure. I'll take it a look.

> Thanks a lot,
> Daniel


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ