Repository: go
Issue: runtime: TestGdbPythonCgo is flaky on linux-mips64le-rtrk builder
Labels: NeedsInvestigation,arch-mips,compiler/runtime

[2020-03-10T16:25:09-9f74f0a/linux-mips64le-rtrk](https://build.golang.org/log/831e6d961dc437580e7a28b21de9eda7f58bc052)
[2020-02-01T06:01:05-866920a/linux-mips64le-rtrk](https://build.golang.org/log/ad72868121a4b2d90e55564ce3555ccb31990fb1)
[2019-11-27T16:41:28-b11d02e/linux-mips64le-rtrk](https://build.golang.org/log/29671fce6fe13a427763ea98c037a631cb003738)
[2019-11-19T02:41:53-2d8c199/linux-mips64le-rtrk](https://build.golang.org/log/edacd43bb72f84c16e2aedd1f92d82a3662564cb)
[2019-11-15T18:31:19-398f9e1/linux-mips64le-rtrk](https://build.golang.org/log/093f96e39ec0226e76e0911e3b6e9413282060ca)
[2019-11-13T15:52:21-bf49905/linux-mips64le-rtrk](https://build.golang.org/log/e70febbaa80764d873d914f0588b3d46edfd3e02)
[2019-11-12T22:30:48-995ade8/linux-mips64le-rtrk](https://build.golang.org/log/12463488e52cafb2ce5ab8b9f0d1caec3ebf2196)

CC @ianlancetaylor @bogojevic @milanknezevic 

```
##### GOMAXPROCS=2 runtime -cpu=1,2,4 -quick
--- FAIL: TestGdbPythonCgo (6.02s)
    runtime-gdb_test.go:69: gdb version 8.2
    runtime-gdb_test.go:236: gdb output: Loading Go Runtime support.
        Loading Go Runtime support.
        Breakpoint 1 at 0x1200ad4b4: file /tmp/gobuilder-mips64le/tmp/go-build883242937/main.go, line 15.
        Couldn't get registers: No such process.
        BEGIN info goroutines
        Traceback (most recent call last):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 442, in invoke
            for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 91, in __getitem__
            if i < 0 or i >= self.len:
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 84, in len
            return int(self.val['len'])
        gdb.MemoryError: Cannot access memory at address 0x120193958
        Error occurred in Python command: Cannot access memory at address 0x120193958
        END
        BEGIN print mapvar
        No symbol "mapvar" in current context.
        END
        BEGIN print strvar
        No symbol "strvar" in current context.
        END
        BEGIN info locals
        No frame selected.
        END
        BEGIN goroutine 1 bt
        Traceback (most recent call last):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 536, in invoke
            self.invoke_per_goid(goid, cmd)
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 539, in invoke_per_goid
            pc, sp = find_goroutine(goid)
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 467, in find_goroutine
            for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 91, in __getitem__
            if i < 0 or i >= self.len:
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 84, in len
            return int(self.val['len'])
        gdb.MemoryError: Cannot access memory at address 0x120193958
        Error occurred in Python command: Cannot access memory at address 0x120193958
        END
        BEGIN goroutine 2 bt
        Traceback (most recent call last):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 536, in invoke
            self.invoke_per_goid(goid, cmd)
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 539, in invoke_per_goid
            pc, sp = find_goroutine(goid)
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 467, in find_goroutine
            for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 91, in __getitem__
            if i < 0 or i >= self.len:
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 84, in len
            return int(self.val['len'])
        gdb.MemoryError: Cannot access memory at address 0x120193958
        Error occurred in Python command: Cannot access memory at address 0x120193958
        END
        BEGIN goroutine all bt
        Traceback (most recent call last):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 530, in invoke
            for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 91, in __getitem__
            if i < 0 or i >= self.len:
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 84, in len
            return int(self.val['len'])
        gdb.MemoryError: Cannot access memory at address 0x120193958
        Error occurred in Python command: Cannot access memory at address 0x120193958
        END
        Breakpoint 2 at 0x1200ad55c: file /tmp/gobuilder-mips64le/tmp/go-build883242937/main.go, line 20.
        Cannot execute this command while the selected thread is running.
        BEGIN goroutine 1 bt at the end
        Traceback (most recent call last):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 536, in invoke
            self.invoke_per_goid(goid, cmd)
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 539, in invoke_per_goid
            pc, sp = find_goroutine(goid)
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 467, in find_goroutine
            for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 91, in __getitem__
            if i < 0 or i >= self.len:
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 84, in len
            return int(self.val['len'])
        gdb.MemoryError: Cannot access memory at address 0x120193958
        Error occurred in Python command: Cannot access memory at address 0x120193958
        END
        
    runtime-gdb_test.go:265: info goroutines failed: Traceback (most recent call last):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 442, in invoke
            for ptr in SliceValue(gdb.parse_and_eval("'runtime.allgs'")):
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 91, in __getitem__
            if i < 0 or i >= self.len:
          File "/tmp/gobuilder-mips64le/go/src/runtime/runtime-gdb.py", line 84, in len
            return int(self.val['len'])
        gdb.MemoryError: Cannot access memory at address 0x120193958
        Error occurred in Python command: Cannot access memory at address 0x120193958
FAIL
FAIL	runtime	177.962s
```