linuxboot / contest

Run continuous and on-demand system testing for real and virtual hardware
MIT License
17 stars 17 forks source link

Detect missing panic recovery in goroutines in plugins #10

Open mimir-d opened 2 years ago

mimir-d commented 2 years ago

Issue by insomniacslk Tuesday Feb 04, 2020 at 16:25 GMT Originally opened as https://github.com/facebookincubator/contest/issues/5


Panic in goroutines other than the main one cannot be recovered explicitly, they have to be handled in the goroutine itself[1]. For ConTest this means that if a test step or any other plugin has a goroutine that panics, we are not able to catch it.

We should write a tool to detect (statically or dynamically) whether each spawned goroutine attempts to recover, and warn that the plugin may break the service run.

[1] https://stackoverflow.com/questions/50409011/handling-panics-in-go-routines

mimir-d commented 2 years ago

Comment by xaionaro Monday Mar 02, 2020 at 12:37 GMT


We may:

What are your thoughts?


Update: Looks relevant: https://github.com/studiosol/async