-
Notifications
You must be signed in to change notification settings - Fork 13
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
Spin apps fail to run - compiled with incompatible wasmtime version #79
Comments
My guess here is that we are pre-compiling in the shim with 19.0.1, but Spin is expecting some other version of Wasmtime and is throwing the error. @vdice does this seem reasonable? |
Yeah, I think we need to revert the Wasmtime bump for now. |
Thanks @devigned! Meanwhile, curious as to what we can add in CI to catch this? Did it slip by the tests due to the tested Spin Apps still being wrapped in Docker images, hence not hitting the precompilation flow? |
That is exactly where my mind went too. Having a test that catches this scenario should be the resolution of this issue. |
Yup, definitely a test needed to be added. I also think the dependabot should disable |
(An update to mention that Spin apps now run on the shim built from main after the revert, as expected. Thanks again!) |
Thank you for creating the issue! |
Thank you for laying this out in detail. I believe I hit this issue but I have not installed containerd-shim-spin manually, I used the Talos extension for spin. It seems to work with all the example apps, except for with my app pushed using I didn't find anything particularly informative in any of the other logs I checked, to help me narrow down the issue. So I was really glad to read your report, because this seems likely to be the same issue I'm having. Except the only indication of what is wrong exposed through spin operator seems to be an exit code 137 on the pod that is in crashloopbackoff. Should I file a separate report, or do you think this might be the same issue? (I have honestly no idea how to compile containerd-shim-spin from source and make my own extension for Talos Linux, but I guess I'm gonna find out soon...) |
Thanks for the additional details, @kingdonb! For context, the issue is coming from the ahead of time compilation feature that was added to the shim in #32. The issue we're seeing here seems to come out of a mismatch between the compiler output and Wasm engine — and I'm really confused by it, since I assumed we were doing a compatibility check somewhere (see
But perhaps this is a larger issue with the caching feature that we need to revisit. |
I saw #84 that might also be the same issue, where it was suggested to disable precompilation to get better logs. No idea if that's a userland knob or something that must be configured at compile time. But that issue might also be more precisely my issue, I am also pushing ~200MB in my packed bundle, (this is a hugo site that has been built and a static fs server wasm.) My bigger issue is that whatever caused my failure doesn't leave any trace in the K8s userland, I have given up compiling extensions for now as it sounds like the main issue has been resolved and I'll see it in the next release... thank you! |
I believe we should consider adding containerd config options for the shim to enable feature code paths. I don't believe Rust compilation flags would be desirable in cases like this since the user is likely to not have compiled the shim in the first place. Adding containerd config options for the shim would allow for on node configuration and debugging. It could also provide a path for turning on and off newly release / unstable features w/o recompilation. |
Monday morning 🤦, that is a different shim all together so there must be something else going on.
+1 |
I built the shim from
main
as of writing and I'm seeing the following when I attempt to run seemingly any Spin app.Steps I followed:
cargo build --release
; move it to where containerd expects itsudo containerd -c /path/to/containerd/config.toml
a. Note: containerd version
containerd github.com/containerd/containerd v1.7.14 dcf2847247e18caba8dce86522029642f60fe96b
spin registry push
) via ctr egsudo ctr image pull docker.io/vdice/static-fileserver:latest
sudo ctr run --rm --runtime io.containerd.spin.v2 docker.io/vdice/static-fileserver:latest static bogus
See the following in the containerd/runwasi/shim logs:
I noticed the shim's wasmtime version was recently bumped to 19.0.1 in #71 -- unintended consequence? Perhaps there are other deps needing to be bumped as well for compatibility?
The text was updated successfully, but these errors were encountered: