[SERVER-18893] Re-enable ASan coverage support Created: 09/Jun/15  Updated: 05/Feb/16  Resolved: 21/Jan/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.1.4
Fix Version/s: 3.3.1

Type: Improvement Priority: Minor - P4
Reporter: Kamran K. Assignee: Robert Guo (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-18597 Add support for dumping ASan code cov... Closed
Backwards Compatibility: Fully Compatible
Sprint: TIG E (01/08/16), TIG F (01/29/16)
Participants:

 Description   

ASan coverage support was added in SERVER-18597. It's causing issues with ASan patch builds, so it's being disabled for now.

For example, after running jstests/aggregation/bugs/cond.js, this check failed:

==16845==AddressSanitizer CHECK failed: /build/buildd/llvm-toolchain-3.4-3.4/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.h:323 "((initial_capacity)) > ((0))" (0x0, 0x0)
[js_test:cond] ==16870==AddressSanitizer CHECK failed: /build/buildd/llvm-toolchain-3.4-3.4/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.h:323 "((initial_capacity)) > ((0))" (0x0, 0x0)
[js_test:cond]     #0 0x71713f in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/data/mci/src/mongo+0x71713f)
[js_test:cond]     #1 0x71c9a1 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/data/mci/src/mongo+0x71c9a1)
[js_test:cond]     #2 0x71d8c2 in __sanitizer::CovDump() (/data/mci/src/mongo+0x71d8c2)
[js_test:cond]     #3 0xe1541c in mongo::quickExit(int) /data/mci/src/src/mongo/util/quick_exit.cpp:76
[js_test:cond]     #4 0x742501 in main /data/mci/src/src/mongo/shell/dbshell.cpp:923
[js_test:cond]     #5 0x7f8e37fa7ec4 (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4)
[js_test:cond]     #6 0x72727c in _start (/data/mci/src/mongo+0x72727c)
[js_test:cond] 
    #0 0x9a185f in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/data/mci/src/mongod+0x9a185f)
    #1 0x9a70c1 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/data/mci/src/mongod+0x9a70c1)
    #2 0x9a7fe2 in __sanitizer::CovDump() (/data/mci/src/mongod+0x9a7fe2)
    #3 0x2a59e7c in mongo::quickExit(int) /data/mci/src/src/mongo/util/quick_exit.cpp:76
    #4 0x1526acf in mongo::dbexit(mongo::ExitCode, char const*) /data/mci/src/src/mongo/db/instance.cpp:1352
    #5 0x15257bd in mongo::exitCleanly(mongo::ExitCode) /data/mci/src/src/mongo/db/instance.cpp:1335
    #6 0x2a5d98a in mongo::(anonymous namespace)::signalProcessingThread() /data/mci/src/src/mongo/util/signal_handlers.cpp:184
    #7 0x2b35566 in boost::(anonymous namespace)::thread_proxy(void*) /data/mci/src/src/third_party/boost-1.56.0/libs/thread/src/pthread/thread.cpp:173
    #8 0x7f45c9f00181 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8181)
    #9 0x7f45c971347c (/lib/x86_64-linux-gnu/libc.so.6+0xfa47c)



 Comments   
Comment by Githook User [ 21/Jan/16 ]

Author:

{u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}

Message: SERVER-18893 re-enable ASan coverage support
Branch: master
https://github.com/mongodb/mongo/commit/35d64612e0e5398611e967c6003c29dee67c1ff6

Comment by Robert Guo (Inactive) [ 20/Jan/16 ]

patch build without changing compile flags: https://evergreen.mongodb.com/version/569fcb113ff122571e0003bb_0

Comment by Robert Guo (Inactive) [ 11/Jan/16 ]

patch build: https://evergreen.mongodb.com/version/5693d14e3ff1226ec00000bc_0

Comment by Kamran K. [ 04/Jan/16 ]

For now, we can enable support for gathering coverage data and then figure out how to use the data in Evergreen later.

We should verify that all test suites (not just the aggregation one) pass when the build contains ASan coverage support, too.

Comment by Robert Guo (Inactive) [ 30/Dec/15 ]

the aggregation suite is passing on clang-35 after applying the patch from SERVER-18597.
https://evergreen.mongodb.com/task/mongodb_mongo_master_ubuntu1410_debug_asan_aggregation_b45dba8425b49714c5ca1394aba0bb97029c2560_15_12_30_17_56_00

We can commit this but we're not gathering coverage data when SCONS isn't passed the "asan-coverage" flag. Also, the output is not being uploaded to Evergreen.

As a next step, do we want to just add the flags and upload the coverage file for each suite in the existing ASAN tasks? Or add a new variant or task dedicated for ASAN coverage?

Generated at Thu Feb 08 03:49:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.