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

Enable Address Sanitizer in nightly builds #5696

Open
ligurio opened this issue Jan 13, 2021 · 3 comments
Open

Enable Address Sanitizer in nightly builds #5696

ligurio opened this issue Jan 13, 2021 · 3 comments
Labels
build qa Issues related to tests or testing subsystem

Comments

@ligurio
Copy link
Member

ligurio commented Jan 13, 2021

We regularly run our testsuite on binaries that built with enabled Address Sanitizer and enabling was useful - some issues were catched. Unfortunately our testsuite does not cover all user scenarios and it would be cool to provide binaries with enabled ASAN to users. It will help us to raise missed issues in Tarantool. ASAN immediately crashes executable as soon as wrong memory access detected and ASAN may downgrade overall application performance. Due to these reasons we cannot enable ASAN in released build, but enabling it in nightly build can be a compromise.

Discussed ticket with @Totktonada. He is afraid that users may use nightly builds in production and enabling ASAN may have negative impact for them. We decided to know do we have such users and estimate number of instances with nightly builds in production using Tg community chat and feedback statistics.

TBD: UBSan, Thread sanitizer.

Projects that enabled ASAN in nightly builds:

"Typical slowdown introduced by AddressSanitizer is 2x.", see https://clang.llvm.org/docs/AddressSanitizer.html

GWP-ASan: Sampling heap memory error detection in-the-wild

@ligurio ligurio added build qa Issues related to tests or testing subsystem labels Jan 13, 2021
@tsafin
Copy link
Contributor

tsafin commented Jan 18, 2021

Also it would be useful to enable ASAN testing within cartridge and tdg testing.

@ligurio
Copy link
Member Author

ligurio commented Mar 3, 2021

Also it would be useful to enable ASAN testing within cartridge and tdg testing.

Unfortunately they run tests on release builds of tarantool ee, not community tarantool builds.

@ligurio
Copy link
Member Author

ligurio commented May 14, 2021

Another option is a GWP ASAN
https://llvm.org/docs/GwpAsan.html

GWP-ASan is only capable of finding a subset of the memory issues detected by ASan. Furthermore, GWP-ASan’s bug detection capabilities are only probabilistic. As such, we recommend using ASan over GWP-ASan in testing, as well as anywhere else that guaranteed error detection is more valuable than the 2x execution slowdown/binary size bloat. For the majority of production environments, this impact is too high, and GWP-ASan proves extremely useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build qa Issues related to tests or testing subsystem
Projects
None yet
Development

No branches or pull requests

2 participants