Skip to content

Ankus 0.2.30

Choose a tag to compare

@willibrandon willibrandon released this 18 Nov 22:05
5d69c33

Ankus 0.2.30 fixes a rare crash where a process that loads an Ankus extension could abort without any message while the extension's embedded .NET runtime was starting. The runtime reads its lock tuning settings the first time two threads compete for a lock, and that can happen while the runtime is still constructing its UTF-8 encoder on the same thread. Reading those settings went through that encoder, once to look up the environment variable on Linux and macOS and once to load the runtime configuration on every platform. The encoder was not ready yet, so the process failed with SIGABRT, or fail-fast status 0xC0000602 on Windows, and wrote nothing. The runtime now reads those settings and its configuration without the encoder.

A new runtime check repeats that race in 200 fresh processes after every Linux and macOS runtime build. The previous runtime failed between a quarter and a half of them on Linux x64 and about 2 in 100 on Windows x64. The corrected runtime passed 10,000 on Linux and 3,000 on Windows. The race was seen on Linux and Windows, and the fix covers macOS, which ran the same code.

The ankus tool now uses System.CommandLine 3.0, so the error for a missing argument names the argument, and NuGet's 8.0 libraries.

The runtime and compiler packages are now 10.0.15-ankus.3 and 11.0.0-ankus.3. To update, run dotnet tool update --global Ankus.Tool --version 0.2.30, then ankus upgrade in your solution, and rebuild and redeploy your extensions. Native AOT embeds the runtime in each published library, so an extension picks up the fix only when it is rebuilt.