Skip to content
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

Microsoft.Azure.Cosmos copies older vcruntime140 DLLs, creating risk of ABI breaks + crashes #4485

Open
nsgomez opened this issue May 13, 2024 · 2 comments
Assignees
Labels

Comments

@nsgomez
Copy link

nsgomez commented May 13, 2024

We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.

Describe the bug
The Microsoft.Azure.Cosmos package includes build targets to copy msvcp140.dll, vcruntime140.dll, and vcruntime140_1.dll. This causes issues for .NET Core services where the Cosmos SDK causes a downgrade of the Visual C++ runtime compared to what the machine already has installed. This has caused an ABI break when using the latest compiler headers and can cause the service to crash.

To Reproduce
See microsoft/STL#4000 - opting into enabling the constexpr mutex constructor in Visual C++ in another mixed native/managed assembly will crash the .NET runtime if the Cosmos DB SDK is copying an older runtime.

See also microsoft/STL#4338:

There was also some wailing and gnashing of teeth from folks in Microsoft who were using current headers and old libraries - an unsupported scenario - who had to fix their broken builds/processes/pipelines.

MSFT internal: One#27929579 notes that the best solution is to stop copying old DLLs and let the system update them. We're trying to do this for my team's service but can't because of the Cosmos DB SDK.

Expected behavior
Referencing the Microsoft.Azure.Cosmos package does not copy old runtime redists. The SDK should assume the runtime is already installed and being updated, or at least have an option to disable this behavior.

Actual behavior
Microsoft.Azure.Cosmos copies old runtime redists.

Environment summary
SDK Version: 3.33.0
Windows Server 2022 x64

@ealsur
Copy link
Member

ealsur commented May 21, 2024

@adityasa These DLLs are related to ServiceInterop. Do you know if they are still needed?

@adityasa
Copy link
Contributor

adityasa commented Jun 7, 2024

@ealsur I don't know off the top of my head. IIRC, these binaries are also present in the cluster image. It's not clear to what degree does the dependency apply, since service interop is a fraction of backend code running in the cluster image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants