Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: TestGdbPython* fails on solaris #20821

Open
binarycrusader opened this issue Jun 27, 2017 · 15 comments
Open

runtime: TestGdbPython* fails on solaris #20821

binarycrusader opened this issue Jun 27, 2017 · 15 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done. OS-Solaris Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@binarycrusader
Copy link
Contributor

binarycrusader commented Jun 27, 2017

On a development build of Solaris, TestGdbPythonCgo fails:

$ uname -a
SunOS darwin-sunw 5.12 s12_127 i86pc i386 i86pc
$ gdb --version
GNU gdb (GDB) 7.12.1
$ go version
go version devel +33b3cc1568 Tue Jun 27 20:45:38 2017 +0000 solaris/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="solaris"
GOOS="solaris"
GOPATH="/builds/srwalker/gocode"
GORACE=""
GOROOT="/builds/srwalker/golang/go-trunk"
GOTOOLDIR="/builds/srwalker/golang/go/pkg/tool/solaris_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build788895360=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
$ go test -v -run TestGdbPythonCgo
=== RUN   TestGdbPythonCgo
--- FAIL: TestGdbPythonCgo (2.51s)
        runtime-gdb_test.go:55: gdb version 7.12
        runtime-gdb_test.go:218: goroutine 1 bt failed: #0  0x00007fffbf25574a in __nanosleep () from /lib/64/libc.so.1
                #1  0x00007fffbf23d8e3 in nanosleep () from /lib/64/libc.so.1
                Backtrace stopped: previous frame inner to this frame (corrupt stack?)
FAIL
exit status 1
FAIL    runtime 2.520s

At the moment, it's unclear if this is due to GDB 7.12 or because of something else as all other runtime tests pass. I intend to investigate and root cause if possible soon.

@binarycrusader
Copy link
Contributor Author

Modifying the test to print the contents of blocks at the point of failure produces:

=== RUN   TestGdbPythonCgo
map[info locals:slicevar.len = 1
slicevar.cap = 16
slicevar.ptr = "def"
mapvar = map[string]string = {["abc"] = "def", ["ghi"] = "jkl"}
strvar = "abc" goroutine 1 bt:#0  0x00007fffbf25574a in __nanosleep () from /lib/64/libc.so.1
#1  0x00007fffbf23d8e3 in nanosleep () from /lib/64/libc.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?) goroutine 2 bt:#0  runtime.gopark (unlockf={void (struct runtime.g *, void *, bool *)} 0xc420030768, lock=0x6576e0 <runtime.forcegc>, reason="force gc (idle)", traceEv=20 '\024', traceskip=1) at /builds/srwalker/golang/go/src/runtime/proc.go:278
#1  0x00000000004daf5e in runtime.goparkunlock (lock=0x6576e0 <runtime.forcegc>, reason="force gc (idle)", traceEv=20 '\024', traceskip=1) at /builds/srwalker/golang/go/src/runtime/proc.go:283
#2  0x00000000004dac8c in runtime.forcegchelper () at /builds/srwalker/golang/go/src/runtime/proc.go:235
#3  0x0000000000501b51 in runtime.goexit () at /builds/srwalker/golang/go/src/runtime/asm_amd64.s:2337
#4  0x0000000000000000 in ?? () info goroutines:* 1 running  runtime.systemstack_switch
  2 waiting  runtime.gopark
  3 waiting  runtime.gopark
  4 runnable runtime.runfinq print mapvar:$1 = map[string]string = {["abc"] = "def", ["ghi"] = "jkl"} print strvar:$2 = "abc"]
--- FAIL: TestGdbPythonCgo (2.50s)
        runtime-gdb_test.go:55: gdb version 7.12
        runtime-gdb_test.go:219: goroutine 1 bt failed: #0  0x00007fffbf25574a in __nanosleep () from /lib/64/libc.so.1
                #1  0x00007fffbf23d8e3 in nanosleep () from /lib/64/libc.so.1
                Backtrace stopped: previous frame inner to this frame (corrupt stack?)
FAIL
exit status 1
FAIL    runtime 2.508s

@binarycrusader binarycrusader changed the title runtime: TestGdbPythonCgo fails on solaris runtime: TestGdbPython* fails on solaris Jun 27, 2017
@binarycrusader
Copy link
Contributor Author

