-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Avoid TSan reported race in run_udp_echo_server
#122187
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
Labels
Comments
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Jul 23, 2024
TSan doesn't fully recognize the synchronization via I/O, so ensure that socket name is retrieved earlier and use a different socket for sending the "STOP" message.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Jul 23, 2024
These tests fail when run under thread sanitizer due to the use of fork and threads..
kumaraditya303
pushed a commit
that referenced
this issue
Jul 25, 2024
TSan doesn't fully recognize the synchronization via I/O, so ensure that socket name is retrieved earlier and use a different socket for sending the "STOP" message.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 25, 2024
…ythonGH-122189) TSan doesn't fully recognize the synchronization via I/O, so ensure that socket name is retrieved earlier and use a different socket for sending the "STOP" message. (cherry picked from commit 2f74b70) Co-authored-by: Sam Gross <colesbury@gmail.com>
kumaraditya303
pushed a commit
that referenced
this issue
Jul 25, 2024
…H-122189) (#122263) gh-122187: Avoid TSan reported race in `run_udp_echo_server` (GH-122189) TSan doesn't fully recognize the synchronization via I/O, so ensure that socket name is retrieved earlier and use a different socket for sending the "STOP" message. (cherry picked from commit 2f74b70) Co-authored-by: Sam Gross <colesbury@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
test_asyncio.test_sock_lowlevel.py
test uses a UDP echo server:cpython/Lib/test/test_asyncio/utils.py
Lines 288 to 310 in a15fede
Thread sanitizer complains about the
sock.sendto(b'STOP', sock.getsockname())
line in the main thread happening concurrently with thesock.close()
in theecho_datagrams
thread.This seems a bit bogus to me: the
sendto
has to start before theclose
starts because it triggers theecho_datagrams
shutdown, but it's easy enough to avoid the data race. I also think it's better in this case to do a small code change to the test, instead of adding or keeping a global suppression.Linked PRs
run_udp_echo_server
#122189run_udp_echo_server
(GH-122189) #122263The text was updated successfully, but these errors were encountered: