wasmCloud icon indicating copy to clipboard operation
wasmCloud copied to clipboard

[BUG] host shutdown with a Ctrl-C exits with a warning

Open protochron opened this issue 1 year ago • 3 comments

Affected project(s)

  • [ ] documentation
  • [ ] examples
  • [X] wasmCloud host
  • [ ] wasmCloud CLI (wash)
  • [ ] wasmCloud dashboard UI (washboard)
  • [ ] capability providers
  • [ ] provider bindgen
  • [ ] control interface client
  • [ ] other / not sure

Describe the bug

Stopping the host with Ctrl-C successfully kills the host, but it ends with a warning that the wasmtime epoch interrupt thread is timing out:

Error: failed to shutdown host

Caused by:
    epoch interrupt thread timed out

Steps to reproduce

  1. Start a wasmcloud host, wadm, nats
  2. Start a wadm manifest (I've been using the rust http hello app)
  3. Ctrl-C in a terminal to stop the host
  4. Observe the error

Expected behavior

I expected the host to stop without that warning.

If it's a bug in the way we're stopping wasmtime the we should fix it, otherwise we should downgrade the warning if there is nothing for us to do.

Environment

  • OS: OSX
  • Shell zsh
  • wasmcloud Version: v1.3.0

Screenshots / Logs / Additional context

No response

protochron avatar Oct 14 '24 19:10 protochron

It's actually a duplicate of https://github.com/wasmCloud/wasmCloud/issues/2391, which was closed a few months ago. Not sure if it's a regression though, I think this is simply a race condition in shutdown sequence, which was never fixed.

I also encounter this one quite often

rvolosatovs avatar Oct 14 '24 20:10 rvolosatovs

Yep I think this isn't a regression as much as it just wasn't truly resolved 😅

brooksmtownsend avatar Oct 15 '24 13:10 brooksmtownsend

Digging in, this is almost certainly due to any running component taking a reference to the underlying Runtime Engine and the epoch thread not exiting until every reference is dropped.

brooksmtownsend avatar Oct 15 '24 14:10 brooksmtownsend