[CDRIVER-3317] Replace valgrind variant with Memory Sanitizer Created: 14/Aug/19  Updated: 28/Oct/23  Resolved: 20/Jan/23

Status: Closed
Project: C Driver
Component/s: libmongoc, tests
Affects Version/s: None
Fix Version/s: 1.24.0

Type: Task Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Ezra Chung
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-3680 Valgrind OpenSSL tasks take over thre... Closed
is related to SERVER-25689 Add Memory Sanitizer builds to Evergreen Backlog
is related to CDRIVER-3620 Audit evergreen matrix Closed
Epic Link: CDRIVER-2733

 Description   

The current valgrind variant is sometimes timing out (e.g. taking over 2 hours). That seems wrong. If that truly is how long it takes, then we should consider if it's worth the evergreen time, or if we can speed it up somehow.

ASAN covers everything valgrind checks for aside from uninitialized reads, which MSAN covers (according to this table: https://github.com/google/sanitizers/wiki/AddressSanitizerComparisonOfMemoryTools). And the Valgrind task has caught uninitialized reads before, e.g. this patch. But adding MSAN should warrant removing our Valgrind variant (which currently only runs once a week).

The biggest hurdle with MSAN seems to be that all dependent libraries (aside from libc) need to be recompiled with MSAN enabled (according to https://clang.llvm.org/docs/MemorySanitizer.html#handling-external-code). Sure enough, some initial testing verifies that OpenSSL triggers lots of false positives.



 Comments   
Comment by Ezra Chung [ 20/Jan/23 ]

Marking as fixed given current Evergreen configuration has widespread ASAN-enabled test coverage and Valgrind tasks have since been removed.

Comment by Ezra Chung [ 20/Jan/23 ]

PR: https://github.com/mongodb/mongo-c-driver/pull/1177
Commit: https://github.com/mongodb/mongo-c-driver/commit/c796edd584d7e49bbe165dc1a25e8f7a344009ce

Comment by Githook User [ 12/Dec/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3317 fix valgrind variant; skip slow tests
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/4e5c465e9273213161a66903b35927ff563c6599

Generated at Wed Feb 07 21:17:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.