Our team trains and applies various ML models by using ML.NET.
Some scenarios use onnx through Microsoft.ML.OnnxRuntime nuget package.
Recently we’ve started moving our services to Azure Kubernetes (AKS) were we see that initialization calls to ApplyOnnxModel consistently hang for all models.
Configuration
- Microsoft.ML version 1.7.1 packages
- Microsoft.ML.OnnxRuntime.Managed and Microsoft.ML.OnnxRuntime version 1.10 packages (for compatibility with services on the previous platform)
- The container is based on image from mcr.microsoft.com/dotnet/aspnet:6.0 - Debian GNU/Linux 11 (bullseye)
- From what I see AKS host OS is Ubuntu 18.04.6 LTS (Bionic Beaver)
- UTF-8 locale is configured through Dockerfile.
Without locale configuration an error message in onnxruntime was traced.
The initialization hangs somewhere inside libonnxruntime.so code.
Managed code call stack

Our team trains and applies various ML models by using ML.NET.
Some scenarios use onnx through Microsoft.ML.OnnxRuntime nuget package.
Recently we’ve started moving our services to Azure Kubernetes (AKS) were we see that initialization calls to ApplyOnnxModel consistently hang for all models.
Configuration
Without locale configuration an error message in onnxruntime was traced.
The initialization hangs somewhere inside libonnxruntime.so code.
Managed code call stack
