-
-
Notifications
You must be signed in to change notification settings - Fork 604
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
Strange application behaviour difference between host and unikernel #1185
Comments
Hi, I am not very familiar with the app. But after I ran OSv with the trace enabled to see how it interacts with the filesystem I could see this:
So the app clearly tried to look for The solution was quite simple - add assets to the filesystem. The patch to the
And the app seems to function just fine. |
Yeah, that's the solution for a proper deployment. The current design is supposed to access assets stored in the binary itself, and it looks like I didn't actually do that correctly. No bugs to be found here, just errors on my part. Thanks again, y'all. |
Application
The application I'm attempting to run under OSv is a small toy I threw together that uses https://github.com/cesanta/mongoose to serve a handful of embedded files over HTTP, and can be found at https://github.com/grobe0ba/ssl-config-gen-osv.
I have placed the application in apps/ssl-config-gen, and successfully built a kernel.elf/usr.img combo which successfully runs under qemu.
The Problem
When run on the host (linking without
-shared
using thedebug
target of the application Makefile), the executable runs correctly, serves the embedded files as so forth without issue.When run on OSv, mongoose fails to recognize the embedded assets, and simply returns errors to that effect over HTTP.
Mongoose does not have runtime detection of these assets, it is a compile-time configuration. I have confirmed using
strings|grep
that the assets are in fact still present in the stripped shared object that OSv is using.Help me, Obi-wan Kenobi(s)
Any ideas that y'all could throw my way would be appreciated, as I really have no idea how this behaviour is changing like this. I know I could just embed the assets using OSv itself, and in general that would be a better option, but I was taking an opportunity to play with mongoose as well.
This may not be the correct forum for this issue, but since the application builds and runs correctly both on RHEL and OpenBSD, I'm inclined to think there aren't any issues with mongoose causing this, although I could be wrong.
Even with this interesting little conundrum, y'all have done a lot of good work, and I appreciate it. Thanks!
Build Host
I'm using a local build of OSv, built on RHEL 8.5 (
Linux lindev.pulpie.xyz 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 8 21:51:17 EST 2021 x86_64 x86_64 x86_64 GNU/Linux)
using x86_64-linux-musl-gcc (x86_64-linux-musl-gcc (GCC) 9.4.0
) built using richfelker/musl-cross-make@0f22991 and boostorg/boost@9d3f9bc (tag: boost-1.77.0).Environment during build
Image build step
The text was updated successfully, but these errors were encountered: