Closed
Description
I've created a minimal sdk but I run in to an empty AssertionError when running componentize.
Steps to reproduce:
git clone https://github.com/veeshi/componentize-test-sdk
cd componentize-test-sdk/test
python3 -m venv env
. env/bin/activate
pip install -r requirements.txt
componentize-py --wit-path ../src/test_sdk/wit --world test componentize app --output hello-world.wasm
Output:
Traceback (most recent call last):
File "/home/user/componentize-test-sdk/test/env/bin/componentize-py", line 8, in <module>
sys.exit(script())
~~~~~~^^
AssertionError:
thread '<unnamed>' panicked at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:797:1:
Cannot drop pointer into Python heap without the GIL being held.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Caused by:
0: error while executing at wasm backtrace:
0: 0x1b3d860 - libc.so!abort
1: 0x13533 - <unknown>!<wasm function 307>
2: 0xf20dc - libcomponentize_py_runtime.so!std::sys::pal::wasi::helpers::abort_internal::h45ddf8dfcf733f32
3: 0xf369c - libcomponentize_py_runtime.so!std::process::abort::h7df740e70d35c477
4: 0xdacdf - libcomponentize_py_runtime.so!__rustc::__rust_abort
5: 0xf86df - libcomponentize_py_runtime.so!__rustc::__rust_start_panic
6: 0xdc285 - libcomponentize_py_runtime.so!__rustc::rust_panic
7: 0xdc200 - libcomponentize_py_runtime.so!std::panicking::rust_panic_with_hook::h49d52b4c0496d827
8: 0xeea54 - libcomponentize_py_runtime.so!std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::hc9bf08eb7b869326
9: 0xee97c - libcomponentize_py_runtime.so!std::sys::backtrace::__rust_end_short_backtrace::hc40d855e54a0f6ab
10: 0xdbab5 - libcomponentize_py_runtime.so!__rustc::rust_begin_unwind
11: 0x12ad1a - libcomponentize_py_runtime.so!core::panicking::panic_fmt::hf0c49fecf8e0f3ef
12: 0x964bd - libcomponentize_py_runtime.so!pyo3::gil::register_decref::he6939c7e25e30468
13: 0x70188 - libcomponentize_py_runtime.so!anyhow::error::object_drop::h5579c24bc3e5e7bb
14: 0xd0a00 - libcomponentize_py_runtime.so!anyhow::error::_$LT$impl$u20$core..ops..drop..Drop$u20$for$u20$anyhow..Error$GT$::drop::h5f2b9d0f02f9bdb0
15: 0x651db - libcomponentize_py_runtime.so!_$LT$componentize_py_runtime..MyExports$u20$as$u20$componentize_py_runtime..exports..exports..Guest$GT$::init::h14c15f78d2d34172
16: 0x6f1ee - libcomponentize_py_runtime.so!componentize_py_runtime::exports::exports::_export_init_cabi::h860779639eeaede4
17: 0x6b2bd - libcomponentize_py_runtime.so!exports#init
note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information
1: wasm trap: wasm `unreachable` instruction executed
Stack backtrace:
0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
1: wasmtime::runtime::trap::from_runtime_box
2: wasmtime::runtime::component::func::Func::call_raw
3: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
4: wasmtime_fiber::unix::fiber_start
5: wasmtime_fiber_start_30_0_2
6: wasmtime_fiber::Fiber<Resume,Yield,Return>::resume
7: wasmtime::runtime::store::async_::<impl wasmtime::runtime::store::context::StoreContextMut<T>>::on_fiber::{{closure}}::FiberFuture::resume
8: <wasmtime::runtime::store::async_::<impl wasmtime::runtime::store::context::StoreContextMut<T>>::on_fiber::{{closure}}::FiberFuture as core::future::future::Future>::poll
9: componentize_py::componentize::{{closure}}::{{closure}}::{{closure}}
10: component_init::initialize_staged::{{closure}}
11: tokio::runtime::park::CachedParkThread::block_on
12: tokio::runtime::runtime::Runtime::block_on
13: componentize_py::command::run
14: componentize_py::python::<impl componentize_py::python::python_script::MakeDef>::_PYO3_DEF::trampoline
15: <unknown>
16: PyObject_Vectorcall
17: _PyEval_EvalFrameDefault
18: PyEval_EvalCode
19: <unknown>
20: <unknown>
21: <unknown>
22: <unknown>
23: <unknown>
24: Py_RunMain
25: Py_BytesMain
26: __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
27: __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
28: _start
RUST_BACKTRACE is set to full but doesn't seem to take any effect
Metadata
Metadata
Assignees
Labels
No labels