binarycrusader commented Jun 27, 2017

The non-cgo variant fails the same way:

=== RUN   TestGdbPython
map[info goroutines:* 1 running  runtime.systemstack_switch
  2 waiting  runtime.gopark
  3 waiting  runtime.gopark
  4 runnable runtime.runfinq print mapvar:$1 = map[string]string = {["abc"] = "def", ["ghi"] = "jkl"} print strvar:$2 = "abc" info locals:slicevar.len = 1
slicevar.cap = 16
slicevar.ptr = "def"
mapvar = map[string]string = {["abc"] = "def", ["ghi"] = "jkl"}
strvar = "abc" goroutine 1 bt:#0  0x00007fffbf25574a in __nanosleep () from /lib/64/libc.so
#1  0x00007fffbf23d8e3 in nanosleep () from /lib/64/libc.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?) goroutine 2 bt:#0  runtime.gopark (unlockf={void (struct runtime.g *, void *, bool *)} 0xc420030768, lock=0x53efb0 <runtime.forcegc>, reason="force gc (idle)", traceEv=20 '\024', traceskip=1) at /builds/srwalker/golang/go/src/runtime/proc.go:278
#1  0x000000000042a06e in runtime.goparkunlock (lock=0x53efb0 <runtime.forcegc>, reason="force gc (idle)", traceEv=20 '\024', traceskip=1) at /builds/srwalker/golang/go/src/runtime/proc.go:283
#2  0x0000000000429d9c in runtime.forcegchelper () at /builds/srwalker/golang/go/src/runtime/proc.go:235
#3  0x0000000000450be1 in runtime.goexit () at /builds/srwalker/golang/go/src/runtime/asm_amd64.s:2337
#4  0x0000000000000000 in ?? ()]
--- FAIL: TestGdbPython (1.87s)
        runtime-gdb_test.go:55: gdb version 7.12
        runtime-gdb_test.go:219: goroutine 1 bt failed: #0  0x00007fffbf25574a in __nanosleep () from /lib/64/libc.so
                #1  0x00007fffbf23d8e3 in nanosleep () from /lib/64/libc.so
                Backtrace stopped: previous frame inner to this frame (corrupt stack?)
FAIL
exit status 1
FAIL    runtime 1.878s

@ianlancetaylor
Copy link
Contributor

At first glance it looks like gdb is unable to do a stack backtrace for a thread stopped in __nanosleep in the standard library. This may be a lack of debug info combined with a failure to understand the function prologue. Try writing a C function that calls nanosleep and see whether gdb can do a backtrace when the process is sleeping there.

@bradfitz bradfitz added OS-Solaris NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. labels Jun 27, 2017
@bradfitz bradfitz added this to the Go1.10 milestone Jun 27, 2017
@bradfitz
Copy link
Contributor

Marking Go 1.10 but if you want to add a t.Skip for Go 1.9, that's fine. Send a CL soon.

@binarycrusader
Copy link
Contributor Author

binarycrusader commented Jun 27, 2017

So I manually created 'hello.go' using the sample source from the test:

$ cat hello.go 
package main

import "fmt"
import "runtime"
var gslice []string
func main() {
        mapvar := make(map[string]string,5)
        mapvar["abc"] = "def"
        mapvar["ghi"] = "jkl"
        strvar := "abc"
        ptrvar := &strvar
        slicevar := make([]string, 0, 16)
        slicevar = append(slicevar, mapvar["abc"])
        fmt.Println("hi") // line 13
        _ = ptrvar
        gslice = slicevar
        runtime.KeepAlive(mapvar)
}

Then built that and tried to run it through gdb roughly the same as the test does:

$ go build hello.go 
$ ./hello 
hi
$ gdb hello
GNU gdb (GDB) 7.12.1
....
Reading symbols from hello...done.
Loading Go Runtime support.
(gdb) add-auto-load-safe-path /builds/srwalker/golang/go/src/runtime
(gdb) info auto-load python-scripts
Loaded  Script                                                                 
Yes     /builds/srwalker/golang/go/src/runtime/runtime-gdb.py                  
        full name: /builds/srwalker/golang/go-trunk/src/runtime/runtime-gdb.py
(gdb) set python print-stack full
(gdb) br fmt.Println
Breakpoint 1 at 0x48bd90: file /builds/srwalker/golang/go/src/fmt/print.go, line 256.
(gdb) run
Starting program: /tmp/hello 
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[New LWP    2        ]
[New LWP    3        ]
[New LWP    4        ]
[New LWP    5        ]
[New Thread 2 (LWP 2)]
[New Thread 3        ]
[New Thread 4        ]
[New Thread 5 (LWP 5)]
[Switching to Thread 1 (LWP 1)]

Thread 2 hit Breakpoint 1, fmt.Println (a= []interface {} = {...}, n=3, err=...) at /builds/srwalker/golang/go/src/fmt/print.go:256
256     func Println(a ...interface{}) (n int, err error) {
(gdb) where
#0  fmt.Println (a= []interface {} = {...}, n=3, err=...) at /builds/srwalker/golang/go/src/fmt/print.go:256
#1  0x0000000000493026 in main.main () at /tmp/hello.go:14
(gdb) info goroutines
* 1 running  runtime.systemstack_switch
  2 waiting  runtime.gopark
  3 waiting  runtime.gopark
  4 runnable runtime.runfinq
(gdb) up
#1  0x0000000000493026 in main.main () at /tmp/hello.go:14
14              fmt.Println("hi") // line 13
(gdb) print mapvar
$1 = map[string]string = {["abc"] = "def", ["ghi"] = "jkl"}
(gdb) print strvar
$2 = "abc"
(gdb) info locals
slicevar.len = 1
slicevar.cap = 16
slicevar.ptr = "def"
mapvar = map[string]string = {["abc"] = "def", ["ghi"] = "jkl"}
strvar = "abc"
(gdb) down
#0  fmt.Println (a= []interface {} = {...}, n=3, err=...) at /builds/srwalker/golang/go/src/fmt/print.go:256
256     func Println(a ...interface{}) (n int, err error) {
(gdb) goroutine 1 bt
#0  0x00007fffbf25574a in __nanosleep () from /lib/64/libc.so
#1  0x00007fffbf23d8e3 in nanosleep () from /lib/64/libc.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) goroutine 2 bt
#0  runtime.gopark (unlockf={void (struct runtime.g *, void *, bool *)} 0xc420032768, lock=0x53efb0 <runtime.forcegc>, reason="force gc (idle)", traceEv=20 '\024', traceskip=1)
    at /builds/srwalker/golang/go/src/runtime/proc.go:278
#1  0x000000000042a06e in runtime.goparkunlock (lock=0x53efb0 <runtime.forcegc>, reason="force gc (idle)", traceEv=20 '\024', traceskip=1) at /builds/srwalker/golang/go/src/runtime/proc.go:283
#2  0x0000000000429d9c in runtime.forcegchelper () at /builds/srwalker/golang/go/src/runtime/proc.go:235
#3  0x0000000000450be1 in runtime.goexit () at /builds/srwalker/golang/go/src/runtime/asm_amd64.s:2337
#4  0x0000000000000000 in ?? ()
(gdb) 

@binarycrusader
Copy link
Contributor Author

binarycrusader commented Jun 27, 2017

A simple C program:

$ cat sleep.c 
#include <time.h>
#include <stdio.h>

int main(int argc, char *argv[]) {
        struct timespec t, t2;
        t.tv_sec = 10;
        t.tv_nsec = 0;
        if (nanosleep(&t, &t2) < 0) {
                printf("nanosleep call failed\n");
                return (-1);
        }
        return (0);
}
$ gcc sleep.c
$ gdb ./a.out 
GNU gdb (GDB) 7.12.1
...
Reading symbols from ./a.out...(no debugging symbols found)...done.
(gdb) br nanosleep
Breakpoint 1 at 0x400e20
(gdb) run
Starting program: /tmp/a.out 
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[Switching to Thread 1 (LWP 1)]

Thread 2 hit Breakpoint 1, 0x00007fffbf23d824 in nanosleep () from /lib/64/libc.so.1
(gdb) where
#0  0x00007fffbf23d824 in nanosleep () from /lib/64/libc.so.1
#1  0x000000000040102a in main ()

@ianlancetaylor
Copy link
Contributor

Any idea why the Go program shows __nanosleep where the C program shows only nanosleep?

@binarycrusader
Copy link
Contributor Author

My guess is the difference is where the breakpoint was set; in Solaris libc, nanosleep is just a stub that almost immediately calls __nanosleep:

$ LD_BIND_NOW=1 gdb ./a.out 
GNU gdb (GDB) 7.12.1
...
Reading symbols from ./a.out...(no debugging symbols found)...done.
(gdb) br __nanosleep
Function "__nanosleep" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (__nanosleep) pending.
(gdb) run
Starting program: /tmp/a.out 
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
[Switching to Thread 1 (LWP 1)]

Thread 2 hit Breakpoint 1, 0x00007fffbf255740 in __nanosleep () from /lib/64/libc.so.1
(gdb) where
#0  0x00007fffbf255740 in __nanosleep () from /lib/64/libc.so.1
#1  0x00007fffbf23d89a in nanosleep () from /lib/64/libc.so.1
#2  0x000000000040102a in main ()
(gdb) 

@binarycrusader
Copy link
Contributor Author

Here's a minimal Go program that calls nanosleep via a C wrapper:

$ cat sleep.go
package main
// #include <time.h>
// #include <stdio.h>
// void mysleep(void) {
//      struct timespec t, t2;
//      t.tv_sec = 1;
//      t.tv_nsec = 0;
//      if (nanosleep(&t, &t2) < 0) {
//              printf("nanosleep call failed\n");
//              return;
//      }
// }
import "C"
import "fmt"

func main() {
        C.mysleep();
        fmt.Println("slept")
}

Built and run in gdb similar to failing test:

$ LD_BIND_NOW=1 gdb ./sleep
GNU gdb (GDB) 7.12.1
...
Reading symbols from ./sleep...done.
Loading Go Runtime support.
(gdb) add-auto-load-safe-path /builds/srwalker/golang/go/src/runtime
(gdb) info auto-load python-scripts
Loaded  Script                                                                 
Yes     /builds/srwalker/golang/go/src/runtime/runtime-gdb.py                  
        full name: /builds/srwalker/golang/go-trunk/src/runtime/runtime-gdb.py
(gdb) set python print-stack full
(gdb) br mysleep
Thread 2 hit Breakpoint 1, mysleep () at /tmp/sleep.go:8
8       //      if (nanosleep(&t, &t2) < 0) {
(gdb) where
#0  mysleep () at /tmp/sleep.go:8
#1  0x00000000005003c9 in runtime.asmcgocall () at /builds/srwalker/golang/go/src/runtime/asm_amd64.s:624
#2  0x00007fffbffff3c8 in ?? ()
#3  0x00000000004fc222 in runtime.(*mcache).nextFree.func1 () at /builds/srwalker/golang/go/src/runtime/malloc.go:553
#4  0x000000c420000180 in ?? ()
#5  0x00000000004dd1e0 in ?? () at /builds/srwalker/golang/go/src/runtime/proc.go:1060
#6  0x0000000000657000 in runtime.sched ()
#7  0x00007fffbffff420 in ?? ()
#8  0x0000000000657060 in ?? ()
#9  0x00007fffbffff410 in ?? ()
#10 0x00000000004dd244 in runtime.mstart () at /builds/srwalker/golang/go/src/runtime/proc.go:1142
#11 0x00000000004fe9b5 in runtime.rt0_go () at /builds/srwalker/golang/go/src/runtime/asm_amd64.s:186
#12 0x0000000000000001 in ?? ()
#13 0x00007fffbffff468 in ?? ()
#14 0x0000000000000001 in ?? ()
#15 0x00007fffbffff468 in ?? ()
#16 0x00007fffbffff450 in ?? ()
#17 0x00000000004b1873 in _start ()
(gdb) info goroutines
* 1 syscall  runtime.asmcgocall
  2 waiting  runtime.gopark
  3 waiting  runtime.gopark
  4 runnable runtime.runfinq
(gdb) br __nanosleep
Breakpoint 2 at 0x7fffbf255740
(gdb) cont
Continuing.
Thread 2 hit Breakpoint 2, 0x00007fffbf255740 in __nanosleep () from /lib/64/libc.so.1
(gdb) where
#0  0x00007fffbf255740 in __nanosleep () from /lib/64/libc.so.1
#1  0x00007fffbf23d8e3 in nanosleep () from /lib/64/libc.so.1
#2  0x0000000000543655 in mysleep () at /tmp/sleep.go:8
#3  0x00000000005003c9 in runtime.asmcgocall () at /builds/srwalker/golang/go/src/runtime/asm_amd64.s:624
#4  0x00007fffbffff3c8 in ?? ()
#5  0x00000000004fc222 in runtime.(*mcache).nextFree.func1 () at /builds/srwalker/golang/go/src/runtime/malloc.go:553
#6  0x000000c420000180 in ?? ()
#7  0x00000000004dd1e0 in ?? () at /builds/srwalker/golang/go/src/runtime/proc.go:1060
#8  0x0000000000657000 in runtime.sched ()
#9  0x00007fffbffff420 in ?? ()
#10 0x0000000000657060 in ?? ()
#11 0x00007fffbffff410 in ?? ()
#12 0x00000000004dd244 in runtime.mstart () at /builds/srwalker/golang/go/src/runtime/proc.go:1142
#13 0x00000000004fe9b5 in runtime.rt0_go () at /builds/srwalker/golang/go/src/runtime/asm_amd64.s:186
#14 0x0000000000000001 in ?? ()
#15 0x00007fffbffff468 in ?? ()
#16 0x0000000000000001 in ?? ()
#17 0x00007fffbffff468 in ?? ()
#18 0x00007fffbffff450 in ?? ()
#19 0x00000000004b1873 in _start ()
(gdb) info goroutines
* 1 syscall  runtime.asmcgocall
  2 waiting  runtime.gopark
  3 waiting  runtime.gopark
  4 runnable runtime.runfinq
(gdb) goroutine 1 bt
#0  runtime.asmcgocall () at /builds/srwalker/golang/go/src/runtime/asm_amd64.s:610
#1  0x00000000004b2dfd in runtime.cgocall (fn=0x543670 <_cgo_dab3f36848c5_Cfunc_mysleep>, arg=0xc420053f30, ~r2=537214832) at /builds/srwalker/golang/go/src/runtime/cgocall.go:133
#2  0x0000000000543531 in main._Cfunc_mysleep (r1=...) at command-line-arguments/_obj/_cgo_gotypes.go:41
#3  0x0000000000543572 in main.main () at /tmp/sleep.go:17
(gdb) goroutine 2 bt
#0  runtime.gopark (unlockf={void (struct runtime.g *, void *, bool *)} 0xc420030768, lock=0x656b80 <runtime.forcegc>, reason="force gc (idle)", traceEv=20 '\024', traceskip=1)
    at /builds/srwalker/golang/go/src/runtime/proc.go:278
#1  0x00000000004da68e in runtime.goparkunlock (lock=0x656b80 <runtime.forcegc>, reason="force gc (idle)", traceEv=20 '\024', traceskip=1) at /builds/srwalker/golang/go/src/runtime/proc.go:283
#2  0x00000000004da3bc in runtime.forcegchelper () at /builds/srwalker/golang/go/src/runtime/proc.go:235
#3  0x0000000000501281 in runtime.goexit () at /builds/srwalker/golang/go/src/runtime/asm_amd64.s:2337
#4  0x0000000000000000 in ?? ()

@ianlancetaylor
Copy link
Contributor

Thanks. I have no idea what is going on.

@binarycrusader
Copy link
Contributor Author

I built and tried gdb 7.11 as well; same problem. As such, I'm going to just add a t.Skip() for the moment until I have time to figure out what's gone wrong. The other test failures are more important at the moment.

@gopherbot
Copy link

CL https://golang.org/cl/46913 mentions this issue.

gopherbot pushed a commit that referenced this issue Jun 28, 2017
Updates #20821

Change-Id: I77a5b9a3bbb931845ef52a479549d71069af9540
Reviewed-on: https://go-review.googlesource.com/46913
Run-TryBot: Shawn Walker-Salas <shawn.walker@oracle.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@rsc rsc modified the milestones: Go1.10, Go1.11 Nov 22, 2017
@ianlancetaylor
Copy link
Contributor

This may have been affected by https://golang.org/cl/99617, which is in the 1.11beta1 release. It would be interesting to see whether the test passes now.

@ianlancetaylor ianlancetaylor modified the milestones: Go1.11, Go1.12 Jul 7, 2018
@andybons andybons modified the milestones: Go1.12, Go1.13 Feb 12, 2019
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
@jclulow
Copy link
Contributor

jclulow commented Oct 21, 2019

This appears to be true on illumos too, judging by this test run on an OpenIndiana system:

##### Testing packages.
# go tool dist test -run=^go_test:runtime$
--- FAIL: TestGdbPython (0.80s)
    runtime-gdb_test.go:65: gdb version 7.10
    runtime-gdb_test.go:232: gdb output: Loading Go Runtime support.
        Loaded  Script                                                                 
        Yes     /ws/go/master/src/runtime/runtime-gdb.py                               
        Breakpoint 1 at 0x494022: file /tmp/go-build917035161/main.go, line 15.
        [Thread debugging using libthread_db enabled]
        hi
        [Switching to Thread 1 (LWP 1)]
        
        Breakpoint 1, main.main () at /tmp/go-build917035161/main.go:17
        17              gslice = slicevar
        BEGIN info goroutines
        * 1 running  runtime.systemstack_switch
          2 waiting  runtime.gopark
          17 waiting  runtime.gopark
          18 waiting  runtime.gopark
          33 waiting  runtime.gopark
        END
        BEGIN print mapvar
        $1 = map[string]string = {["abc"] = "def", ["ghi"] = "jkl"}
        END
        BEGIN print strvar
        $2 = "abc"
        END
        BEGIN info locals
        mapvar = map[string]string = {["abc"] = "def", ["ghi"] = "jkl"}
        strvar = "abc"
        slicevar =  []string
        END
        BEGIN goroutine 1 bt
        #0  0xfffffd7feeeb9d7a in __nanosleep () from /lib/64/libc.so
        #1  0xfffffd7feeea3ba9 in nanosleep () from /lib/64/libc.so
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)
        END
        BEGIN goroutine 2 bt
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc000040fb0, lock=0x562e80 <runtime.forcegc>, reason=17 '\021', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x000000000042bfe7 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.forcegchelper () at /ws/go/master/src/runtime/proc.go:253
        #3  0x0000000000453461 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x0000000000000000 in ?? ()
        END
        BEGIN goroutine all bt
        #0  0xfffffd7feeeb9d7a in __nanosleep () from /lib/64/libc.so
        #1  0xfffffd7feeea3ba9 in nanosleep () from /lib/64/libc.so
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc000040fb0, lock=0x562e80 <runtime.forcegc>, reason=17 '\021', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x000000000042bfe7 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.forcegchelper () at /ws/go/master/src/runtime/proc.go:253
        #3  0x0000000000453461 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x0000000000000000 in ?? ()
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc00003c7a8, lock=0x562f80 <runtime.sweep>, reason=12 '\f', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x000000000041f1bc in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.bgsweep (c=0xc00006c000) at /ws/go/master/src/runtime/mgcsweep.go:70
        #3  0x0000000000453461 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x000000c00006c000 in ?? ()
        #5  0x0000000000000000 in ?? ()
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc00003cf40, lock=0x563060 <runtime.scavenge>, reason=13 '\r', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x000000000041e851 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.bgscavenge (c=0xc00006c000) at /ws/go/master/src/runtime/mgcscavenge.go:299
        #3  0x0000000000453461 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x000000c00006c000 in ?? ()
        #5  0x0000000000000000 in ?? ()
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc00009c758, lock=0x57e430 <runtime.finlock>, reason=16 '\020', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x0000000000415293 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.runfinq () at /ws/go/master/src/runtime/mfinal.go:175
        #3  0x0000000000453461 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x0000000000000000 in ?? ()
        END
        Breakpoint 2 at 0x49404d: file /tmp/go-build917035161/main.go, line 18.
        
        Breakpoint 2, main.main () at /tmp/go-build917035161/main.go:19
        19      }  // END_OF_PROGRAM
        BEGIN goroutine 1 bt at the end
        #0  0xfffffd7feeeb9d7a in __nanosleep () from /lib/64/libc.so
        #1  0xfffffd7feeea3ba9 in nanosleep () from /lib/64/libc.so
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)
        END
        
    runtime-gdb_test.go:94: malformed backtrace at line 2: Backtrace stopped: previous frame inner to this frame (corrupt stack?)
