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

Azure Web App (Code,Linux,Net7) Error: Looking for "libimageflow.so" #634

Open
ollejacobsen opened this issue Aug 21, 2023 · 10 comments
Open

Comments

@ollejacobsen
Copy link

Hi.

We have setup an Web App on Azure. Using:

  • Publish: Code
  • Runtime stack: .NET 7 (STS)
  • OS: Linux

After publish and trying to rescale an image we get the Exception:

DllNotFoundException: Looking for "libimageflow.so" RID="linux-x64", IsUnix=True, IsDotNetCore=True RelativeSearchPath="" 
Before searching: Unable to load shared library 'imageflow' 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/site/wwwroot/imageflow.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.9/imageflow.so: cannot open shared object file: No such file or directory
/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/site/wwwroot/libimageflow.so)
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.9/libimageflow.so: cannot open shared object file: No such file or directory
/home/site/wwwroot/imageflow: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.9/imageflow: cannot open shared object file: No such file or directory
/home/site/wwwroot/libimageflow: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.9/libimageflow: cannot open shared object file: No such file or directory File not found: 
/home/site/wwwroot/x64/libimageflow.so Error "Success" (0) loading imageflow from /home/site/wwwroot/libimageflow.so File not found: 
/home/site/wwwroot/runtimes/linux-x64/native/libimageflow.so at Imageflow.Bindings.NativeMethods.imageflow_context_create(UInt32 imageflowAbiVerMajor, UInt32 imageflowAbiVerMinor) at Imageflow.Bindings.JobContextHandle.<>c.<.ctor>b__0_0() at Imageflow.Bindings.NativeLibraryLoader.FixDllNotFoundException[T](String basename, Func`1 invokingOperation, IEnumerable`1 customSearchDirectories)

The Imageflow NuGet packages the project is referencing is:

<PackageReference Include="Imageflow.AllPlatforms" Version="0.10.0" />
<PackageReference Include="Imageflow.Server" Version="0.8.1" />
<PackageReference Include="Imageflow.Server.DiskCache" Version="0.8.1" />

Should Imageflow be able to run in this simplistic setup?
Locally we are developing on both Windows and OSX without any issues.

Best regads,
Olle

@lilith
Copy link
Member

lilith commented Aug 21, 2023 via email

@ollejacobsen
Copy link
Author

Thanks for the quick reply.

I've tested with the package above with the same result.

If I SSH into the host from the Kudo console and run cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Looks that the default container for using an Azure Web App with .NET 7 in Linux is using Debian.

@lilith
Copy link
Member

lilith commented Aug 21, 2023 via email

@ollejacobsen
Copy link
Author

The build/publish is done in GitHub Actions. And the artifact is copied over to the "Debian" instance.
The job is specifying: runs-on: ubuntu-latest
And the publish step is: dotnet publish {projectname}.csproj -c Release -r linux-x64 --self-contained false
I've also tried to omit the -r flag (build for all) and also set --self-contained true. With out any luck.

@ollejacobsen
Copy link
Author

The libimageflow.so file is there and seems to be found (last row).

/home/site/wwwroot/runtimes/linux-x64/native/libimageflow.so at Imageflow.Bindings.NativeMethods.imageflow_context_create(UInt32 imageflowAbiVerMajor, UInt32 imageflowAbiVerMinor) at Imageflow.Bindings.JobContextHandle.<>c.<.ctor>b__0_0() at Imageflow.Bindings.NativeLibraryLoader.FixDllNotFoundException[T](String basename, Func`1 invokingOperation, IEnumerable`1 customSearchDirectories)

Isn't it the depencency GLIBC_2.29 that's the problem?

@lilith
Copy link
Member

lilith commented Aug 21, 2023 via email

@lilith
Copy link
Member

lilith commented Aug 22, 2023

I'm sorry, I just realized the wrapping on my phone occluded the important bit. You are correct, you have a glibc that is too old.
/lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.29' not found`

We build Imageflow on Ubuntu 20.04, the oldest Github Actions offers (and the oldest Ubuntu still patched), which uses libc 2.31-0ubuntu9.9

I'd like more info on how Azure put you on such an old platform, Buster EOL was 2022-09-10

@ollejacobsen
Copy link
Author

Exactly @lilith it seems a bit weird. I'll try to create a new Web App and check if they have updated the container.
I'll post here again when I have more info.

@bwaldron-spectrum
Copy link

I confirm the same issue with v0.10 running on a Linux Azure App Service. App services are all the default Debian, provisioned approximately a year ago, with the same host info as @ollejacobsen. I suppose workarounds are custom containers, creating fresh, or running apt-get to update glibc, but seems like either may be too much if in a production environment for most.

@lilith
Copy link
Member

lilith commented Aug 26, 2023 via email

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

No branches or pull requests

3 participants