Skip to content

[browser][mt] Running any Thread for longer than 5000 ms crashes runtime (Blazor) #86903

Closed
@IsaMorphic

Description

@IsaMorphic

Description

Spawning any long-running Task or Thread from the main thread for longer than 5000 ms kills application and runtime when using Blazor.
Screenshot 2023-05-29 182353

Reproduction Steps

  1. Create empty Blazor app and use current main build of runtime in project file
  2. Use Task.Run, Thread.Start or async/await anywhere in the app with a long-running task (importantly, NOT Task.Yield or Task.Delay)
  3. Observe the error and runtime crash.

Expected behavior

I should be able to start a task from anywhere on the main thread using Task.Run in a Blazor app and not have the runtime crash after 5000ms

Actual behavior

Runtime crashes with error (screenshot above)

Regression?

This previously worked perfectly on the official release build of .NET 8 Preview 4.

Known Workarounds

None

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

arch-wasmWebAssembly architecturearea-VM-threading-mononeeds-author-actionAn issue or pull request that requires more info or actions from the author.os-browserBrowser variant of arch-wasm

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions