You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The syscallWatcher today will effectively stack goroutines overtime. At the time of this post the defaultTimeout is 4 minutes which means that all syscalls (even completed ones) will have an open goroutine (although sleeping) for 4 minutes. This pattern should support a context.Context cancellation after a return from a syscall as we no longer need to monitor for a hung state.
It would likely look something like:
ctx, cancel:=context.WithTimeout(context.Background(), defautTimeout)
defercancel()
gosyscallWatcher(ctx, ...)
// make syscallreturnresult
So if the syscall returns we cancel the syscallWatcher and if it times out before returning we get the appropriate syscall hung state as expected.
The text was updated successfully, but these errors were encountered:
The
syscallWatcher
today will effectively stack goroutines overtime. At the time of this post thedefaultTimeout
is 4 minutes which means that all syscalls (even completed ones) will have an open goroutine (although sleeping) for 4 minutes. This pattern should support acontext.Context
cancellation after a return from asyscall
as we no longer need to monitor for a hung state.It would likely look something like:
So if the syscall returns we cancel the
syscallWatcher
and if it times out before returning we get the appropriate syscall hung state as expected.The text was updated successfully, but these errors were encountered: