Skip to content

Commit ecee02a

Browse files
veblushcopybara-github
authored andcommitted
[CI] Disabled ODR violation from ASAN (grpc#36756)
grpc#36753 has this ASAN test failure with the following error which doesn't seem to make sense. ([full log](https://btx.cloud.google.com/invocations/a587e5cc-ca1e-46ed-a3c3-199c581583db/targets)) ``` Executing tests from //test/cpp/util:grpc_tool_test@poller=epoll1 ----------------------------------------------------------------------------- ================================================================= ==15==ERROR: AddressSanitizer: odr-violation (0x7fcfa2961400): [1] size=66 'typeinfo name for google::protobuf::compiler::java::ImmutableExtensionLiteGenerator' external/com_google_protobuf/src/google/protobuf/compiler/java/lite/extension.cc in /b/f/w/bazel-out/k8-fastbuild/bin/test/cpp/util/grpc_tool_test@poller=epoll1.runfiles/com_github_grpc_grpc/test/cpp/util/../../../_solib_k8/libexternal_Scom_Ugoogle_Uprotobuf_Ssrc_Sgoogle_Sprotobuf_Scompiler_Sjava_Slite_Sliblite.so [2] size=66 'typeinfo name for google::protobuf::compiler::java::ImmutableExtensionLiteGenerator' external/com_google_protobuf/src/google/protobuf/compiler/java/lite/extension.cc in /b/f/w/bazel-out/k8-fastbuild/bin/test/cpp/util/grpc_tool_test@poller=epoll1.runfiles/com_github_grpc_grpc/test/cpp/util/../../../_solib_k8/libexternal_Scom_Ugoogle_Uprotobuf_Ssrc_Sgoogle_Sprotobuf_Scompiler_Sjava_Slite_Slibfield_Ugenerators.so These globals were registered at these points: [1]: #0 0x5626b4ea1488 in __asan_register_globals /tmp/clang-build/src/compiler-rt/lib/asan/asan_globals.cpp:369:3 #1 0x5626b4ea2559 in __asan_register_elf_globals /tmp/clang-build/src/compiler-rt/lib/asan/asan_globals.cpp:352:3 cpp-pm#2 0x7fcfa3fa4b99 (/lib64/ld-linux-x86-64.so.2+0x11b99) (BuildId: 7ae2aaae1a0e5b262df913ee0885582d2e327982) [2]: #0 0x5626b4ea1488 in __asan_register_globals /tmp/clang-build/src/compiler-rt/lib/asan/asan_globals.cpp:369:3 #1 0x5626b4ea2559 in __asan_register_elf_globals /tmp/clang-build/src/compiler-rt/lib/asan/asan_globals.cpp:352:3 cpp-pm#2 0x7fcfa3fa4b99 (/lib64/ld-linux-x86-64.so.2+0x11b99) (BuildId: 7ae2aaae1a0e5b262df913ee0885582d2e327982) ==15==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0 SUMMARY: AddressSanitizer: odr-violation: global 'typeinfo name for google::protobuf::compiler::java::ImmutableExtensionLiteGenerator' at external/com_google_protobuf/src/google/protobuf/compiler/java/lite/extension.cc in /b/f/w/bazel-out/k8-fastbuild/bin/test/cpp/util/grpc_tool_test@poller=epoll1.runfiles/com_github_grpc_grpc/test/cpp/util/../../../_solib_k8/libexternal_Scom_Ugoogle_Uprotobuf_Ssrc_Sgoogle_Sprotobuf_Scompiler_Sjava_Slite_Sliblite.so ==15==ABORTING ``` This turned out to be a known issue described at google/sanitizers#1017 and there is much to do other than disabling the ODR test. I gave a try to "-mllvm -asan-use-private-alias=1" option but it didn't change the result so I turned into this way. Closes grpc#36756 COPYBARA_INTEGRATE_REVIEW=grpc#36756 from veblush:asan-workaround 622581e PiperOrigin-RevId: 638421967
1 parent db2d775 commit ecee02a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/bazel.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ build:asan --copt=-DADDRESS_SANITIZER # used by absl
5454
build:asan --linkopt=-fsanitize=address
5555
build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always
5656
build:asan --action_env=LSAN_OPTIONS=suppressions=test/core/test_util/lsan_suppressions.txt:report_objects=1
57+
build:asan --action_env=ASAN_OPTIONS=detect_odr_violation=0 # https://github.com/google/sanitizers/issues/1017
5758

5859
build:fuzzer_asan --strip=never
5960
build:fuzzer_asan --define=grpc_build_fuzzers=true
@@ -68,6 +69,7 @@ build:fuzzer_asan --copt=-DADDRESS_SANITIZER # used by absl
6869
build:fuzzer_asan --linkopt=-fsanitize=fuzzer,address
6970
build:fuzzer_asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always
7071
build:fuzzer_asan --action_env=LSAN_OPTIONS=suppressions=test/core/test_util/lsan_suppressions.txt:report_objects=1
72+
build:fuzzer_asan --action_env=ASAN_OPTIONS=detect_odr_violation=0 # https://github.com/google/sanitizers/issues/1017
7173

7274
build:coverage --copt=-fprofile-instr-generate
7375
build:coverage --copt=-fcoverage-mapping
@@ -96,6 +98,7 @@ build:asan_macos --copt=-fno-omit-frame-pointer
9698
build:asan_macos --copt=-DGPR_NO_DIRECT_SYSCALLS
9799
build:asan_macos --linkopt=-fsanitize=address
98100
build:asan_macos --action_env=ASAN_OPTIONS=detect_leaks=0
101+
build:asan_macos --action_env=ASAN_OPTIONS=detect_odr_violation=0 # https://github.com/google/sanitizers/issues/1017
99102
build:asan_macos --dynamic_mode=off
100103

101104
build:msan --strip=never

0 commit comments

Comments
 (0)