From d3bbcc35ee486a3d456fe58fa0600fc93b7a79fe Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 20 Jun 2018 15:35:45 +0200 Subject: vm/vmimpl: add vm.Diagnose method Diagnose is called on machine hang to try to get some additional diagnostic information from it. For now it's all stubs. --- vm/vmimpl/vmimpl.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vm/vmimpl') diff --git a/vm/vmimpl/vmimpl.go b/vm/vmimpl/vmimpl.go index 532611abd..7d3411ee9 100644 --- a/vm/vmimpl/vmimpl.go +++ b/vm/vmimpl/vmimpl.go @@ -43,6 +43,11 @@ type Instance interface { // Command is terminated after timeout. Send on the stop chan can be used to terminate it earlier. Run(timeout time.Duration, stop <-chan bool, command string) (outc <-chan []byte, errc <-chan error, err error) + // Diagnose forces VM to dump additional debugging info + // (e.g. sending some sys-rq's or SIGABORT'ing a Go program). + // Returns true if it did anything. + Diagnose() bool + // Close stops and destroys the VM. Close() } -- cgit mrf-deployment