- Notifications
You must be signed in to change notification settings - Fork 653
Fix race condition in back2back_test for UDP multicast bus #1349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix race condition in back2back_test for UDP multicast bus #1349
Conversation
Codecov Report
@@ Coverage Diff @@ ## develop #1349 +/- ## =========================================== + Coverage 66.01% 66.12% +0.11% =========================================== Files 86 86 Lines 8960 8993 +33 =========================================== + Hits 5915 5947 +32 - Misses 3045 3046 +1 |
1ca4c83
to 3b194e5
Compare Might fail if pytest does not print stdout
3b194e5
to a830c09
Compare After three attempts, the race condition was triggered. Contrary to my initial assumption, the log output suggests that the message is returned to the receive buffer of the sender interface multiple times:
The message is sent on bus 1 and is received four times, twice on each bus. It looks like the message is looped back by the kernel the first time (timesamp A) and then bounces back over the network (timestamp B). Full log output of failing tests
|
54cee1e
to 4c3bcde
Compare Under unknown conditions the IPv6 multicast frames sent during the test are reflected back to the sender twice. This causes the test to fail. With this commit, the multicast frames sent during the test are constrained to the local interface to potentially avoid a double reception.
4c3bcde
to a6b0bea
Compare This reverts commit a830c09.
@felixdivo, @zariiii9003 |
@lumagi Thank you for taking the time to fix this! |
Add debug prints to back2back_test to analyze race condition, see #1345.
Might fail if pytest does not print stdout