-
Notifications
You must be signed in to change notification settings - Fork 115
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
C# crash: "HashSet capacity is too big", "System.NullReferenceException" and other HashSet errors when deploying Helm charts #1311
Comments
This is probably the line that fails: https://github.com/pulumi/pulumi/blob/848a98d5112ec93239501fd66b51c9f1f30353ac/sdk/dotnet/Pulumi/Resources/Resource.cs#L179 I would expect resources to be created sequentially, so I'm surprised to see a concurrency issue. Where does "HashSet capacity is too big" from the issue title come from? |
Here's the stack trace for
Happened when we tried to deploy the following Helm chart, but the error is intermittent: public static void DeploySeq(CustomResourceOptions k8sCustomResourceOptions, string seqDns)
{
/**
* Enable Prometheus data storage on a persistent volume claim
*/
var seqChartValues = new Dictionary<string, object>()
{
/* define Kubelet metrics scraping */
["ingress"] = new Dictionary<string, object>
{
["enabled"] = true,
["annotations"] = new Dictionary<string, string>()
{
{"kubernetes.io/ingress.class", "azure/application-gateway"},
{"appgw.ingress.kubernetes.io/appgw-ssl-certificate", "sdkbin-ssl"}
},
},
["ui"] = new Dictionary<string, object>{
["ingress"] = new Dictionary<string, object>
{
["enabled"] = true,
["hosts"] = new List<string>() { seqDns }
},
},
["persistence"] = new Dictionary<string, object>{
["enabled"] = true,
["size"] = "15Gi"
},
["cache"] = new Dictionary<string, object>{
["targetSize"] = "0.2" // use a smaller cache size https://hub.helm.sh/charts/stable/seq
},
};
var seqChart = new Chart("seq", new Pulumi.Kubernetes.Helm.ChartArgs
{
Chart = "seq",
Version = "2.3.0",
Namespace = "monitoring",
Values = seqChartValues,
FetchOptions = new ChartFetchArgs
{
Repo = "https://kubernetes-charts.storage.googleapis.com/"
},
}, new ComponentResourceOptions()
{
Provider = k8sCustomResourceOptions.Provider,
});
} |
This will be fixed in the next release (and is fixed in the dev build) |
Problem description
When deploying the following services via Helm charts (on Azure Kubernetes Service, hence why I'm using Azure Active Directory) using Pulumi 2.9.2
I run into a
NullReferenceException
during the deployment:We did not have this issue on this same branch two weeks ago - so I suspect it's related to one of the underlying NuGet packages being upgraded. The error is also intermittent - doesn't always happen.
Errors & Logs
Affected product version(s)
Pulumi 2.9.2
Pulumi.Kubernetes 2.6.0
Reproducing the issue
Suggestions for a fix
Given the intermittent error of these issues, I'd look for a race condition in the code that modifies the
HashSet<T>
, since it appears that the code writes to it before it exists.The text was updated successfully, but these errors were encountered: