runtime: dotnet 7 causes Segmentation fault on arm64 platforms
Description
When I’m trying to test Jellyfin with recent dotnet 7 upgrade, I noticed that the library scan would cause segfault on all arm64 platforms I’ve been tested on(Linux and macOS). When doing a library scan with lots of video files, which I have 80 in my test folder and it reliably caused the segfault).
I’ve tested x86-64 on Windows and it runs fine, which led me to believe this is an arm64 specific issue.
I also noticed that if you try to attach a dotnet debugger to the process, the segfault would gone.
What I’ve tried to workaround this so far:
- Use
COMPlus_GCName=libclrgc.so
, still segfaults - Use server gc, still segfaults
I also tried to get a coredump for the process, but it is too big to upload here. If that is needed please let me know.
Reproduction Steps
I’m sorry I cannot come up with a simpler reproduction step because it is hard for me to extract a code pattern that would cause the segfault. So I will tell you how to reproduce it with jellyfin:
- Initial account creation may not be triggered for the master branch, so I would suggest you to install a release version of Jellyfin 10.8.11, start that first, then complete the account creation step in the web UI but don’t add any library folders yet.
git clone https://github.com/jellyfin/jellyfin.git
cd jellyfin
dotnet publish --config Release
cd /Jellyfin.Server/bin/Release/net7.0
# if you are on Linux, you should mv jellyfin jellyfin-server
wget https://repo.jellyfin.org/releases/server/portable/versions/unstable/web/20231005.2/jellyfin-web_20231005.2_portable.tar.gz
tar xvf jellyfin-web_20231005.2_portable.tar.gz
mv jellyfin-web_20231005.2 jellyfin-web
# change the data-dir to the path pointed by the one created by the release version of Jellyfin 10.8.11
./jellyfin-server --datadir ~/jellyfin-data
After that, go to localhost:8096, log in with the account created by the release version, and add a media library that points to the folder containing a lot of video files. Mine are all h264 encoded in mp4 or flv containers. (You can find the option at the menu button at the top left corner. Click on Dashboard, then click on Libraries.)
You will see a segfault near the end of the Library scan.
Expected behavior
The Library scan should success.
Actual behavior
dotnet runtime segfaults.
Regression?
No response
Known Workarounds
No response
Configuration
mcr.microsoft.com/dotnet/sdk:7.0-bookworm-slim
docker image on Linux arm64
dotnet 7.0.401 on macOS 14.0 arm64
Other information
No response
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 22 (12 by maintainers)
No, upgrading to .NET 8 requires more effort than we can currently undertake. I downloaded the artifacts from Azure Pipeline in #93992 and overwrote the
libcoreclr
andlibclrjit
. I confirmed that Jellyfin no longer crashes.