-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Brief Summary
One challenge would be how to debug live lock-ish issues between services using futures. On fuchsia pretty much everything is asynchronous. So when you have some client interacting with some other service, they both have executors driving the futures. So:
- client starts an executor
- client adds a future to the executor
- The future makes a call to some service.
- the executor suspends the future and waits on a kernel object for any channel to receive a message.
- For whatever reason the server does not reply, nor does it close the channel.
While fuchsia has some tools to help debug issues like this, the main technology we have to triage live-ish locks like this to set timeouts on our calls, and annotat most call sites with logs. Inevitably we forget some locations, and it becomes difficult to understand what happened.
My dream to try to debug issues like this would if there was some mechanism where we could ask the executor to wake up every pending future, then dump a backtrace of the future stack. Something like that would make it easy to detect when’s future is stuck waiting for something to happen.
Originally posted by @erickt in #69 (comment)