--- FAIL: TestGdbPythonCgo (1.28s)
    runtime-gdb_test.go:65: gdb version 7.10
    runtime-gdb_test.go:232: gdb output: 
        warning: Loadable section ".note.go.buildid" outside of ELF segments
        Loading Go Runtime support.
        Loading Go Runtime support.
        Breakpoint 1 at 0x4ad28a: file /tmp/go-build484688290/main.go, line 15.
        [Thread debugging using libthread_db enabled]
        [Switching to Thread 1 (LWP 1)]
        
        Breakpoint 1, main.main () at /tmp/go-build484688290/main.go:15
        15              fmt.Println("hi")
        BEGIN info goroutines
        * 1 running  runtime.systemstack_switch
          2 waiting  runtime.gopark
          18 waiting  runtime.gopark
          19 waiting  runtime.gopark
          34 waiting  runtime.gopark
        END
        BEGIN print mapvar
        $1 = map[string]string = {["ghi"] = "jkl", ["abc"] = "def"}
        END
        BEGIN print strvar
        $2 = "abc"
        END
        BEGIN info locals
        mapvar = map[string]string = {["ghi"] = "jkl", ["abc"] = "def"}
        strvar = "abc"
        slicevar =  []string
        END
        BEGIN goroutine 1 bt
        #0  0xfffffd7fed783cb7 in __lwp_park () from /lib/64/libc.so.1
        #1  0xfffffd7fed7761d8 in sema_wait_impl () from /lib/64/libc.so.1
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)
        END
        BEGIN goroutine 2 bt
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc000040fb0, lock=0x58a970 <runtime.forcegc>, reason=17 '\021', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x00000000004451b7 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.forcegchelper () at /ws/go/master/src/runtime/proc.go:253
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x0000000000000000 in ?? ()
        END
        BEGIN goroutine all bt
        #0  0xfffffd7fed783cb7 in __lwp_park () from /lib/64/libc.so.1
        #1  0xfffffd7fed7761d8 in sema_wait_impl () from /lib/64/libc.so.1
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)
        No such goroutine:  17
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc000040fb0, lock=0x58a970 <runtime.forcegc>, reason=17 '\021', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x00000000004451b7 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.forcegchelper () at /ws/go/master/src/runtime/proc.go:253
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x0000000000000000 in ?? ()
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc00003c7a8, lock=0x58aa80 <runtime.sweep>, reason=12 '\f', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x000000000043838c in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.bgsweep (c=0xc00007c000) at /ws/go/master/src/runtime/mgcsweep.go:70
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x000000c00007c000 in ?? ()
        #5  0x0000000000000000 in ?? ()
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc00003cf40, lock=0x58ab60 <runtime.scavenge>, reason=13 '\r', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x0000000000437a21 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.bgscavenge (c=0xc00007c000) at /ws/go/master/src/runtime/mgcscavenge.go:299
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x000000c00007c000 in ?? ()
        #5  0x0000000000000000 in ?? ()
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc0000ac758, lock=0x5a5f50 <runtime.finlock>, reason=16 '\020', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x000000000042e463 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.runfinq () at /ws/go/master/src/runtime/mfinal.go:175
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x0000000000000000 in ?? ()
        END
        Breakpoint 2 at 0x4ad30d: file /tmp/go-build484688290/main.go, line 19.
        hi
        
        Breakpoint 2, main.main () at /tmp/go-build484688290/main.go:20
        20      }  // END_OF_PROGRAM
        BEGIN goroutine 1 bt at the end
        #0  0xfffffd7fed783cb7 in __lwp_park () from /lib/64/libc.so.1
        #1  0xfffffd7fed7761d8 in sema_wait_impl () from /lib/64/libc.so.1
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)
        END
        
    runtime-gdb_test.go:248: package testing source file: /ws/go/master/src/runtime/runtime-gdb_test.go
    runtime-gdb_test.go:249: failed to load Go runtime support: 
        
        warning: Loadable section ".note.go.buildid" outside of ELF segments
        Loading Go Runtime support.
        Loading Go Runtime support.
        Breakpoint 1 at 0x4ad28a: file /tmp/go-build484688290/main.go, line 15.
        [Thread debugging using libthread_db enabled]
        [Switching to Thread 1 (LWP 1)]
        
        Breakpoint 1, main.main () at /tmp/go-build484688290/main.go:15
        15              fmt.Println("hi")
        BEGIN info goroutines
        * 1 running  runtime.systemstack_switch
          2 waiting  runtime.gopark
          18 waiting  runtime.gopark
          19 waiting  runtime.gopark
          34 waiting  runtime.gopark
        END
        BEGIN print mapvar
        $1 = map[string]string = {["ghi"] = "jkl", ["abc"] = "def"}
        END
        BEGIN print strvar
        $2 = "abc"
        END
        BEGIN info locals
        mapvar = map[string]string = {["ghi"] = "jkl", ["abc"] = "def"}
        strvar = "abc"
        slicevar =  []string
        END
        BEGIN goroutine 1 bt
        #0  0xfffffd7fed783cb7 in __lwp_park () from /lib/64/libc.so.1
        #1  0xfffffd7fed7761d8 in sema_wait_impl () from /lib/64/libc.so.1
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)
        END
        BEGIN goroutine 2 bt
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc000040fb0, lock=0x58a970 <runtime.forcegc>, reason=17 '\021', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x00000000004451b7 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.forcegchelper () at /ws/go/master/src/runtime/proc.go:253
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x0000000000000000 in ?? ()
        END
        BEGIN goroutine all bt
        #0  0xfffffd7fed783cb7 in __lwp_park () from /lib/64/libc.so.1
        #1  0xfffffd7fed7761d8 in sema_wait_impl () from /lib/64/libc.so.1
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)
        No such goroutine:  17
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc000040fb0, lock=0x58a970 <runtime.forcegc>, reason=17 '\021', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x00000000004451b7 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.forcegchelper () at /ws/go/master/src/runtime/proc.go:253
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x0000000000000000 in ?? ()
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc00003c7a8, lock=0x58aa80 <runtime.sweep>, reason=12 '\f', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x000000000043838c in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.bgsweep (c=0xc00007c000) at /ws/go/master/src/runtime/mgcsweep.go:70
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x000000c00007c000 in ?? ()
        #5  0x0000000000000000 in ?? ()
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc00003cf40, lock=0x58ab60 <runtime.scavenge>, reason=13 '\r', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x0000000000437a21 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.bgscavenge (c=0xc00007c000) at /ws/go/master/src/runtime/mgcscavenge.go:299
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x000000c00007c000 in ?? ()
        #5  0x0000000000000000 in ?? ()
        #0  runtime.gopark (unlockf={void (runtime.g *, void *, bool *)} 0xc0000ac758, lock=0x5a5f50 <runtime.finlock>, reason=16 '\020', traceEv=20 '\024', traceskip=1) at /ws/go/master/src/runtime/proc.go:305
        #1  0x000000000042e463 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /ws/go/master/src/runtime/proc.go:310
        #2  runtime.runfinq () at /ws/go/master/src/runtime/mfinal.go:175
        #3  0x000000000046c7e1 in runtime.goexit () at /ws/go/master/src/runtime/asm_amd64.s:1375
        #4  0x0000000000000000 in ?? ()
        END
        Breakpoint 2 at 0x4ad30d: file /tmp/go-build484688290/main.go, line 19.
        hi
        
        Breakpoint 2, main.main () at /tmp/go-build484688290/main.go:20
        20      }  // END_OF_PROGRAM
        BEGIN goroutine 1 bt at the end
        #0  0xfffffd7fed783cb7 in __lwp_park () from /lib/64/libc.so.1
        #1  0xfffffd7fed7761d8 in sema_wait_impl () from /lib/64/libc.so.1
        Backtrace stopped: previous frame inner to this frame (corrupt stack?)
        END
FAIL
FAIL    runtime 10.894s

@gopherbot
Copy link

Change https://golang.org/cl/202357 mentions this issue: runtime: temporarily skip gdb python-related tests on solaris

gopherbot pushed a commit that referenced this issue Oct 21, 2019
Updates #20821

Change-Id: I186356a78ac385a15b4604e0ea6110c4c212ebc4
Reviewed-on: https://go-review.googlesource.com/c/go/+/202357
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done. OS-Solaris Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
Status: Triage Backlog
Development

No branches or pull requests

7 participants