Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite3 not loaded correctly on ubuntu-24.04 runner #11450

Open
2 of 16 tasks
andrerav opened this issue Jan 22, 2025 · 1 comment · May be fixed by #11455
Open
2 of 16 tasks

SQLite3 not loaded correctly on ubuntu-24.04 runner #11450

andrerav opened this issue Jan 22, 2025 · 1 comment · May be fixed by #11455

Comments

@andrerav
Copy link

Description

Using SQLite3 and spatialite on ubuntu-22.04 works, but fails on ubuntu-24.04.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

Runner image: ubuntu-24.04 version 20250105.1.0

Is it regression?

ubuntu-22.04 version 20250105.1.0

Expected behavior

I expect sqlite3 to be successfully loaded.

Actual behavior

Error Message:
OneTimeSetUp: 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 '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:
/home/runner/work/SomeProduct/SomeProduct/src/SomeVendor.SomeProduct.Data.Services.Tests/bin/Debug/net8.0/runtimes/linux-x64/native/sqlite3.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.12/sqlite3.so: cannot open shared object file: No such file or directory
/home/runner/work/SomeProduct/SomeProduct/src/SomeVendor.SomeProduct.Data.Services.Tests/bin/Debug/net8.0/sqlite3.so: cannot open shared object file: No such file or directory
/home/runner/work/SomeProduct/SomeProduct/src/SomeVendor.SomeProduct.Data.Services.Tests/bin/Debug/net8.0/runtimes/linux-x64/native/libsqlite3.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.12/libsqlite3.so: cannot open shared object file: No such file or directory
/home/runner/work/SomeProduct/SomeProduct/src/SomeVendor.SomeProduct.Data.Services.Tests/bin/Debug/net8.0/libsqlite3.so: cannot open shared object file: No such file or directory
/home/runner/work/SomeProduct/SomeProduct/src/SomeVendor.SomeProduct.Data.Services.Tests/bin/Debug/net8.0/runtimes/linux-x64/native/sqlite3: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.12/sqlite3: cannot open shared object file: No such file or directory
/home/runner/work/SomeProduct/SomeProduct/src/SomeVendor.SomeProduct.Data.Services.Tests/bin/Debug/net8.0/sqlite3: cannot open shared object file: No such file or directory
/home/runner/work/SomeProduct/SomeProduct/src/SomeVendor.SomeProduct.Data.Services.Tests/bin/Debug/net8.0/runtimes/linux-x64/native/libsqlite3: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.12/libsqlite3: cannot open shared object file: No such file or directory
/home/runner/work/SomeProduct/SomeProduct/src/SomeVendor.SomeProduct.Data.Services.Tests/bin/Debug/net8.0/libsqlite3: cannot open shared object file: No such file or directory

Repro steps

Create a .NET test project with EF Core.
Install the following packages:

  • SQLitePCLRaw.bundle_sqlite3
  • Microsoft.EntityFrameworkCore.Sqlite
  • Microsoft.EntityFrameworkCore.Sqlite.Core
  • Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite

Configure the context for SQLite.

Create one or more tests that make roundtrips to the database.

The tests will fail with the above error on ubuntu-24.04, but will work fine on ubuntu-22.04.

@kishorekumar-anchala
Copy link
Contributor

Hi @andrerav - Thank you for bringing this issue to our attention. We will look into this issue closely and will update you after investigating.

@kishorekumar-anchala kishorekumar-anchala added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Jan 22, 2025
Setland34 added a commit to Setland34/runner-images that referenced this issue Jan 23, 2025
Fixes actions#11450

Add tests for SQLite3 loading on ubuntu-24.04 runner.

* Add a test case for SQLite3 CLI in `images/ubuntu/scripts/tests/Databases.Tests.ps1` to verify the SQLite3 version.
* Add a test case for SQLite3 library loading in `images/ubuntu/scripts/tests/Databases.Tests.ps1` to check the existence of the SQLite3 shared library.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/actions/runner-images/issues/11450?shareId=XXXX-XXXX-XXXX-XXXX).
@Setland34 Setland34 linked a pull request Jan 23, 2025 that will close this issue
@kishorekumar-anchala kishorekumar-anchala removed the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants