Open mrjerryjohns opened 2 years ago
V1 review: fixes in master for this are bug fixes and would be acceptable, however this is not a V1 blocker.
This might be related: https://gitlab.gnome.org/GNOME/glib/-/issues/1672
I've done some tests of this issue and it seems that on Ubuntu 22.04 TSAN has been fixed - it no longer reports such false positives.
One can use provided simple test code to check that with different TSAN versions. Compile the test code as follows:
g++ -g -O0 test.cpp -fsanitize=thread -pthread $(pkg-config --cflags --libs glib-2.0)
On Ubuntu 22.04 I've got no errors (unless commented std::cout
line is included). However, on Ubuntu 20.04, I've got error mentioned in https://github.com/project-chip/connectedhomeip/issues/14710#issuecomment-1028551023.
Output from Ubuntu 22.04:
$ ./a.out
sharedData1 = 10
sharedData2 = 20
T: sharedData1 = 10
T: sharedData2 = 20
sharedData1 = 11
sharedData2 = 21
With our CI the problem occurs because as for now the ubuntu-latest
== ubuntu-20.04
. So, maybe we should change to use ubuntu-22.04
with workflows where TSAN is used?
Issue Scrub: @woody-apple to pin us to ubuntu-22.04 in CI. @andy31415 will help check to make sure warnings aren't being suppressed afterwards.
After more research I've found the TRUE cause of false positives. The proper answer is here: https://stackoverflow.com/a/74328089
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Problem
We have lots and lots of TSAN data race warnings on Linux that should be addressed before it results in other potentially bigger blow-ups that are more difficult to debug later.
Example: https://github.com/project-chip/connectedhomeip/runs/5039936950?check_suite_focus=true