Skip to content
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

[GHA] Enable thread sanitizer #26634

Merged
merged 235 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
235 commits
Select commit Hold shift + click to select a range
bd9d53c
enabled all builds
mryzhov Sep 17, 2024
e52df37
enable pull events
mryzhov Sep 17, 2024
de8d5f3
added tsan suppresions.txt
mryzhov Sep 18, 2024
7efe4df
fixed path in the tests
mryzhov Sep 18, 2024
b9464f5
added missed sting
mryzhov Sep 18, 2024
67f5909
update suppresions
mryzhov Sep 18, 2024
c22bbaa
set additional filters
mryzhov Sep 18, 2024
cfc8ad6
ignore list
mryzhov Sep 18, 2024
15b9791
ignore onnx too
mryzhov Sep 18, 2024
9df798e
exlude tsan from configure
mryzhov Sep 19, 2024
6d47419
gcc
mryzhov Sep 20, 2024
a96a68f
removed clang
mryzhov Sep 20, 2024
7ff66e2
disable blacklist
mryzhov Sep 20, 2024
a7ddb48
Revert "disable blacklist"
mryzhov Sep 23, 2024
019a1e1
Revert "removed clang"
mryzhov Sep 23, 2024
7357ff1
Revert "gcc"
mryzhov Sep 23, 2024
ebabaae
disable onnx fe
mryzhov Sep 23, 2024
0028212
ENABLE_SYSTEM_PROTOBUF=ON
mryzhov Sep 23, 2024
922255e
fixed protobuf builds
mryzhov Sep 23, 2024
3cf2636
Revert "disable onnx fe"
mryzhov Sep 23, 2024
797d087
Revert "ENABLE_SYSTEM_PROTOBUF=ON"
mryzhov Sep 23, 2024
741a470
add condition for ENABLE_THREAD_SANITIZER
mryzhov Sep 24, 2024
a95be2c
final variant
mryzhov Sep 24, 2024
33cfdb9
revert tsan blacklist
mryzhov Sep 24, 2024
cb30a41
rerfactoring
mryzhov Sep 24, 2024
7b5d006
Apply suggestions from code review
mryzhov Sep 24, 2024
d6e8313
fixed envs
mryzhov Sep 24, 2024
82530d7
use docker images
mryzhov Sep 24, 2024
72d6bed
fixed image name
mryzhov Sep 24, 2024
4edaf39
dedicated sanitizers image
mryzhov Sep 24, 2024
edda766
ccache
mryzhov Sep 24, 2024
500346c
set CMAKE_CXX_COMPILER_LAUNCHER
mryzhov Sep 24, 2024
df243b1
fixed typo
mryzhov Sep 24, 2024
3a4f25e
changed test image
mryzhov Sep 24, 2024
46b0558
improved cache
mryzhov Sep 24, 2024
8a0d966
revert test envs
mryzhov Sep 24, 2024
44e20d3
di not cleanup build
mryzhov Sep 24, 2024
0d9b0bf
increased ccache size
mryzhov Sep 25, 2024
99c66c3
ccache size 20g
mryzhov Sep 25, 2024
6a336dd
changed steps conditionsa
mryzhov Sep 25, 2024
6e64b1c
fixed syntax
mryzhov Sep 25, 2024
e1bf7a2
use gcc10
mryzhov Sep 25, 2024
477ba9d
-revert lubsan
mryzhov Sep 25, 2024
bdaa5b0
-revert lubsan
mryzhov Sep 25, 2024
6459470
debug
mryzhov Sep 25, 2024
ebe5a4c
tmp disable tests
mryzhov Sep 25, 2024
4612d2c
check compilers
mryzhov Sep 26, 2024
044da8a
enabled tests
mryzhov Sep 26, 2024
6d56371
final flags
mryzhov Sep 27, 2024
2159fef
debug info
mryzhov Sep 27, 2024
33944fd
cleanup the ccache
mryzhov Sep 27, 2024
cacea99
reverted tests
mryzhov Sep 27, 2024
6ee42f7
sccache instead of ccache
mryzhov Sep 30, 2024
dad9e3c
change sccache prefix
mryzhov Sep 30, 2024
20802ed
sccache size 50G
mryzhov Sep 30, 2024
694373c
disabled cleanup cache steps
mryzhov Sep 30, 2024
bbe969b
Revert "disabled cleanup cache steps"
mryzhov Sep 30, 2024
c9d9555
SCCACHE_AZURE_CONNECTION_STRING
mryzhov Sep 30, 2024
612407f
diadable cache cleanup
mryzhov Oct 1, 2024
9edf0fe
test old tes image
mryzhov Oct 1, 2024
f36807c
remove commented code
mryzhov Oct 1, 2024
226d120
split jobs
mryzhov Oct 1, 2024
21d52eb
Revert "test old tes image"
mryzhov Oct 1, 2024
5d0d70a
Revert "remove commented code"
mryzhov Oct 1, 2024
b3ca8ec
install python for the tests
mryzhov Oct 2, 2024
3229506
fixed descriptions
mryzhov Oct 2, 2024
f8163ca
parallel gzip
mryzhov Oct 2, 2024
0a0055c
setup python
mryzhov Oct 2, 2024
1224783
removed fsanitize-undefined-trap-on-error
mryzhov Oct 2, 2024
b03e69d
revert test deps
mryzhov Oct 2, 2024
da99bd3
increase runner ram
mryzhov Oct 3, 2024
5ece411
fixed ub gcc build
mryzhov Oct 4, 2024
656341b
revert test deps
mryzhov Oct 4, 2024
9370ac2
clang style
mryzhov Oct 4, 2024
07aa988
all the python deps
mryzhov Oct 4, 2024
7d214ac
disabled npu
mryzhov Oct 4, 2024
4b9d9a6
enable all tests
mryzhov Oct 4, 2024
66ce10b
tsan suppressions
mryzhov Oct 4, 2024
8c6cfb8
changed TSAN_OPTIONS
mryzhov Oct 5, 2024
abea9e7
checkout tsan suppressions.txt
mryzhov Oct 5, 2024
590bf98
use relative pathes
mryzhov Oct 5, 2024
0a8197a
aligned build and test env
mryzhov Oct 5, 2024
e27232c
changed install dirs
mryzhov Oct 5, 2024
fc85153
fixed suppresions paths
mryzhov Oct 5, 2024
4607982
use full suppressions paths
mryzhov Oct 5, 2024
db0e390
suppress tbb calls
mryzhov Oct 5, 2024
394d27c
fixed race conditions
mryzhov Oct 7, 2024
4155732
revert bas 20.04 dockerfile
mryzhov Oct 7, 2024
8ef3554
removed custom python setup
mryzhov Oct 7, 2024
6b9b01a
updated tsan suppressions
mryzhov Oct 7, 2024
d812532
mutex error suppressed
mryzhov Oct 7, 2024
8b420ca
increased tests timeout
mryzhov Oct 7, 2024
abbbe4e
do not report suppressions
mryzhov Oct 7, 2024
3085f7d
race:libc
mryzhov Oct 7, 2024
f501e5e
Revert "increased tests timeout"
mryzhov Oct 8, 2024
2414f7d
try ubuntu 22
mryzhov Oct 8, 2024
4e4fe3e
added mutex guard in the tests
mryzhov Oct 9, 2024
797fa11
Revert "added mutex guard in the tests"
mryzhov Oct 10, 2024
70656d3
Exclude wheels
mryzhov Oct 10, 2024
a5ecc47
test upload artifacts as is
mryzhov Oct 10, 2024
6ff3b17
Revert "test upload artifacts as is"
mryzhov Oct 14, 2024
bd3cf49
undefined behaviour hf
mryzhov Oct 15, 2024
c235bac
removed sanitizers image
mryzhov Oct 16, 2024
4355765
enabled all builds
mryzhov Sep 17, 2024
a43e797
enable pull events
mryzhov Sep 17, 2024
53799f2
added tsan suppresions.txt
mryzhov Sep 18, 2024
180a243
fixed path in the tests
mryzhov Sep 18, 2024
10aeb75
added missed sting
mryzhov Sep 18, 2024
0de5c00
update suppresions
mryzhov Sep 18, 2024
28f626d
set additional filters
mryzhov Sep 18, 2024
01d66ff
ignore list
mryzhov Sep 18, 2024
32233be
ignore onnx too
mryzhov Sep 18, 2024
654884e
exlude tsan from configure
mryzhov Sep 19, 2024
9d246ce
gcc
mryzhov Sep 20, 2024
de25746
removed clang
mryzhov Sep 20, 2024
fe64232
disable blacklist
mryzhov Sep 20, 2024
15f6a4c
Revert "disable blacklist"
mryzhov Sep 23, 2024
11ec823
Revert "removed clang"
mryzhov Sep 23, 2024
674b01e
Revert "gcc"
mryzhov Sep 23, 2024
23eb7e5
disable onnx fe
mryzhov Sep 23, 2024
9e78d7f
ENABLE_SYSTEM_PROTOBUF=ON
mryzhov Sep 23, 2024
3e5019b
fixed protobuf builds
mryzhov Sep 23, 2024
3a34ac9
Revert "disable onnx fe"
mryzhov Sep 23, 2024
19989b3
Revert "ENABLE_SYSTEM_PROTOBUF=ON"
mryzhov Sep 23, 2024
e72ef4d
add condition for ENABLE_THREAD_SANITIZER
mryzhov Sep 24, 2024
00de711
final variant
mryzhov Sep 24, 2024
762d643
revert tsan blacklist
mryzhov Sep 24, 2024
97c9f3b
rerfactoring
mryzhov Sep 24, 2024
28f2a6e
Apply suggestions from code review
mryzhov Sep 24, 2024
9baee16
fixed envs
mryzhov Sep 24, 2024
f077a56
use docker images
mryzhov Sep 24, 2024
bca3287
fixed image name
mryzhov Sep 24, 2024
9e93768
dedicated sanitizers image
mryzhov Sep 24, 2024
94497ac
ccache
mryzhov Sep 24, 2024
601541d
set CMAKE_CXX_COMPILER_LAUNCHER
mryzhov Sep 24, 2024
b77d649
fixed typo
mryzhov Sep 24, 2024
a41138f
changed test image
mryzhov Sep 24, 2024
ff4755e
improved cache
mryzhov Sep 24, 2024
17502d6
revert test envs
mryzhov Sep 24, 2024
0048061
di not cleanup build
mryzhov Sep 24, 2024
93860bf
increased ccache size
mryzhov Sep 25, 2024
7fe86c4
ccache size 20g
mryzhov Sep 25, 2024
e2155b4
changed steps conditionsa
mryzhov Sep 25, 2024
fc30e17
fixed syntax
mryzhov Sep 25, 2024
230fda0
use gcc10
mryzhov Sep 25, 2024
754f34b
-revert lubsan
mryzhov Sep 25, 2024
fa34c1b
-revert lubsan
mryzhov Sep 25, 2024
f263896
debug
mryzhov Sep 25, 2024
f8cc551
tmp disable tests
mryzhov Sep 25, 2024
c1f0c2b
check compilers
mryzhov Sep 26, 2024
fcb4430
enabled tests
mryzhov Sep 26, 2024
10f2607
final flags
mryzhov Sep 27, 2024
3622d0a
debug info
mryzhov Sep 27, 2024
149ef26
cleanup the ccache
mryzhov Sep 27, 2024
78325f9
reverted tests
mryzhov Sep 27, 2024
81c107c
sccache instead of ccache
mryzhov Sep 30, 2024
d18b882
change sccache prefix
mryzhov Sep 30, 2024
67cee18
sccache size 50G
mryzhov Sep 30, 2024
062e997
disabled cleanup cache steps
mryzhov Sep 30, 2024
bd370b8
Revert "disabled cleanup cache steps"
mryzhov Sep 30, 2024
129d04f
SCCACHE_AZURE_CONNECTION_STRING
mryzhov Sep 30, 2024
1d00dbb
diadable cache cleanup
mryzhov Oct 1, 2024
135fe3f
test old tes image
mryzhov Oct 1, 2024
26ce846
remove commented code
mryzhov Oct 1, 2024
b554052
split jobs
mryzhov Oct 1, 2024
4524dbb
Revert "test old tes image"
mryzhov Oct 1, 2024
1b07385
Revert "remove commented code"
mryzhov Oct 1, 2024
2552dae
install python for the tests
mryzhov Oct 2, 2024
c1e6d02
fixed descriptions
mryzhov Oct 2, 2024
117e1e0
parallel gzip
mryzhov Oct 2, 2024
ce52b23
setup python
mryzhov Oct 2, 2024
2525af4
removed fsanitize-undefined-trap-on-error
mryzhov Oct 2, 2024
f31cb17
revert test deps
mryzhov Oct 2, 2024
1492fe4
increase runner ram
mryzhov Oct 3, 2024
193a2a2
fixed ub gcc build
mryzhov Oct 4, 2024
e47a643
revert test deps
mryzhov Oct 4, 2024
67c1d6a
clang style
mryzhov Oct 4, 2024
becc409
all the python deps
mryzhov Oct 4, 2024
8f51388
disabled npu
mryzhov Oct 4, 2024
9776d95
enable all tests
mryzhov Oct 4, 2024
0297d59
tsan suppressions
mryzhov Oct 4, 2024
2814c18
changed TSAN_OPTIONS
mryzhov Oct 5, 2024
d7daa17
checkout tsan suppressions.txt
mryzhov Oct 5, 2024
37b8bfd
use relative pathes
mryzhov Oct 5, 2024
7eba2cc
aligned build and test env
mryzhov Oct 5, 2024
236afed
changed install dirs
mryzhov Oct 5, 2024
eb962b8
fixed suppresions paths
mryzhov Oct 5, 2024
6fd1e75
use full suppressions paths
mryzhov Oct 5, 2024
d049db5
suppress tbb calls
mryzhov Oct 5, 2024
c366d97
fixed race conditions
mryzhov Oct 7, 2024
469de9d
removed custom python setup
mryzhov Oct 7, 2024
58300ff
updated tsan suppressions
mryzhov Oct 7, 2024
2b4b918
mutex error suppressed
mryzhov Oct 7, 2024
2e853dd
increased tests timeout
mryzhov Oct 7, 2024
87ed4e6
do not report suppressions
mryzhov Oct 7, 2024
25e5543
race:libc
mryzhov Oct 7, 2024
3c5b515
Revert "increased tests timeout"
mryzhov Oct 8, 2024
02ddbb0
try ubuntu 22
mryzhov Oct 8, 2024
1df4be0
added mutex guard in the tests
mryzhov Oct 9, 2024
2f7e000
Revert "added mutex guard in the tests"
mryzhov Oct 10, 2024
50cdb7c
Exclude wheels
mryzhov Oct 10, 2024
25896e8
test upload artifacts as is
mryzhov Oct 10, 2024
1e2a859
Revert "test upload artifacts as is"
mryzhov Oct 14, 2024
975e75d
undefined behaviour hf
mryzhov Oct 15, 2024
935f2c1
removed sanitizers image
mryzhov Oct 16, 2024
f57ef76
Merge branch 'gha/sanitizers' of https://github.com/mryzhov/openvino …
mryzhov Oct 16, 2024
77883bb
skipped tests
mryzhov Oct 16, 2024
0d87bb9
one more test skipped
mryzhov Oct 16, 2024
85d84fc
skiped onnx tests
mryzhov Oct 16, 2024
21704fc
added exclude filters
mryzhov Oct 16, 2024
c8e657d
added suite to the test filter
mryzhov Oct 16, 2024
ca37263
disabled tests in build
mryzhov Oct 17, 2024
db8b545
Revert "disabled tests in build"
mryzhov Oct 17, 2024
ae39464
skip tests during the build
mryzhov Oct 17, 2024
3451b05
revert docker tag
mryzhov Oct 17, 2024
12cdc58
Merge branch 'master' into gha/sanitizers
mryzhov Oct 17, 2024
148a527
clang format
mryzhov Oct 17, 2024
8db782c
Merge branch 'gha/sanitizers' of https://github.com/mryzhov/openvino …
mryzhov Oct 17, 2024
1656b95
clang format (tabs)
mryzhov Oct 17, 2024
3c44e9a
reset dev changes
mryzhov Oct 17, 2024
04862c5
reset docker tag
mryzhov Oct 17, 2024
c296b04
Merge branch 'gha/sanitizers' of https://github.com/mryzhov/openvino …
mryzhov Oct 17, 2024
f214e24
removed docker_tag
mryzhov Oct 17, 2024
da37abf
clang code style
mryzhov Oct 17, 2024
5025eba
added skipping comments
mryzhov Oct 17, 2024
9759603
clang style
mryzhov Oct 17, 2024
270dd7e
disable tests in ci
mryzhov Oct 17, 2024
a5a384c
revert skipping the tests themselves
mryzhov Oct 17, 2024
7434e73
Revert "revert skipping the tests themselves"
mryzhov Oct 17, 2024
dce5eb2
added ticket for onnx tests
mryzhov Oct 17, 2024
f7f2ff2
Merge branch 'master' into gha/sanitizers
mryzhov Oct 17, 2024
4737db2
remove test triggers
mryzhov Oct 18, 2024
7e1a23d
Merge branch 'gha/sanitizers' of https://github.com/mryzhov/openvino …
mryzhov Oct 18, 2024
08e1200
Merge branch 'master' into gha/sanitizers
mryzhov Oct 18, 2024
d097b07
Merge branch 'master' into gha/sanitizers
mryzhov Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
234 changes: 122 additions & 112 deletions .github/workflows/linux_sanitizers.yml

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions cmake/developer_package/compile_flags/sanitizer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (ENABLE_SANITIZER)
"https://github.com/openvinotoolkit/openvino/wiki/AddressSanitizer-and-LeakSanitizer")
endif()
elseif(OV_COMPILER_IS_CLANG)
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fsanitize=address -fsanitize-blacklist=${OpenVINO_SOURCE_DIR}/tests/asan/ignore.txt")
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fsanitize=address -fsanitize-blacklist=${OpenVINO_SOURCE_DIR}/tests/sanitizers/asan/ignore.txt")
if(BUILD_SHARED_LIBS)
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -shared-libasan")
endif()
Expand All @@ -27,7 +27,7 @@ if (ENABLE_SANITIZER)
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fsanitize-recover=address")
endif()

