-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-3620 Remove Valgrind tests from Evergreen #1177
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Re: Spurious ASan failures: Were you sure to disable the extra-alignment option for libbson?
Good call. Confirmed the task succeeds given |
Took the opportunity to group the |
.evergreen/run-tests-bson.sh
Outdated
else | ||
./.libs/test-libbson "--no-fork $TEST_ARGS" | ||
fi | ||
./.libs/test-libbson "--no-fork $TEST_ARGS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test-libbson
target appears to no longer exist.
This script is only called by the run tests bson
Evergreen function. run tests bson
appears unused.
Suggest removing run-tests-bson.sh
and the run tests bson
Evergreen function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. This is known and will be addressed in a separate PR along with other unused scripts/functions/tasks.
src/libbson/src/bson/bson-types.h
Outdated
@@ -127,7 +127,7 @@ typedef struct _bson_json_opts_t bson_json_opts_t; | |||
BSON_ALIGNED_BEGIN (128) typedef struct _bson_t { | |||
uint32_t flags; /* Internal flags for the bson_t. */ | |||
uint32_t len; /* Length of BSON data. */ | |||
char *canary; /* For valgrind check */ | |||
char *canary; /* For memcheck. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
char *canary; /* For memcheck. */ | |
char *canary; /* For leak sanitizer. */ |
memcheck is the tool in Valgrind. LeakSanitizer is the tool in ASAN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given we no longer use Valgrind, I was re-defining "memcheck" to simply mean "memory (leak) checks" rather than the Valgrind tool. Should tasks also be renamed to avoid using the now-inapplicable memcheck
terminology?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote yes. Maybe rename the tasks to authentication-tests-lsan
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LSAN was merged into ASAN and is automatically enabled when supported, so for consistency with test-asan-memcheck-mock-server
I think authentication-tests-asan-memcheck
would probably be most appropriate. I will also reword the comment to For leak checks.
# "$@": command and arguments to evaluate. | ||
# "$CC": compiler to use to compile and link the bypass_dlclose library. | ||
# | ||
# Evaluates the provided command and arguments with LD_PRELOAD defined to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete sentence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. Will fix.
This PR is a part of CDRIVER-3620. Verified by this patch.
Valgrind tasks regularly time out on Evergreen due to requiring over 4 hours of runtime even with "slow" tests disabled, severely limiting their value. This PR removes Valgrind from Evergreen (and relevant documentation) entirely in favor of existing ASAN/UBSAN tasks.
This results in the removal of two variants:
valgrind-ubuntu
(Valgrind Tests (Ubuntu 18.04))valgrind-ubuntu-1404
(Valgrind Tests - MongoDB (pre 4.0) (Ubuntu 14.04))And the removal of the
debug-compile-valgrind
task.The
authentication-tests-memcheck
task was redefined to useASAN
instead of Valgrind. However, GCC 7.5 on Ubuntu 18.04 was observed to fail due to incomprehensible stack-buffer-overflow, stack-use-after-return, and other miscellaneous errors that are not reproducible with Clang (even on the same environment when tested via spawn host). The task with GCC 7.5 was therefore removed on grounds of false-positive behavior (possibly this bug?). An attempt to use a newer GCC version on a newer Ubuntu distro was made but abandoned due to complications with registering/parsing certificates.To silence unhelpful
<unknown module>
leaks, the workaround previously applied specifically to mongcryptd was generalized into abypass-dlclose.sh
script which wraps a provided command withLD_PRELOAD
set appropriately. This is applied only to tests run on Evergreen; changes to the CMake configuration were deliberately avoided to prevent introducing downstream effects.