peterhuene opened Issue #1735:
It appears that #1561 regressed
WasiCtxBuilder::stdin
,WasiCtxBuilder::stdout
, andWasiCtxBuilder::stderr
because it is usingOsOther
which will error with invalid argument.cc @kubkon.
This caused a CI failure in the .NET implementation that I hadn't had time to look into the last few days.
Unfortunately, there's a test coverage hole in Wasmtime CI where only a pipe handle was used for these functions, which is why the regression wasn't caught (
OsOther
works fine for pipes).The fix should probably try an
OsFile
first and then aOsOther
. We should also close the test hole.
peterhuene labeled Issue #1735:
It appears that #1561 regressed
WasiCtxBuilder::stdin
,WasiCtxBuilder::stdout
, andWasiCtxBuilder::stderr
because it is usingOsOther
which will error with invalid argument.cc @kubkon.
This caused a CI failure in the .NET implementation that I hadn't had time to look into the last few days.
Unfortunately, there's a test coverage hole in Wasmtime CI where only a pipe handle was used for these functions, which is why the regression wasn't caught (
OsOther
works fine for pipes).The fix should probably try an
OsFile
first and then aOsOther
. We should also close the test hole.
peterhuene edited Issue #1735:
It appears that #1561 regressed
WasiCtxBuilder::stdin
,WasiCtxBuilder::stdout
, andWasiCtxBuilder::stderr
because it is usingOsOther
which will error with invalid argument when given a file handle.cc @kubkon.
This caused a CI failure in the .NET implementation that I hadn't had time to look into the last few days.
Unfortunately, there's a test coverage hole in Wasmtime CI where only a pipe handle was used for these functions, which is why the regression wasn't caught (
OsOther
works fine for pipes).The fix should probably try an
OsFile
first and then aOsOther
. We should also close the test hole.
peterhuene edited Issue #1735:
It appears that #1561 regressed
WasiCtxBuilder::stdin
,WasiCtxBuilder::stdout
, andWasiCtxBuilder::stderr
because it is usingOsOther
which will error with invalid argument when given a file handle.cc @kubkon.
This caused a CI failure in the .NET implementation that I hadn't had time to look into the last few days.
Unfortunately, there's a test coverage hole in Wasmtime CI where only a pipe handle was used for these functions, which is why the regression wasn't caught (
OsOther
works fine for pipes).
kubkon commented on Issue #1735:
Oh shoot, it seems that my refactoring regressed a lot more than expected, sorry about that! I’ll have a look ASAP and also will try figure out an additional test. Thanks for the report @peterhuene!
kubkon commented on Issue #1735:
Just out of curiosity, would #1600 fix this issue for you?
peterhuene commented on Issue #1735:
From a quick glance, I don't think it would, as the .NET API goes through the WASI C API, which remains using
OsOther
.I was thinking of a more specific fix to where we currently handle
PendingEntry::OsHandle
to support either a file handle or an other handle, ala https://github.com/peterhuene/wasmtime/commit/21b0d6e27ccf5d19eee43f921f7898e960f005a0. It does incur an extra stat to see what type of handle it is, though.
peterhuene commented on Issue #1735:
Breaking change to the Rust API aside, I think if we changed those to
OsFile
, your approach would work. Th C API is only accepting paths to files.
peterhuene edited a comment on Issue #1735:
Breaking change to the Rust API aside, I think if we changed those to
OsFile
, your approach would work. The C API is only accepting paths to files.
kubkon commented on Issue #1735:
Since #1600 landed, I’m closing this one. Feel free to reopen it though if you feel it’s not been fully fixed @peterhuene!
kubkon closed Issue #1735:
It appears that #1561 regressed
WasiCtxBuilder::stdin
,WasiCtxBuilder::stdout
, andWasiCtxBuilder::stderr
because it is usingOsOther
which will error with invalid argument when given a file handle.cc @kubkon.
This caused a CI failure in the .NET implementation that I hadn't had time to look into the last few days.
Unfortunately, there's a test coverage hole in Wasmtime CI where only a pipe handle was used for these functions, which is why the regression wasn't caught (
OsOther
works fine for pipes).
Last updated: Nov 22 2024 at 17:03 UTC