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

Run CI tests with AddressSanitizer #12216

Closed
ahrens opened this issue Jun 10, 2021 · 3 comments · Fixed by #12344 or #12928
Closed

Run CI tests with AddressSanitizer #12216

ahrens opened this issue Jun 10, 2021 · 3 comments · Fixed by #12344 or #12928
Labels
Type: Building Indicates an issue related to building binaries Type: Feature Feature request or new feature

Comments

@ahrens
Copy link
Member

ahrens commented Jun 10, 2021

Describe the feature would like to see added to OpenZFS

OpenZFS supports building the userland components (including libzpool, ztest, zdb) with AddressSanitizer support, by running ./configure --enable-asan. It would be great if the automated tests ran zloop with this flag. It might even make sense for debug builds to always use asan.

How will this feature improve OpenZFS?

Helps us find bugs sooner, pre-integration. e.g. #12215, #10193, #9706, #12339

Additional context

@ahrens ahrens added Type: Feature Feature request or new feature Type: Building Indicates an issue related to building binaries labels Jun 10, 2021
@dioni21
Copy link
Contributor

dioni21 commented Jun 13, 2021

I always try to build binaries with ASAN in my personal setup, and can say that there are lots of bugs it finds. I try to MR some.

I had trouble sometime ago when udev did not add zvol devices. Found that the problem was ASAN binaries dying during udev setup. To fix, I had to add locally to my /usr/lib/udev/zvol_id:

export ASAN_OPTIONS=halt_on_error=false:poison_heap=false:detect_leaks=false:leak_check_at_exit=false:alloc_dealloc_mismatch=false
export LSAN_OPTIONS=detect_leaks=false:leak_check_at_exit=false

Similarly, I had trouble in systemd scripts for using ASAN binaries.

@szubersk
Copy link
Contributor

szubersk commented Feb 14, 2022

@ahrens I think we can close this issue as the desired functionality was implemented in #12928

@behlendorf
Copy link
Contributor

Right, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries Type: Feature Feature request or new feature
Projects
None yet
5 participants