solana icon indicating copy to clipboard operation
solana copied to clipboard

`test_recv_mmsg_multi_iter_timeout` fails sometimes

Open KirillLykov opened this issue 1 year ago • 0 comments

Problem

I found out that from time to time test_recv_mmsg_multi_iter_timeout fails. It happens because number of received packets is not equal to 32: https://github.com/solana-labs/solana/blob/master/streamer/src/nonblocking/recvmmsg.rs#L136

Depending on the semantics of function recv_mmsg, this failure might be due to:

  1. mistake in test -- if by design we cannot guarantee that we received all the packets that we've sent when call recv_mmsg
  2. mistake in the recv_mmsg implementation. As far as I understand there are 2 aspects: (i) readiness might be false positive, (ii) it should be checked for each of the packets in the loop. This might be resolve by using recv_from or by moving readable call inside the loop: see https://github.com/solana-labs/solana/pull/27916
  3. Or it might be platform-dependent (I've reproduced only on my mac so far)

Proposed Solution

https://github.com/solana-labs/solana/pull/27916

KirillLykov avatar Sep 19 '22 16:09 KirillLykov