-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[WASI] fix event loop init #104803
Labels
arch-wasm
WebAssembly architecture
area-VM-threading-mono
in-pr
There is an active PR which will close this issue when it is merged
os-wasi
Related to WASI variant of arch-wasm
Milestone
Comments
pavelsavara
added
arch-wasm
WebAssembly architecture
area-VM-threading-mono
os-wasi
Related to WASI variant of arch-wasm
labels
Jul 12, 2024
Tagging subscribers to 'arch-wasm': @lewing |
dicej
added a commit
to dicej/runtimelab
that referenced
this issue
Jul 29, 2024
See dotnet/runtime#104803 Signed-off-by: Joel Dice <joel.dice@fermyon.com>
dicej
added a commit
to dicej/runtimelab
that referenced
this issue
Aug 1, 2024
This adds `WasiHttpHandler`, a new implementation of `HttpMessageHandler` based on [wasi:http/outgoing-handler](https://github.com/WebAssembly/wasi-http/blob/v0.2.0/wit/handler.wit), plus tweaks to `System.Threading` to allow async `Task`s to work in a single-threaded context, with `ThreadPool` work items dispatched from an application-provided event loop. WASIp2 supports asynchronous I/O and timers via `wasi:io/poll/pollable` resource handles. One or more of those handles may be passed to `wasi:io/poll/poll`, which will block until at least one of them is ready. In order to make this model play nice with C#'s `async`/`await` and `Task` features, we need to reconcile several constraints: - WASI is currently single-threaded, and will continue to be that way for a while. - C#'s `async`/`await` and `Task` features require a working `ThreadPool` implementation capable of deferring work. - A WASI component can export an arbitrary number of functions to the host, and though they will always be called synchronously from the host, they need to be able to perform asynchronous operations before returning. - WASIp3 (currently in the design and prototype phase) will support asynchronous exports, with the top level event loop running in the host instead of the guest, and `wasi:io/poll/pollable` will no longer exist. Therefore, we don't want to add any temporary public APIs to the .NET runtime which will become obsolete when WASIp3 arrives. The solution we arrived at looks something like this: - Tweak the existing `ThreadPool` implementation for WASI so that methods such as `RequestWorkerThread` don't throw `PlatformNotSupportedException`s (i.e. allow work items to be queued even though the "worker thread" is always the same one that is queuing the work) - Add two new methods to `Thread`: - `internal static void Dispatch`: Runs an iteration of event loop, draining the `ThreadPool` queue of ready work items and calling `wasi:io/poll/poll` with any accumulated `pollable` handles - `internal static Task Register(int pollableHandle)`: Registers the specified `pollable` handle to be `poll`ed during the next call to `Dispatch` - Note that these methods are `internal` because they're temporary and should not be part of the public API, but they are intended to be called via `UnsafeAccessor` by application code (or more precisely, code generated by `wit-bindgen` for the application) The upshot is that application code can use `wit-bindgen` (either directly or via the new `componentize-dotnet` package) to generate async export bindings which will provide an event loop backed by `Thread.Dispatch`. Additionally, `wit-bindgen` can transparently convert any `pollable` handles returned by WASI imports into `Task`s via `Thread.Register`, allowing the component to `await` them, pass them to a combinator such as `Task.WhenEach`, etc. Later, when WASIp3 arrives and we update the .NET runtime to target it, we'll be able to remove some of this code (and the corresponding code in `wit-bindgen`) without requiring significant changes to the application developer's experience. This PR contains a few C# source files that were generated by `wit-bindgen` from the official WASI WIT files, plus scripts to regenerate them if desired. Signed-off-by: Joel Dice <joel.dice@fermyon.com> switch to `wasm32-wasip2` and update WASI test infra Now that we're using WASI-SDK 22, we can target `wasm32-wasip2`, which produces components by default and includes full `wasi:sockets` support. In order to run those components, I've updated the test infrastructure to use Wasmtime 21 (the latest release as of this writing). Other changes of note: - Tweaked src/coreclr/jit/compiler.cpp to make `Debug` builds work on Linux - Added libWasiHttp.a, which includes the encoded component type (in the form of a pre-generated Wasm object file) and a `cabi_realloc` definition. Both of these are generated by `wit-bindgen` and required by `wasm-component-ld` to generate a valid component. - Added a `FindWasmHostExecutableAndRun.sh` script for running the WASI tests on UNIX-style platforms. Signed-off-by: Joel Dice <joel.dice@fermyon.com> various WASI build tweaks Signed-off-by: Joel Dice <joel.dice@fermyon.com> quote libWasiHttp.a path in custom linker arg Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix wasm-component-ld download command Signed-off-by: Joel Dice <joel.dice@fermyon.com> tweak EmccExtraArgs in CustomMain.csproj so wasm-component-ld understands it Signed-off-by: Joel Dice <joel.dice@fermyon.com> update CMake minimum version in wasi-sdk-p2.cmake Signed-off-by: Joel Dice <joel.dice@fermyon.com> use `HeaderDescriptor` to sort content and response headers Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow building native WASI test code in src/tests/build.sh Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow WASI runtime tests to be built and run on non-Windows systems Signed-off-by: Joel Dice <joel.dice@fermyon.com> update runtime tests to work with WASIp2 As of this writing, WASIp2 [does not support process exit statuses](WebAssembly/wasi-cli#11) beyond 0 (success) and 1 (failure). To work around this, I've modified the relevant tests to return 0 on success instead of 100. Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix CI for Windows builds; remove unused file Signed-off-by: Joel Dice <joel.dice@fermyon.com> disable sprintf warning in llvmlssa.cpp on macOS Signed-off-by: Joel Dice <joel.dice@fermyon.com> remove LibraryWorld_cabi_realloc.o I didn't mean to add this to Git. Signed-off-by: Joel Dice <joel.dice@fermyon.com> rename `generate-bindings.sh` files for clarity This makes it more obvious that, though they are similar, they each have a different job. Signed-off-by: Joel Dice <joel.dice@fermyon.com> update to `wit-bindgen` 0.27.0 and regenerate bindings Signed-off-by: Joel Dice <joel.dice@fermyon.com> reorganize code; add HttpClient smoke test - move System/WASIp2 to System/Threading/WASIp2 - remove generated `cabi_realloc` functions since `wasi-libc` will provide one - add HttpClient test to SmokeTests/SharedLibrary Note that I put the HttpClient test in SmokeTests/SharedLibrary since we were already using NodeJS for that test, and adding a simple loopback webserver to SharedLibraryDriver.mjs was easiest option available to keep the whole test self-contained. Signed-off-by: Joel Dice <joel.dice@fermyon.com> implement SystemNative_SysLog for WASI Signed-off-by: Joel Dice <joel.dice@fermyon.com> increase NodeJS stack trace limit to 200 Signed-off-by: Joel Dice <joel.dice@fermyon.com> give guest no filesystem access in SharedLibraryDriver.mjs Signed-off-by: Joel Dice <joel.dice@fermyon.com> switch to Trace.Assert into HttpClient smoke test Signed-off-by: Joel Dice <joel.dice@fermyon.com> rename WASIp2 directory to Wasi Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix non-GET methods and add HttpClient echo test Signed-off-by: Joel Dice <joel.dice@fermyon.com> use azure NPM rename - WasiEventLoop.RegisterWasiPollable - WasiEventLoop.DispatchWasiEventLoop to make it less confusing on the Thread class - unification of gen-buildsys - cleanup pal_process_wasi.c fix build? more buffer /echo request body in SharedLibraryDriver.mjs Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix gen-buildsys.sh regression Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow only infinite `HttpClient.Timeout`s on WASI This temporary code will be reverted once we support `System.Threading.Timer` on WASI in a forthcoming PR. Signed-off-by: Joel Dice <joel.dice@fermyon.com> use `&` operator to simplify install-jco.ps1 Signed-off-by: Joel Dice <joel.dice@fermyon.com> remove redundant `CheckWasmSdks` target from SharedLibrary.csproj Signed-off-by: Joel Dice <joel.dice@fermyon.com> split `FindWasmHostExecutable.sh` out of `FindWasmHostExecutableAndRun.sh` Signed-off-by: Joel Dice <joel.dice@fermyon.com> replace component type object files with WIT files This updates `wit-bindgen` and `wasm-component-ld`, which now support producing and consuming component type WIT files as an alternative to binary object files. These files are easier to audit from a security perspective. Signed-off-by: Joel Dice <joel.dice@fermyon.com> preserve slashes in path in SharedLibrary.csproj Signed-off-by: Joel Dice <joel.dice@fermyon.com> temporarily disable ThreadPoolWorkQueue.Dispatch assertion See dotnet/runtime#104803 Signed-off-by: Joel Dice <joel.dice@fermyon.com> update `wit-bindgen` to version 0.28.0 Signed-off-by: Joel Dice <joel.dice@fermyon.com>
dicej
added a commit
to dicej/runtimelab
that referenced
this issue
Aug 14, 2024
This adds `WasiHttpHandler`, a new implementation of `HttpMessageHandler` based on [wasi:http/outgoing-handler](https://github.com/WebAssembly/wasi-http/blob/v0.2.0/wit/handler.wit), plus tweaks to `System.Threading` to allow async `Task`s to work in a single-threaded context, with `ThreadPool` work items dispatched from an application-provided event loop. WASIp2 supports asynchronous I/O and timers via `wasi:io/poll/pollable` resource handles. One or more of those handles may be passed to `wasi:io/poll/poll`, which will block until at least one of them is ready. In order to make this model play nice with C#'s `async`/`await` and `Task` features, we need to reconcile several constraints: - WASI is currently single-threaded, and will continue to be that way for a while. - C#'s `async`/`await` and `Task` features require a working `ThreadPool` implementation capable of deferring work. - A WASI component can export an arbitrary number of functions to the host, and though they will always be called synchronously from the host, they need to be able to perform asynchronous operations before returning. - WASIp3 (currently in the design and prototype phase) will support asynchronous exports, with the top level event loop running in the host instead of the guest, and `wasi:io/poll/pollable` will no longer exist. Therefore, we don't want to add any temporary public APIs to the .NET runtime which will become obsolete when WASIp3 arrives. The solution we arrived at looks something like this: - Tweak the existing `ThreadPool` implementation for WASI so that methods such as `RequestWorkerThread` don't throw `PlatformNotSupportedException`s (i.e. allow work items to be queued even though the "worker thread" is always the same one that is queuing the work) - Add two new methods to `Thread`: - `internal static void Dispatch`: Runs an iteration of event loop, draining the `ThreadPool` queue of ready work items and calling `wasi:io/poll/poll` with any accumulated `pollable` handles - `internal static Task Register(int pollableHandle)`: Registers the specified `pollable` handle to be `poll`ed during the next call to `Dispatch` - Note that these methods are `internal` because they're temporary and should not be part of the public API, but they are intended to be called via `UnsafeAccessor` by application code (or more precisely, code generated by `wit-bindgen` for the application) The upshot is that application code can use `wit-bindgen` (either directly or via the new `componentize-dotnet` package) to generate async export bindings which will provide an event loop backed by `Thread.Dispatch`. Additionally, `wit-bindgen` can transparently convert any `pollable` handles returned by WASI imports into `Task`s via `Thread.Register`, allowing the component to `await` them, pass them to a combinator such as `Task.WhenEach`, etc. Later, when WASIp3 arrives and we update the .NET runtime to target it, we'll be able to remove some of this code (and the corresponding code in `wit-bindgen`) without requiring significant changes to the application developer's experience. This PR contains a few C# source files that were generated by `wit-bindgen` from the official WASI WIT files, plus scripts to regenerate them if desired. Signed-off-by: Joel Dice <joel.dice@fermyon.com> switch to `wasm32-wasip2` and update WASI test infra Now that we're using WASI-SDK 22, we can target `wasm32-wasip2`, which produces components by default and includes full `wasi:sockets` support. In order to run those components, I've updated the test infrastructure to use Wasmtime 21 (the latest release as of this writing). Other changes of note: - Tweaked src/coreclr/jit/compiler.cpp to make `Debug` builds work on Linux - Added libWasiHttp.a, which includes the encoded component type (in the form of a pre-generated Wasm object file) and a `cabi_realloc` definition. Both of these are generated by `wit-bindgen` and required by `wasm-component-ld` to generate a valid component. - Added a `FindWasmHostExecutableAndRun.sh` script for running the WASI tests on UNIX-style platforms. Signed-off-by: Joel Dice <joel.dice@fermyon.com> various WASI build tweaks Signed-off-by: Joel Dice <joel.dice@fermyon.com> quote libWasiHttp.a path in custom linker arg Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix wasm-component-ld download command Signed-off-by: Joel Dice <joel.dice@fermyon.com> tweak EmccExtraArgs in CustomMain.csproj so wasm-component-ld understands it Signed-off-by: Joel Dice <joel.dice@fermyon.com> update CMake minimum version in wasi-sdk-p2.cmake Signed-off-by: Joel Dice <joel.dice@fermyon.com> use `HeaderDescriptor` to sort content and response headers Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow building native WASI test code in src/tests/build.sh Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow WASI runtime tests to be built and run on non-Windows systems Signed-off-by: Joel Dice <joel.dice@fermyon.com> update runtime tests to work with WASIp2 As of this writing, WASIp2 [does not support process exit statuses](WebAssembly/wasi-cli#11) beyond 0 (success) and 1 (failure). To work around this, I've modified the relevant tests to return 0 on success instead of 100. Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix CI for Windows builds; remove unused file Signed-off-by: Joel Dice <joel.dice@fermyon.com> disable sprintf warning in llvmlssa.cpp on macOS Signed-off-by: Joel Dice <joel.dice@fermyon.com> remove LibraryWorld_cabi_realloc.o I didn't mean to add this to Git. Signed-off-by: Joel Dice <joel.dice@fermyon.com> rename `generate-bindings.sh` files for clarity This makes it more obvious that, though they are similar, they each have a different job. Signed-off-by: Joel Dice <joel.dice@fermyon.com> update to `wit-bindgen` 0.27.0 and regenerate bindings Signed-off-by: Joel Dice <joel.dice@fermyon.com> reorganize code; add HttpClient smoke test - move System/WASIp2 to System/Threading/WASIp2 - remove generated `cabi_realloc` functions since `wasi-libc` will provide one - add HttpClient test to SmokeTests/SharedLibrary Note that I put the HttpClient test in SmokeTests/SharedLibrary since we were already using NodeJS for that test, and adding a simple loopback webserver to SharedLibraryDriver.mjs was easiest option available to keep the whole test self-contained. Signed-off-by: Joel Dice <joel.dice@fermyon.com> implement SystemNative_SysLog for WASI Signed-off-by: Joel Dice <joel.dice@fermyon.com> increase NodeJS stack trace limit to 200 Signed-off-by: Joel Dice <joel.dice@fermyon.com> give guest no filesystem access in SharedLibraryDriver.mjs Signed-off-by: Joel Dice <joel.dice@fermyon.com> switch to Trace.Assert into HttpClient smoke test Signed-off-by: Joel Dice <joel.dice@fermyon.com> rename WASIp2 directory to Wasi Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix non-GET methods and add HttpClient echo test Signed-off-by: Joel Dice <joel.dice@fermyon.com> use azure NPM rename - WasiEventLoop.RegisterWasiPollable - WasiEventLoop.DispatchWasiEventLoop to make it less confusing on the Thread class - unification of gen-buildsys - cleanup pal_process_wasi.c fix build? more buffer /echo request body in SharedLibraryDriver.mjs Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix gen-buildsys.sh regression Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow only infinite `HttpClient.Timeout`s on WASI This temporary code will be reverted once we support `System.Threading.Timer` on WASI in a forthcoming PR. Signed-off-by: Joel Dice <joel.dice@fermyon.com> use `&` operator to simplify install-jco.ps1 Signed-off-by: Joel Dice <joel.dice@fermyon.com> remove redundant `CheckWasmSdks` target from SharedLibrary.csproj Signed-off-by: Joel Dice <joel.dice@fermyon.com> split `FindWasmHostExecutable.sh` out of `FindWasmHostExecutableAndRun.sh` Signed-off-by: Joel Dice <joel.dice@fermyon.com> replace component type object files with WIT files This updates `wit-bindgen` and `wasm-component-ld`, which now support producing and consuming component type WIT files as an alternative to binary object files. These files are easier to audit from a security perspective. Signed-off-by: Joel Dice <joel.dice@fermyon.com> preserve slashes in path in SharedLibrary.csproj Signed-off-by: Joel Dice <joel.dice@fermyon.com> temporarily disable ThreadPoolWorkQueue.Dispatch assertion See dotnet/runtime#104803 Signed-off-by: Joel Dice <joel.dice@fermyon.com> update `wit-bindgen` to version 0.28.0 Signed-off-by: Joel Dice <joel.dice@fermyon.com> upgrade to wasi-sdk 24 and wit-bindgen 0.29.0 Signed-off-by: Joel Dice <joel.dice@fermyon.com> check for WASI in `PhysicalFileProvider.CreateFileWatcher` Signed-off-by: Joel Dice <joel.dice@fermyon.com>
dicej
added a commit
to dicej/runtimelab
that referenced
this issue
Aug 15, 2024
This adds `WasiHttpHandler`, a new implementation of `HttpMessageHandler` based on [wasi:http/outgoing-handler](https://github.com/WebAssembly/wasi-http/blob/v0.2.0/wit/handler.wit), plus tweaks to `System.Threading` to allow async `Task`s to work in a single-threaded context, with `ThreadPool` work items dispatched from an application-provided event loop. WASIp2 supports asynchronous I/O and timers via `wasi:io/poll/pollable` resource handles. One or more of those handles may be passed to `wasi:io/poll/poll`, which will block until at least one of them is ready. In order to make this model play nice with C#'s `async`/`await` and `Task` features, we need to reconcile several constraints: - WASI is currently single-threaded, and will continue to be that way for a while. - C#'s `async`/`await` and `Task` features require a working `ThreadPool` implementation capable of deferring work. - A WASI component can export an arbitrary number of functions to the host, and though they will always be called synchronously from the host, they need to be able to perform asynchronous operations before returning. - WASIp3 (currently in the design and prototype phase) will support asynchronous exports, with the top level event loop running in the host instead of the guest, and `wasi:io/poll/pollable` will no longer exist. Therefore, we don't want to add any temporary public APIs to the .NET runtime which will become obsolete when WASIp3 arrives. The solution we arrived at looks something like this: - Tweak the existing `ThreadPool` implementation for WASI so that methods such as `RequestWorkerThread` don't throw `PlatformNotSupportedException`s (i.e. allow work items to be queued even though the "worker thread" is always the same one that is queuing the work) - Add two new methods to `Thread`: - `internal static void Dispatch`: Runs an iteration of event loop, draining the `ThreadPool` queue of ready work items and calling `wasi:io/poll/poll` with any accumulated `pollable` handles - `internal static Task Register(int pollableHandle)`: Registers the specified `pollable` handle to be `poll`ed during the next call to `Dispatch` - Note that these methods are `internal` because they're temporary and should not be part of the public API, but they are intended to be called via `UnsafeAccessor` by application code (or more precisely, code generated by `wit-bindgen` for the application) The upshot is that application code can use `wit-bindgen` (either directly or via the new `componentize-dotnet` package) to generate async export bindings which will provide an event loop backed by `Thread.Dispatch`. Additionally, `wit-bindgen` can transparently convert any `pollable` handles returned by WASI imports into `Task`s via `Thread.Register`, allowing the component to `await` them, pass them to a combinator such as `Task.WhenEach`, etc. Later, when WASIp3 arrives and we update the .NET runtime to target it, we'll be able to remove some of this code (and the corresponding code in `wit-bindgen`) without requiring significant changes to the application developer's experience. This PR contains a few C# source files that were generated by `wit-bindgen` from the official WASI WIT files, plus scripts to regenerate them if desired. Signed-off-by: Joel Dice <joel.dice@fermyon.com> switch to `wasm32-wasip2` and update WASI test infra Now that we're using WASI-SDK 22, we can target `wasm32-wasip2`, which produces components by default and includes full `wasi:sockets` support. In order to run those components, I've updated the test infrastructure to use Wasmtime 21 (the latest release as of this writing). Other changes of note: - Tweaked src/coreclr/jit/compiler.cpp to make `Debug` builds work on Linux - Added libWasiHttp.a, which includes the encoded component type (in the form of a pre-generated Wasm object file) and a `cabi_realloc` definition. Both of these are generated by `wit-bindgen` and required by `wasm-component-ld` to generate a valid component. - Added a `FindWasmHostExecutableAndRun.sh` script for running the WASI tests on UNIX-style platforms. Signed-off-by: Joel Dice <joel.dice@fermyon.com> various WASI build tweaks Signed-off-by: Joel Dice <joel.dice@fermyon.com> quote libWasiHttp.a path in custom linker arg Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix wasm-component-ld download command Signed-off-by: Joel Dice <joel.dice@fermyon.com> tweak EmccExtraArgs in CustomMain.csproj so wasm-component-ld understands it Signed-off-by: Joel Dice <joel.dice@fermyon.com> update CMake minimum version in wasi-sdk-p2.cmake Signed-off-by: Joel Dice <joel.dice@fermyon.com> use `HeaderDescriptor` to sort content and response headers Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow building native WASI test code in src/tests/build.sh Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow WASI runtime tests to be built and run on non-Windows systems Signed-off-by: Joel Dice <joel.dice@fermyon.com> update runtime tests to work with WASIp2 As of this writing, WASIp2 [does not support process exit statuses](WebAssembly/wasi-cli#11) beyond 0 (success) and 1 (failure). To work around this, I've modified the relevant tests to return 0 on success instead of 100. Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix CI for Windows builds; remove unused file Signed-off-by: Joel Dice <joel.dice@fermyon.com> disable sprintf warning in llvmlssa.cpp on macOS Signed-off-by: Joel Dice <joel.dice@fermyon.com> remove LibraryWorld_cabi_realloc.o I didn't mean to add this to Git. Signed-off-by: Joel Dice <joel.dice@fermyon.com> rename `generate-bindings.sh` files for clarity This makes it more obvious that, though they are similar, they each have a different job. Signed-off-by: Joel Dice <joel.dice@fermyon.com> update to `wit-bindgen` 0.27.0 and regenerate bindings Signed-off-by: Joel Dice <joel.dice@fermyon.com> reorganize code; add HttpClient smoke test - move System/WASIp2 to System/Threading/WASIp2 - remove generated `cabi_realloc` functions since `wasi-libc` will provide one - add HttpClient test to SmokeTests/SharedLibrary Note that I put the HttpClient test in SmokeTests/SharedLibrary since we were already using NodeJS for that test, and adding a simple loopback webserver to SharedLibraryDriver.mjs was easiest option available to keep the whole test self-contained. Signed-off-by: Joel Dice <joel.dice@fermyon.com> implement SystemNative_SysLog for WASI Signed-off-by: Joel Dice <joel.dice@fermyon.com> increase NodeJS stack trace limit to 200 Signed-off-by: Joel Dice <joel.dice@fermyon.com> give guest no filesystem access in SharedLibraryDriver.mjs Signed-off-by: Joel Dice <joel.dice@fermyon.com> switch to Trace.Assert into HttpClient smoke test Signed-off-by: Joel Dice <joel.dice@fermyon.com> rename WASIp2 directory to Wasi Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix non-GET methods and add HttpClient echo test Signed-off-by: Joel Dice <joel.dice@fermyon.com> use azure NPM rename - WasiEventLoop.RegisterWasiPollable - WasiEventLoop.DispatchWasiEventLoop to make it less confusing on the Thread class - unification of gen-buildsys - cleanup pal_process_wasi.c fix build? more buffer /echo request body in SharedLibraryDriver.mjs Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix gen-buildsys.sh regression Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow only infinite `HttpClient.Timeout`s on WASI This temporary code will be reverted once we support `System.Threading.Timer` on WASI in a forthcoming PR. Signed-off-by: Joel Dice <joel.dice@fermyon.com> use `&` operator to simplify install-jco.ps1 Signed-off-by: Joel Dice <joel.dice@fermyon.com> remove redundant `CheckWasmSdks` target from SharedLibrary.csproj Signed-off-by: Joel Dice <joel.dice@fermyon.com> split `FindWasmHostExecutable.sh` out of `FindWasmHostExecutableAndRun.sh` Signed-off-by: Joel Dice <joel.dice@fermyon.com> replace component type object files with WIT files This updates `wit-bindgen` and `wasm-component-ld`, which now support producing and consuming component type WIT files as an alternative to binary object files. These files are easier to audit from a security perspective. Signed-off-by: Joel Dice <joel.dice@fermyon.com> preserve slashes in path in SharedLibrary.csproj Signed-off-by: Joel Dice <joel.dice@fermyon.com> temporarily disable ThreadPoolWorkQueue.Dispatch assertion See dotnet/runtime#104803 Signed-off-by: Joel Dice <joel.dice@fermyon.com> update `wit-bindgen` to version 0.28.0 Signed-off-by: Joel Dice <joel.dice@fermyon.com> upgrade to wasi-sdk 24 and wit-bindgen 0.29.0 Signed-off-by: Joel Dice <joel.dice@fermyon.com> check for WASI in `PhysicalFileProvider.CreateFileWatcher` Signed-off-by: Joel Dice <joel.dice@fermyon.com>
dicej
added a commit
to dicej/runtimelab
that referenced
this issue
Aug 26, 2024
This adds `WasiHttpHandler`, a new implementation of `HttpMessageHandler` based on [wasi:http/outgoing-handler](https://github.com/WebAssembly/wasi-http/blob/v0.2.0/wit/handler.wit), plus tweaks to `System.Threading` to allow async `Task`s to work in a single-threaded context, with `ThreadPool` work items dispatched from an application-provided event loop. WASIp2 supports asynchronous I/O and timers via `wasi:io/poll/pollable` resource handles. One or more of those handles may be passed to `wasi:io/poll/poll`, which will block until at least one of them is ready. In order to make this model play nice with C#'s `async`/`await` and `Task` features, we need to reconcile several constraints: - WASI is currently single-threaded, and will continue to be that way for a while. - C#'s `async`/`await` and `Task` features require a working `ThreadPool` implementation capable of deferring work. - A WASI component can export an arbitrary number of functions to the host, and though they will always be called synchronously from the host, they need to be able to perform asynchronous operations before returning. - WASIp3 (currently in the design and prototype phase) will support asynchronous exports, with the top level event loop running in the host instead of the guest, and `wasi:io/poll/pollable` will no longer exist. Therefore, we don't want to add any temporary public APIs to the .NET runtime which will become obsolete when WASIp3 arrives. The solution we arrived at looks something like this: - Tweak the existing `ThreadPool` implementation for WASI so that methods such as `RequestWorkerThread` don't throw `PlatformNotSupportedException`s (i.e. allow work items to be queued even though the "worker thread" is always the same one that is queuing the work) - Add two new methods to `Thread`: - `internal static void Dispatch`: Runs an iteration of event loop, draining the `ThreadPool` queue of ready work items and calling `wasi:io/poll/poll` with any accumulated `pollable` handles - `internal static Task Register(int pollableHandle)`: Registers the specified `pollable` handle to be `poll`ed during the next call to `Dispatch` - Note that these methods are `internal` because they're temporary and should not be part of the public API, but they are intended to be called via `UnsafeAccessor` by application code (or more precisely, code generated by `wit-bindgen` for the application) The upshot is that application code can use `wit-bindgen` (either directly or via the new `componentize-dotnet` package) to generate async export bindings which will provide an event loop backed by `Thread.Dispatch`. Additionally, `wit-bindgen` can transparently convert any `pollable` handles returned by WASI imports into `Task`s via `Thread.Register`, allowing the component to `await` them, pass them to a combinator such as `Task.WhenEach`, etc. Later, when WASIp3 arrives and we update the .NET runtime to target it, we'll be able to remove some of this code (and the corresponding code in `wit-bindgen`) without requiring significant changes to the application developer's experience. This PR contains a few C# source files that were generated by `wit-bindgen` from the official WASI WIT files, plus scripts to regenerate them if desired. Signed-off-by: Joel Dice <joel.dice@fermyon.com> switch to `wasm32-wasip2` and update WASI test infra Now that we're using WASI-SDK 22, we can target `wasm32-wasip2`, which produces components by default and includes full `wasi:sockets` support. In order to run those components, I've updated the test infrastructure to use Wasmtime 21 (the latest release as of this writing). Other changes of note: - Tweaked src/coreclr/jit/compiler.cpp to make `Debug` builds work on Linux - Added libWasiHttp.a, which includes the encoded component type (in the form of a pre-generated Wasm object file) and a `cabi_realloc` definition. Both of these are generated by `wit-bindgen` and required by `wasm-component-ld` to generate a valid component. - Added a `FindWasmHostExecutableAndRun.sh` script for running the WASI tests on UNIX-style platforms. Signed-off-by: Joel Dice <joel.dice@fermyon.com> various WASI build tweaks Signed-off-by: Joel Dice <joel.dice@fermyon.com> quote libWasiHttp.a path in custom linker arg Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix wasm-component-ld download command Signed-off-by: Joel Dice <joel.dice@fermyon.com> tweak EmccExtraArgs in CustomMain.csproj so wasm-component-ld understands it Signed-off-by: Joel Dice <joel.dice@fermyon.com> update CMake minimum version in wasi-sdk-p2.cmake Signed-off-by: Joel Dice <joel.dice@fermyon.com> use `HeaderDescriptor` to sort content and response headers Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow building native WASI test code in src/tests/build.sh Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow WASI runtime tests to be built and run on non-Windows systems Signed-off-by: Joel Dice <joel.dice@fermyon.com> update runtime tests to work with WASIp2 As of this writing, WASIp2 [does not support process exit statuses](WebAssembly/wasi-cli#11) beyond 0 (success) and 1 (failure). To work around this, I've modified the relevant tests to return 0 on success instead of 100. Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix CI for Windows builds; remove unused file Signed-off-by: Joel Dice <joel.dice@fermyon.com> disable sprintf warning in llvmlssa.cpp on macOS Signed-off-by: Joel Dice <joel.dice@fermyon.com> remove LibraryWorld_cabi_realloc.o I didn't mean to add this to Git. Signed-off-by: Joel Dice <joel.dice@fermyon.com> rename `generate-bindings.sh` files for clarity This makes it more obvious that, though they are similar, they each have a different job. Signed-off-by: Joel Dice <joel.dice@fermyon.com> update to `wit-bindgen` 0.27.0 and regenerate bindings Signed-off-by: Joel Dice <joel.dice@fermyon.com> reorganize code; add HttpClient smoke test - move System/WASIp2 to System/Threading/WASIp2 - remove generated `cabi_realloc` functions since `wasi-libc` will provide one - add HttpClient test to SmokeTests/SharedLibrary Note that I put the HttpClient test in SmokeTests/SharedLibrary since we were already using NodeJS for that test, and adding a simple loopback webserver to SharedLibraryDriver.mjs was easiest option available to keep the whole test self-contained. Signed-off-by: Joel Dice <joel.dice@fermyon.com> implement SystemNative_SysLog for WASI Signed-off-by: Joel Dice <joel.dice@fermyon.com> increase NodeJS stack trace limit to 200 Signed-off-by: Joel Dice <joel.dice@fermyon.com> give guest no filesystem access in SharedLibraryDriver.mjs Signed-off-by: Joel Dice <joel.dice@fermyon.com> switch to Trace.Assert into HttpClient smoke test Signed-off-by: Joel Dice <joel.dice@fermyon.com> rename WASIp2 directory to Wasi Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix non-GET methods and add HttpClient echo test Signed-off-by: Joel Dice <joel.dice@fermyon.com> use azure NPM rename - WasiEventLoop.RegisterWasiPollable - WasiEventLoop.DispatchWasiEventLoop to make it less confusing on the Thread class - unification of gen-buildsys - cleanup pal_process_wasi.c fix build? more buffer /echo request body in SharedLibraryDriver.mjs Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix gen-buildsys.sh regression Signed-off-by: Joel Dice <joel.dice@fermyon.com> allow only infinite `HttpClient.Timeout`s on WASI This temporary code will be reverted once we support `System.Threading.Timer` on WASI in a forthcoming PR. Signed-off-by: Joel Dice <joel.dice@fermyon.com> use `&` operator to simplify install-jco.ps1 Signed-off-by: Joel Dice <joel.dice@fermyon.com> remove redundant `CheckWasmSdks` target from SharedLibrary.csproj Signed-off-by: Joel Dice <joel.dice@fermyon.com> split `FindWasmHostExecutable.sh` out of `FindWasmHostExecutableAndRun.sh` Signed-off-by: Joel Dice <joel.dice@fermyon.com> replace component type object files with WIT files This updates `wit-bindgen` and `wasm-component-ld`, which now support producing and consuming component type WIT files as an alternative to binary object files. These files are easier to audit from a security perspective. Signed-off-by: Joel Dice <joel.dice@fermyon.com> preserve slashes in path in SharedLibrary.csproj Signed-off-by: Joel Dice <joel.dice@fermyon.com> temporarily disable ThreadPoolWorkQueue.Dispatch assertion See dotnet/runtime#104803 Signed-off-by: Joel Dice <joel.dice@fermyon.com> update `wit-bindgen` to version 0.28.0 Signed-off-by: Joel Dice <joel.dice@fermyon.com> upgrade to wasi-sdk 24 and wit-bindgen 0.29.0 Signed-off-by: Joel Dice <joel.dice@fermyon.com> check for WASI in `PhysicalFileProvider.CreateFileWatcher` Signed-off-by: Joel Dice <joel.dice@fermyon.com> switch back to WASI 0.2.0 0.2.1 is not yet widely supported, and causes [trouble](bytecodealliance/jco#486) for Jco, which rely on for the `SharedLibrary` test. Signed-off-by: Joel Dice <joel.dice@fermyon.com> remove use of `WeakReference` from `WasiEventLoop` This was causing `HttpClient` timeout tests in the `SharedLibrary` smoke test suite to fail, apparently due to `TimerQueue.SetNextTimer` calling `WasiEventLoop.RegisterWasiPollable`, attaching a continuation to the resulting `Task` and then letting go of the reference, allowing it to be GC'd. Signed-off-by: Joel Dice <joel.dice@fermyon.com> skip unsupported signal handling on WASI Signed-off-by: Joel Dice <joel.dice@fermyon.com> throw PlatformNotSupportedException in ManualResetEventSlim.Wait on WASI Otherwise, we end up in an infinite loop. Signed-off-by: Joel Dice <joel.dice@fermyon.com> Revert "switch back to WASI 0.2.0" This reverts commit a8608b4. enable `NameResolution` and `Sockets` on WASI Signed-off-by: Joel Dice <joel.dice@fermyon.com> set `SocketsHttpHandler.IsEnabled` to `false` on WASI ...at least until we get `System.Net.Sockets` working. Signed-off-by: Joel Dice <joel.dice@fermyon.com>
pavelsavara
added a commit
to pavelsavara/runtime
that referenced
this issue
Sep 5, 2024
dotnet-policy-service
bot
added
the
in-pr
There is an active PR which will close this issue when it is merged
label
Sep 5, 2024
pavelsavara
added a commit
to pavelsavara/runtimelab
that referenced
this issue
Sep 5, 2024
lewing
added a commit
to lewing/runtime
that referenced
this issue
Sep 10, 2024
commit 7ae87de Author: Larry Ewing <lewing@microsoft.com> Date: Mon Sep 9 22:11:12 2024 -0500 [wasm] more cases when looking up unmanaged delegates (dotnet#107113) Make the association between the wasm_native_to_interp_ftndescs generation and the lookup from unmanaged more robust so that we don't see problems like dotnet#107212 where the same slot was being reused for multiple methods with different signatures. To do this we change the Key(s) we use and fix the string escaping it relies on, and attempt to lookup by token first. Next , we rewrite the C code generation to make it easier to read and modify and mitigate some potentially negative memory side effects of that we introduce a gratuitous custom text writer that understands the idea of concatenated strings and use that where possible when building the output. Next, we change the import code generation to use binary rather than linear search for both the module and symbol. And finally, we update the ICall table generation to use the extensions. part of dotnet#104391 and dotnet#107212 commit 1808129 Author: Elinor Fung <elfung@microsoft.com> Date: Mon Sep 9 20:03:34 2024 -0700 Remove FCThrowRes from AssemblyNative::IsDynamic (dotnet#107574) commit 5cb6a06 Author: Aman Khalid <amankhalid@microsoft.com> Date: Tue Sep 10 02:38:23 2024 +0000 JIT: Add simple late layout pass (dotnet#107483) commit c762b75 Author: Martin Costello <martin@martincostello.com> Date: Tue Sep 10 03:15:53 2024 +0100 Add [DebuggerDisplay] to CancellationTokenSource (dotnet#105764) * Add [DebuggerDisplay] to CancellationTokenSource Add `[DebuggerDisplay]` to `CancellationTokenSource` to show whether cancelled or disposed. Relates to dotnet#105698. * Update src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs --------- Co-authored-by: Stephen Toub <stoub@microsoft.com> commit b77b71e Author: Katelyn Gadd <kg@luminance.org> Date: Mon Sep 9 17:40:14 2024 -0700 [wasm] Clean up some FIXMEs in the jiterpreter (dotnet#107562) * Cleanup some fixmes in the jiterpreter * Flow through size of the var in MINT_LDLOCA_S so jiterpreter can do accurate invalidation commit c21d90e Author: Pavel Savara <pavel.savara@gmail.com> Date: Tue Sep 10 02:40:00 2024 +0200 [WASI] improve single-threaded threadpool (dotnet#107395) * fix dotnet#104803 * PollWasiEventLoopUntilResolvedVoid * more * wip * CPU-bound work to do * fix exit * Update src/mono/sample/wasi/http-p2/Program.cs Co-authored-by: Larry Ewing <lewing@microsoft.com> * feedback --------- Co-authored-by: Larry Ewing <lewing@microsoft.com> commit 61de5df Author: Elinor Fung <elfung@microsoft.com> Date: Mon Sep 9 17:14:07 2024 -0700 Make DAC and ProfToEEInterfaceImpl stop using BaseDomain (dotnet#107570) `BaseDomain` should no longer be needed now that we only have one `AppDomain` and the `SystemDomain` can be treated as separate. This makes the DAC and ProfToEEInterfaceImpl use `AppDomain` directly and check against `SystemDomain::System()` to determine if a pointer is the system domain. commit 76dbb27 Author: Stephen Toub <stoub@microsoft.com> Date: Mon Sep 9 19:59:54 2024 -0400 Use SearchValues in Uri.CheckForUnicodeOrEscapedUnreserved (dotnet#107357) commit 149d4bb Author: Miha Zupan <mihazupan.zupan1@gmail.com> Date: Mon Sep 9 16:54:00 2024 -0700 Extend the list of recognized SearchValues<char> field names in Regex (dotnet#107402) commit e591fbf Author: Kunal Pathak <Kunal.Pathak@microsoft.com> Date: Mon Sep 9 16:38:42 2024 -0700 Arm: Fix the base register used for restoring register from stack (dotnet#107564) * Use correct baseReg for vstr, similar to vldr * add test cases * Mark internal test methods private commit 51c350c Author: Elinor Fung <elfung@microsoft.com> Date: Mon Sep 9 16:35:02 2024 -0700 Make missing framework error message list other architectures that were found (dotnet#107156) When erroring on a missing framework, check if there are versions of the framework for other architectures and list them for the user. commit 2ed43b6 Author: Alan Hayward <a74nh@users.noreply.github.com> Date: Mon Sep 9 23:53:45 2024 +0100 ARM64-SVE: Allow op inside conditionalselect to be non HWintrinsic (dotnet#107180) * ARM64-SVE: Allow op inside conditionselect to be non HWintrinsic * Add Sve.IsSupported check to test commit ac4b7c6 Author: Kunal Pathak <Kunal.Pathak@microsoft.com> Date: Mon Sep 9 15:52:00 2024 -0700 Arm: Consider the fact that targetReg can be second half during resolution (dotnet#107493) * Arm: Consider the fact that targetReg can be second half during resolution * add test case * Make sure we only handle float registers * fix test case's public methods commit 18eedbe Author: Aaron Robinson <arobins@microsoft.com> Date: Mon Sep 9 14:02:51 2024 -0700 Convert Thread FCalls to QCalls (dotnet#107495) * Convert Thread.IsAlive property * Convert Thread.GetCurrentThread() * Convert Thread.ThreadState property * Convert Thread.Initialize() commit d45ccfd Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Tue Sep 10 05:28:57 2024 +0900 Fix reflection-calling `Set` method on arrays (dotnet#107529) The test added in dotnet#106787 found an issue in the implementation of reflection calls to array `Set` methods. We used to throw the wrong exception type. There were probably other corner case bugs (like what exception is thrown when both element type is wrong and index is out of range and when/how value coercion should happen). This should fix that. commit c534080 Author: Tom McDonald <tommcdon@microsoft.com> Date: Mon Sep 9 15:21:41 2024 -0400 Avoid using OpenThread for out of process SetThreadContext debugging (dotnet#107511) * Avoid using OpenThread in out of process thread context scenarios * Add comments * Update src/coreclr/debug/di/process.cpp Co-authored-by: mikelle-rogers <45022607+mikelle-rogers@users.noreply.github.com> * Update src/coreclr/debug/di/process.cpp Co-authored-by: mikelle-rogers <45022607+mikelle-rogers@users.noreply.github.com> * Update src/coreclr/debug/di/process.cpp Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com> --------- Co-authored-by: mikelle-rogers <45022607+mikelle-rogers@users.noreply.github.com> Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com> commit d2c7db0 Author: Tanner Gooding <tagoo@outlook.com> Date: Mon Sep 9 11:06:45 2024 -0700 Disable TensorExtensionsTwoSpanInFloatOut due to dotnet#107254 (dotnet#107555) commit b7b91cb Author: Aaron Robinson <arobins@microsoft.com> Date: Mon Sep 9 09:08:31 2024 -0700 Convert some handle APIs to QCalls (dotnet#107513) Convert RuntimeTypeHandle.GetAssembly() Convert RuntimeTypeHandle.GetModule() Convert RuntimeAssembly.GetManifestModule() commit 600f6bd Author: David Wrighton <davidwr@microsoft.com> Date: Mon Sep 9 09:04:51 2024 -0700 Fix thread static cleanup paths (dotnet#107438) * Fix thread static cleanup paths - Do not destroy GC handles while holding the spin lock - Free the pLoaderHandle array when the thread is terminated * When using a ThreadStatics stress test on collectible assemblies, a few more issues were found - Fix issue where the LoaderAllocator's SegmentedHandleIndex wasn't being freed - Fix issue where the logic to re-use TLSIndex values wasn't working properly commit fe7a52d Author: Linus Hamlin <78953007+lilinus@users.noreply.github.com> Date: Mon Sep 9 17:57:31 2024 +0200 Remove ActiveIssue for solved issues in Vector tests (dotnet#107127) commit 0c33c6f Author: Elinor Fung <elfung@microsoft.com> Date: Mon Sep 9 08:21:16 2024 -0700 Fix module being set as tenured too early (dotnet#107489) commit 2fb3629 Author: Elinor Fung <elfung@microsoft.com> Date: Mon Sep 9 08:03:27 2024 -0700 Remove `BaseDomain` use in `LoaderAllocator` and event tracing helpers (dotnet#107481) - Remove `BaseDomain` member on `LoaderAllocator` - Add asserts in functions using `AppDomain` that the loader allocator is collectible and the type is `LAT_Assembly` (so `AssemblyLoaderAllocator` which always had `AppDomain`) - Remove unnecessary `BaseDomain`/`AppDomain` parameters from event tracing helpers - They were always being called with the current app domain commit 62133e0 Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon Sep 9 16:56:30 2024 +0200 [main] Update dependencies from dotnet/xharness (dotnet#107291) * Update dependencies from https://github.com/dotnet/xharness build 20240902.2 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.24452.1 -> To Version 9.0.0-prerelease.24452.2 * Update dependencies from https://github.com/dotnet/xharness build 20240903.1 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.24452.2 -> To Version 9.0.0-prerelease.24453.1 * Update dependencies from https://github.com/dotnet/xharness build 20240904.2 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 9.0.0-prerelease.24453.1 -> To Version 10.0.0-prerelease.24454.2 * Update dependencies from https://github.com/dotnet/xharness build 20240906.1 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 10.0.0-prerelease.24454.2 -> To Version 10.0.0-prerelease.24456.1 * Update dependencies from https://github.com/dotnet/xharness build 20240909.1 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 10.0.0-prerelease.24456.1 -> To Version 10.0.0-prerelease.24459.1 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> commit 4c0973e Author: Jeremi Kurdek <59935235+jkurdek@users.noreply.github.com> Date: Mon Sep 9 17:53:45 2024 +0300 Fix passing assemblies using relative path (dotnet#107536) commit 67e5768 Author: Katelyn Gadd <kg@luminance.org> Date: Mon Sep 9 06:19:10 2024 -0700 [wasm] Implement MINT_NEWARR in jiterpreter (dotnet#107430) commit 176754d Author: Matous Kozak <55735845+matouskozak@users.noreply.github.com> Date: Mon Sep 9 13:35:01 2024 +0200 [mono][infra] decrease CPU count for fullAOT CI build (dotnet#107531) commit 49bf719 Author: Pavel Savara <pavel.savara@gmail.com> Date: Mon Sep 9 12:30:47 2024 +0200 [browser][MT] fix feature detection on webworker (dotnet#107452) commit aa418fc Author: Preeyan Parmar <4997904+preeyan@users.noreply.github.com> Date: Sun Sep 8 22:44:27 2024 +0100 Remove unused declarations from clsload.hpp (dotnet#107509) * Remove unused declarations from clsload.hpp * also remove unused ClassLoader::TryEnsureLoaded commit 7d68c7f Author: Steve <hez2010@outlook.com> Date: Mon Sep 9 06:36:18 2024 +0900 Implement getClassAssemblyName (dotnet#106959) * Add getClassAssemblyName * Handle nullptrs * Remove CORINFO_ASSEMBLY_HANDLE * Address feedbacks Co-authored-by: Jan Kotas <jkotas@microsoft.com> commit 39c84a3 Author: Jan Kotas <jkotas@microsoft.com> Date: Sun Sep 8 11:24:13 2024 -0700 Fix corner-case accounting bug in new codeheap allocation (dotnet#107492) The size of internal CodeHeap structures was not included in codeheap memory reservation. It caused false OOM exception to be thrown when JITed method code size was near 64kB multiple commit 10f6c4c Author: Aaron Robinson <arobins@microsoft.com> Date: Sun Sep 8 11:02:41 2024 -0700 Convert WaitHandle FCalls to QCalls (dotnet#107488) commit b523ec5 Author: Aman Khalid <amankhalid@microsoft.com> Date: Sun Sep 8 14:42:04 2024 +0000 JIT: Simplify block insertion logic during loop canonicalization (dotnet#107371)
jtschuster
pushed a commit
to jtschuster/runtime
that referenced
this issue
Sep 17, 2024
* fix dotnet#104803 * PollWasiEventLoopUntilResolvedVoid * more * wip * CPU-bound work to do * fix exit * Update src/mono/sample/wasi/http-p2/Program.cs Co-authored-by: Larry Ewing <lewing@microsoft.com> * feedback --------- Co-authored-by: Larry Ewing <lewing@microsoft.com>
sirntar
pushed a commit
to sirntar/runtime
that referenced
this issue
Sep 30, 2024
* fix dotnet#104803 * PollWasiEventLoopUntilResolvedVoid * more * wip * CPU-bound work to do * fix exit * Update src/mono/sample/wasi/http-p2/Program.cs Co-authored-by: Larry Ewing <lewing@microsoft.com> * feedback --------- Co-authored-by: Larry Ewing <lewing@microsoft.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
arch-wasm
WebAssembly architecture
area-VM-threading-mono
in-pr
There is an active PR which will close this issue when it is merged
os-wasi
Related to WASI variant of arch-wasm
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs
The text was updated successfully, but these errors were encountered: