[SERVER-84739] Antithesis {A,UB}SAN build fails to run mongod --version Created: 10/Jan/24  Updated: 25/Jan/24  Resolved: 25/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 8.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Ryan Berryhill Assignee: Ryan Berryhill
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2024-01-22, Service Arch 2024-02-05
Participants:

 Description   

Since SERVER-82640, the {A,UB}SAN antithesis build has been broken. This is because we try to run `mongod --version` during `compile_dist_test` and it fails due to the sanitizer runtime not being found.

This happens because the `-shared-libsan` option doesn't make the linker set up the `RPATH` or any other means for the binary to find the runtime. Currently, we get around this using some magic in the Dockerfile.

Instead, we should make it so the build is aware of the shared sanitizer configuration (via an option to `scons.py`). The option would set up all of the compile and link flags (instead of how we manually add them to `LINKFLAGS` and `CCFLAGS`) and use `AutoInstall` to install the system libraries to the library install directory. A similar example is how we do the VC++ redistributable install under windows.



 Comments   
Comment by Githook User [ 25/Jan/24 ]

Author:

{'name': 'Ryan Berryhill', 'email': 'ryanberryhill@users.noreply.github.com', 'username': 'ryanberryhill'}

Message: SERVER-84739 add --shared-libsan option for scons.py (#18059)

GitOrigin-RevId: 8dde3bdc60581c0b2b156fc7abb88ae45f0f6b9a
Branch: master
https://github.com/mongodb/mongo/commit/1794fcc1dafc4dc146f9df10cb20c8b043bfb4ff

Generated at Thu Feb 08 06:55:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.