When I build the server on my evergreen workstation with AUBSAN, it crashes with messages like the following:
{"t":{"$date":"2020-08-05T14:10:35.751+00:00"},"s":"I", "c":"RECOVERY", "id":23987, "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}} src/third_party/murmurhash3/MurmurHash3.cpp:92:49: runtime error: addition of unsigned offset to 0x7ffe6ba480d0 overflowed to 0x7ffe6ba480c0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/third_party/murmurhash3/MurmurHash3.cpp:92:49 in
I've also seen messages from Snappy. These errors are surprising, as they're in files covered by etc/ubsan.blacklist which I would expect to suppress them. On a hunch, I tried disabling ccache, and the resulting mongod binaries appear to work. I found this Github issue which appears to describe the problem: https://github.com/ccache/ccache/issues/174 It was tagged as being a part of their 3.5 epic. The version of ccache on the evergreen workstations appears to be version 3.4.1.
The SCons invokation which produced the failing binaries:
python ./buildscripts/scons.py --dbg=on --opt=on --variables-files=etc/scons/mongodbtoolchain_v3_clang.vars --allocator=system --sanitize=address,undefined --ninja=next generate-ninja MONGO_VERSION="0.0.0" MONGO_GIT_HASH="unknown" CCACHE=ccache
The corrected invokation:
python ./buildscripts/scons.py --dbg=on --opt=on --variables-files=etc/scons/mongodbtoolchain_v3_clang.vars --allocator=system --sanitize=address,undefined --ninja=next generate-ninja MONGO_VERSION="0.0.0" MONGO_GIT_HASH="unknown"