proc/linux: do not route signals to threads while stopping (#1752)

* proc/linux: do not route signals to threads while stopping

While we are trying to stop the process we should not route signals
sent to threads because that will result in threads being resumed.
Also keep better track of which threads are stopped.

This fixes an incompatibility with Go 1.14, which sends a lot of
signals to its threads to implement non-cooperative preemption,
resulting in Delve hanging waiting for an already-stopped thread to
stop.

In principle however this bug has nothing to do with Go 1.14 and could
manifest in any instance of high signal pressure.

* Makefile: discard stderr of "go list"

In module mode "go" will print messages about downloading modules to
stderr, we shouldn't confuse them for the real command output.
This commit is contained in:
Alessandro Arzilli
2019-11-12 15:58:54 +01:00
committed by Derek Parker
parent 79143468ea
commit 4fc8528997
4 changed files with 27 additions and 10 deletions

View File

@ -187,7 +187,7 @@ func quotemaybe(args []string) []string {
func getoutput(cmd string, args ...interface{}) string {
x := exec.Command(cmd, strflatten(args)...)
x.Env = os.Environ()
out, err := x.CombinedOutput()
out, err := x.Output()
if err != nil {
log.Fatal(err)
}