[Android, 9.0.3, LLVM] LLVM version of System.Net.Sockets.dll.so on Android ARM64 causes Azure.Storage.Blobs to malfunction

Open
#115,533 2 comments 0 reactions 1 assignee View on GitHub

@BrzVlad is already working on this.

Since Jul 16, 2025.

Assessment

This issue has not been assessed yet.

Description

area-Codegen-LLVM-mono os-android
Description

I’m developing a game called GnollHack using .NET MAUI 9.0.50 / .NET SDK 9.0.202, and it uses NuGet package called Azure.Storage.Blobs (see https://github.com/hyvanmielenpelit/GnollHack). The game and the package works just fine on iOS, Windows and also on Android when EnableLLVM is set to false or when using x64 ABI. When EnableLLVM is turned on on Android ARM64, the game works otherwise very well, except for when it tries to call a function called GetBlobContainers from Azure.Storage.Blobs, in which case the app freezes. There is no crash, just the main thread seems to freeze. If I use GetBlobContainersAsync instead, the function just does not work, but there is no freeze.

We investigated this in detail, and it turns out that LLVM version of ARM64 ABI library for System.Net.Sockets.dll.so causes the issue. If the LLVM version is changed to Mono AOT version while keeping all the other libraries LLVM compiled, the game works just fine.

We suspect that this is some sort of an LLVM code generation bug on Android ARM64.

Reproduction Steps
  1. Clone the reproduction repository at https://github.com/hyvanmielenpelit/GnollHackMAUIEasyBuild
  2. Open GnollHackM.sln solution file located at win/win32/xpl/GnollHackM in Visual Studio 2022
  3. Select Release configuration
  4. Build the solution according to instructions in the repository
  5. Start the game on your Android device by pressing Start without Debugging green arrow in Visual Studio’s toolbar
  6. Go to the game’s settings screen by pressing Settings button on the main screen
  7. Switch Record Game and Auto-Upload to Cloud on under Replays subtitle
  8. Press Play Game, and start playing
  9. Open game menu from the button in top-right corner, and select Save & Exit Game (answer ‘yes’ to any questions)
  10. The game freezes upon return to the main screen (the game tries to upload a recorded replay file to Azure)
  11. (If you switch EnableLLVM off, the game does not freeze anymore)
  12. You can also see that Azure.Storage.Blobs malfunctions by going to Vault > Replays, and changing the location in the selection dropdown list from Local to Cloud, which returns a number of directories if working, and stucks at (Loading...) if not
Expected behavior

Azure.Storage.Blobs works normally on Android ARM64 when using LLVM

Actual behavior

Using Azure.Storage.Blobs either freezes the app or generally malfunctions on Android ARM64 when using LLVM

Regression?

Not sure.

Known Workarounds

Replace the LLVM generated library for System.Net.Sockets.dll.so with the one generated by Mono AOT

Configuration

.NET 9.0.3, Android 15, ARM64

Other information

Jonathan Peppers suggested that I file the bug report here.

Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/runtime

All issues in dotnet/runtime

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.