Microsoft.Data.Sqlite 10.0.11+ fails to load on RHEL 8 (GLIBC_2.33 not found)

未关闭
#39,148 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
活跃
技术栈
csharp, linux, sqlite

调研方向

Start with the linked sqlite-glibc-repro and Program.cs line 3, then inspect Microsoft.Data.Sqlite 10.0.11's SQLitePCLRaw native asset and the related SQLitePCL.raw issue. Determine where the GLIBC_2.33 requirement enters and identify the repository's appropriate test or packaging entry point. Done means an agreed fix or documented compatibility outcome for RHEL 8, with a regression check if supported.

由索引模型根据 Issue 内容生成。

描述

area-adonet-sqlite area-external customer-reported regression
Bug description

Microsoft.Data.Sqlite 10.0.11+ doesn't work on RHEL 8, even though RHEL 8 is supported by .NET 10

Cause:

Starting with Microsoft.Data.Sqlite 10.0.11, which depends on SQLitePCLRaw 2.1.12, the bundled
linux-x64 native library libe_sqlite3.so needs a higher version of glibc than ships in RHEL 8.

RHEL 8 ships glibc 2.28 and is a supported OS for .NET 10.
So a .NET 10 servicing update of Microsoft.Data.Sqlite stops working on a supported platform.

Related SQLitePCL.raw issue: https://github.com/ericsink/SQLitePCL.raw/issues/674.

Your code
https://github.com/timothycoleman/sqlite-glibc-repro
Stack traces
Unhandled exception. System.TypeInitializationException: The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.DllNotFoundException: Unable to load shared library 'e_sqlite3' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/app/e_sqlite3.so: cannot open shared object file: No such file or directory
/lib64/libc.so.6: version `GLIBC_2.33' not found (required by /app/libe_sqlite3.so)
libe_sqlite3.so: cannot open shared object file: No such file or directory
/app/e_sqlite3: cannot open shared object file: No such file or directory
/app/libe_sqlite3: cannot open shared object file: No such file or directory

   at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
   at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
   at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
   at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
   at SQLitePCL.Batteries_V2.Init()
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Data.Sqlite.SqliteConnection..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString)
   at Program.<Main>$(String[] args) in /src/Program.cs:line 3
Microsoft.Data.Sqlite version

10.0.11

Target framework

.NET 10

Operating system

No response

主要语言
C#
星标
14.8k
派生
3.4k
平均合并
3 天 18 小时
30 天内合并 PR
159

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dotnet/efcore 的其他 Issue

查看 dotnet/efcore 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。