set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -fsanitize=address -fsanitize-blacklist=${OpenVINO_SOURCE_DIR}/tests/asan/ignore.txt")
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -fsanitize=address -fsanitize-blacklist=${OpenVINO_SOURCE_DIR}/tests/sanitizers/asan/ignore.txt")
if(BUILD_SHARED_LIBS)
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -shared-libasan")
endif()
Expand Down Expand Up @@ -89,7 +89,11 @@ if(ENABLE_THREAD_SANITIZER)
message(FATAL_ERROR "Thread sanitizer is not supported in Windows with MSVC compiler. Please, use clang-cl or mingw")
elseif(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fsanitize=thread")
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -fsanitize=thread")
if(OV_COMPILER_IS_CLANG)
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -ltsan")
else()
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -fsanitize=thread")
endif()
else()
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "exception.hpp"
#include "openvino/core/any.hpp"
#include "openvino/frontend/node_context.hpp"
#include "openvino/frontend/tensorflow/visibility.hpp"
#include "variable.hpp"
#include "variables_map.hpp"

Expand All @@ -18,7 +19,7 @@ class TranslateSession;

/// Keep necessary data for a single node in the original FW graph to facilitate
/// conversion process in the rules code.
class NodeContext : public ov::frontend::NodeContext {
class TENSORFLOW_API NodeContext : public ov::frontend::NodeContext {
public:
using Ptr = std::shared_ptr<NodeContext>;
NodeContext(const std::shared_ptr<DecoderBase>& decoder,
Expand Down
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions tests/sanitizers/tsan/suppressions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (C) 2018-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

# This is a ThreadSanitizer (TSan) suppression file which provides a default
# configuration for the builds with -DENABLE_SANITIZER=ON.
# More information about LSan suppressions on
# https://github.com/google/sanitizers/wiki/threadsanitizersuppressions

# race conditions from thirdparty libs
race:libtbb
mutex:libtbb
race:libhwloc
# race conditions from std libs
race:libstdc++
race:libc
9 changes: 9 additions & 0 deletions thirdparty/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,15 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND
endif()
else()
add_subdirectory(thirdparty/protobuf EXCLUDE_FROM_ALL)
# protobuf fails to build with -fsanitize=thread by clang
if(ENABLE_THREAD_SANITIZER AND OV_COMPILER_IS_CLANG)
foreach(proto_target protoc libprotobuf libprotobuf-lite)
if(TARGET ${proto_target})
target_compile_options(${proto_target} PUBLIC -fno-sanitize=thread)
target_link_options(${proto_target} PUBLIC -fno-sanitize=thread)
endif()
endforeach()
endif()
endif()

# forward additional variables used in the other places
Expand Down
Loading