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

Install Lua 5.4 on Container Images #1133

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xsoheilalizadeh
Copy link

@xsoheilalizadeh xsoheilalizadeh commented Mar 24, 2025

Fixes #1098

I did debug the source code and found we have following error when we run the server on a container, which I interpret it as lua54 not being installed on the container.

The error is not visible since we ignore the error in sessionScriptCache.TryLoad method.

if (!sessionScriptCache.TryLoad(this, script.ReadOnlySpan, new ScriptHashKey(digest), out var runner, out _, out var error))

Error on container

 Unable to load shared library 'lua54' 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:
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.14/lua54.so: cannot open shared object file: No such file or directory
/app/lua54.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.14/liblua54.so: cannot open shared object file: No such file or directory
/app/liblua54.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.14/lua54: cannot open shared object file: No such file or directory
/app/lua54: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.14/liblua54: cannot open shared object file: No such file or directory
/app/liblua54: cannot open shared object file: No such file or directory

I'll change the other images when we agree this is the right fix.

@badrishc badrishc requested a review from kevin-montrose March 24, 2025 14:04
@badrishc
Copy link
Collaborator

badrishc commented Mar 24, 2025

I don't see why the added Lua installation is necessary, because a docker container built with Dockerfile.alpine already has liblua54.so in the /app directory. It gets this .so file via the KeraLua NuGet package. cc @babykart

Can you login to the container and verify that the /app folder contains this library already?

@prvyk
Copy link
Contributor

prvyk commented Mar 24, 2025

Could it be this is running on Linux/ARM64?

It is known KeraLua does not include liblua54.so for that configuration...

NLua/KeraLua#91

@viniciusjarina
Copy link

KeraLua v1.4.4 should work with ARM64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility Issue with Medallion.Threading.Redis and Garnet
4 participants