bjorn3 commented on Issue #511:
I think this should be closed. It has been a year without response and in the mean time the wasi implementation has been completely rewritten.
peterhuene commented on Issue #511:
Agreed. @leonardas103 if you're able to reproduce this with a recent Wasmtime build, please let us know.
peterhuene closed Issue #511:
This is somewhat related to: Issue
In wasmtime writing to file I get the following error:
thread 'main' panicked at 'write failed: Os { code: 76, kind: Other, message: "Capabilities insufficient" }', src/libcore/result.rs:1084:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. error: failed to process main module `demo.wasm` caused by: Instantiation error: Trap occurred while invoking start function: wasm trap: unreachable, source location: @3adc6
I do include the file directory properly:
wasmtime --dir=. demo.wasm '{"a":"txt","b": 1}'
While with wasmer I do not get this error.
Note: See the code linked in the wasmer issue. Also, this error is the same without the append flag.
leonardas103 commented on Issue #511:
Now when I run my old wasm file with wasmtime (0.25.0) I get:
Error: failed to run main module `demo_old.wasm` Caused by: 0: failed to instantiate "demo_old.wasm" 1: command export '__rustc_debug_gdb_scripts_section__' is not a function
I recompiled the code with the latest rust (1.50.0) and the program works as intended, however in the trace there was an error:
TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > wiggle abi; module="wasi_snapshot_preview1" function="environ_sizes_get" TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > result=Ok((0, 0)) TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > wiggle abi; module="wasi_snapshot_preview1" function="fd_prestat_get" TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > fd=Fd(3) TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > result=Ok(Dir(PrestatDir { pr_name_len: 1 })) TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > wiggle abi; module="wasi_snapshot_preview1" function="fd_prestat_dir_name" TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > fd=Fd(3) path=*guest 0x110010 path_len=1 TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > result=Ok(()) TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > wiggle abi; module="wasi_snapshot_preview1" function="fd_prestat_get" TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > fd=Fd(4) TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > result=Err(Badf: Bad file descriptor) DEBUG wasi_common::snapshots::preview_1 > **Error: Badf: Bad file descriptor** TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > wiggle abi; module="wasi_snapshot_preview1" function="fd_write" TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > fd=Fd(1) iovs=*guest 0xffcb0/1 TRACE wasi_common::snapshots::preview_1::wasi_snapshot_preview1 > result=Ok(43)
But this is probably nothing. The program writes to file as intended.
Last updated: Dec 23 2024 at 12:05 UTC