dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.67k stars 3.16k forks source link

Segmentation Fault when using Microsoft.Data.Sqlite v6.0.4 in ASP.Net Core 3.1 in official Alpine 3.15 #27892

Open davejitsu opened 2 years ago

davejitsu commented 2 years ago

Segmentation Fault when using Microsoft.Data.Sqlite v6.0.4 in ASP.Net Core 3.1 in official Alpine 3.15 runtime docker image from microsoft. Downgrading the Alpine to 3.14 works. What dependencies do we need to install?

ASP.Net Core 3.1 Alpine 3.15 Microsoft.Data.Sqlite v6.0.4

docker run -it mcr.microsoft.com/dotnet/sdk:3.1-alpine3.15 dotnet --info

.NET Core SDK (reflecting any global.json):
 Version:   3.1.418
 Commit:    91fae0d634

Runtime Environment:
 OS Name:     alpine
 OS Version:  3.15
 OS Platform: Linux
 RID:         linux-musl-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.418/

Host (useful for support):
  Version: 3.1.24
  Commit:  3b38386083

.NET Core SDKs installed:
  3.1.418 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.24 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.24 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Working Alpine version

docker run -it mcr.microsoft.com/dotnet/sdk:3.1-alpine3.14 dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.418
 Commit:    91fae0d634

Runtime Environment:
 OS Name:     alpine
 OS Version:  3.14
 OS Platform: Linux
 RID:         alpine.3.14-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.418/

Host (useful for support):
  Version: 3.1.24
  Commit:  3b38386083

.NET Core SDKs installed:
  3.1.418 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.24 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.24 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
ajcvickers commented 2 years ago

@davejitsu Please try updating SQLitePCLRaw.bundle_e_sqlite3 to the latest version.

davejitsu commented 2 years ago

This was resolved by adding alpine-x64 runtime in dotnet restore and dotnet publish

image