cloud-software-foundation / c5

c5
Apache License 2.0
12 stars 8 forks source link

Detect and log fiber blocking #328

Open joshua-g opened 10 years ago

joshua-g commented 10 years ago

Alex had the idea of detecting Fiber deadlock. In general I think that's difficult, but we could simply log a warning if a Fiber is ever blocking. Every Fiber deadlock is also a Fiber block. And there's no reason a Fiber should ever need to block anyway.

In the simplest form, this could just mean adding a new kind of jetlang BatchExecutor (perhaps a decorator for BatchExecutors, or perhaps just change ExceptionHandlingBatchExecutor) that times its Runnables and logs a warning if their running time ever exceeds a certain cutoff.