From daad13dbefb3f862e079859dd524126ada017c2d Mon Sep 17 00:00:00 2001 From: Kate Goldenring Date: Mon, 28 Oct 2024 14:59:10 -0700 Subject: [PATCH] fix: remove native unwind info - Musl builds of the shim throw a libunwind error during startup due to Wasmtime failing to detect which unwind implementation to use. For now, turn off generating native unwind info Signed-off-by: Kate Goldenring --- containerd-shim-spin/src/engine.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/containerd-shim-spin/src/engine.rs b/containerd-shim-spin/src/engine.rs index a09fd9f..c84c54a 100644 --- a/containerd-shim-spin/src/engine.rs +++ b/containerd-shim-spin/src/engine.rs @@ -45,6 +45,10 @@ impl Default for SpinEngine { // turned on for the components we compile. let mut config = wasmtime::Config::default(); config.epoch_interruption(true); + // Turn off native unwinding to avoid faulty libunwind detection error + // TODO: This can be removed once the Wasmtime fix is brought into Spin + // Issue to track: https://github.com/fermyon/spin/issues/2889 + config.native_unwind_info(false); Self { wasmtime_engine: wasmtime::Engine::new(&config).unwrap(), }