Skip to content

Conversation

@inactive-account
Copy link
Contributor

@inactive-account inactive-account commented Dec 5, 2024

Customers who use macOS agents behind an HTTP proxy suffer from malloc-related crashes described in dotnet/runtime#97966. The crash does not happen immediately, but after a few jobs are executed by the Agent.

When an HTTP proxy is configured, the Agent code creates NetworkCredential objects to pass basic auth creds.
From stack trace posted in the above issue, it sounds like the crash happens when internal .NET networking objects are being released/disposed. That could explain why customers are able to execute a few jobs ok - the crash happens when GC kicks in.

@inactive-account inactive-account requested review from a team as code owners December 5, 2024 08:15
@inactive-account inactive-account changed the title Avoid NetworkCredential objects on macOS Avoid constructing/disposing NetworkCredential objects on macOS Dec 5, 2024
@inactive-account inactive-account changed the title Avoid constructing/disposing NetworkCredential objects on macOS Avoid constructing/disposing NetworkCredential objects on macOS machines Dec 5, 2024
@inactive-account inactive-account changed the title Avoid constructing/disposing NetworkCredential objects on macOS machines Avoid constructing NetworkCredential objects on macOS machines Dec 5, 2024
@inactive-account inactive-account marked this pull request as draft December 5, 2024 08:24
ClientCertificatePassword = cerdStore.Read($"VSTS_AGENT_CLIENT_CERT_PASSWORD_{certSetting.ClientCertPasswordLookupKey}").Password;
var avoidNetCredentialFF = AgentKnobs.AvoidNetCredentialObjectsOnMac.GetValue(HostContext).AsBoolean();
var target = $"VSTS_AGENT_CLIENT_CERT_PASSWORD_{certSetting.ClientCertPasswordLookupKey}";
ClientCertificatePassword = avoidNetCredentialFF ? cerdStore.Read2(target).Password : cerdStore.Read(target).Password;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think FF check can be removed here and directly Read2 can be used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants