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: TestGdbAutotmpTypes fails on Fedora 29 #27933

Closed
EduRam opened this issue Sep 29, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@EduRam
Copy link
Contributor

commented Sep 29, 2018

What version of Go are you using (go version)?

go version devel +a0e7f12771 Sat Sep 29 10:07:58 2018 +0000 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

[e@wks src]$ uname -a
Linux wks.lan 4.18.10-300.fc29.x86_64 #1 SMP Wed Sep 26 09:45:26 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

[e@wks src]$ cat /etc/redhat-release 
Fedora release 29 (Twenty Nine)

[e@wks src]$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/e/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/e/wrk/gopath"
GOPROXY=""
GORACE=""
GOROOT="/home/e/wrk/go"
GOTMPDIR=""
GOTOOLDIR="/home/e/wrk/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build898062232=/tmp/go-build -gno-record-gcc-switches"

What did you do?

./all.bash

What did you expect to see?

all tests passed

What did you see instead?

--- FAIL: TestGdbAutotmpTypes (2.90s)
    runtime-gdb_test.go:64: gdb version 8.2
    runtime-gdb_test.go:436: could not find struct []main.astruct; in 'info typrs astruct' output
    runtime-gdb_test.go:437: gdb output:
        Loading Go Runtime support.
        Breakpoint 1 at 0x453f30: file /tmp/go-build796830060/main.go, line 8.
        [New LWP 21555]
        [New LWP 21557]
        [New LWP 21558]
        [New LWP 21559]
        
        Thread 1 "a.exe" hit Breakpoint 1, main.main () at /tmp/go-build796830060/main.go:8
        8	func main() {
        9		var iface interface{} = map[string]astruct{}
        All types matching regular expression "astruct":
        
        File runtime:
        	[]main.astruct;
        	bucket<string,main.astruct>;
        	hash<string,main.astruct>;
        	main.astruct;
        	typedef hash<string,main.astruct> * map[string]main.astruct;
        	typedef noalg.[8]main.astruct noalg.[8]main.astruct;
        	noalg.map.bucket[string]main.astruct;
        	noalg.map.hdr[string]main.astruct;
--- FAIL: TestGdbPythonCgo (2.76s)
    runtime-gdb_test.go:64: gdb version 8.2
    runtime-gdb_test.go:213: gdb output: Loading Go Runtime support.
        Loading Go Runtime support.
        Breakpoint 1 at 0x47efc0: file /home/e/wrk/go/src/fmt/print.go, line 273.
        [Thread debugging using libthread_db enabled]
        Using host libthread_db library "/lib64/libthread_db.so.1".
        [New Thread 0x7ffff5b63700 (LWP 21571)]
        [New Thread 0x7ffff5362700 (LWP 21572)]
        [New Thread 0x7ffff4b61700 (LWP 21574)]
        [New Thread 0x7fffeffff700 (LWP 21575)]
        [New Thread 0x7fffef7fe700 (LWP 21580)]
        
        Thread 1 "a.exe" hit Breakpoint 1, fmt.Println (a=..., n=<optimized out>, err=...) at /home/e/wrk/go/src/fmt/print.go:273
        273	func Println(a ...interface{}) (n int, err error) {
        BEGIN info goroutines
        * 1 running  runtime.systemstack_switch
          2 waiting  runtime.gopark
          18 waiting  runtime.gopark
          19 runnable runtime.runfinq
        END
        #1  0x0000000000485730 in main.main () at /tmp/go-build339225470/main.go:15
        15		fmt.Println("hi")
        BEGIN print mapvar
        $1 = map[string]string = {[0x4b669e "abc"] = 0x4b66aa "def", [0x4b66b6 "ghi"] = 0x4b66bf "jkl"}
        END
        BEGIN print strvar
        $2 = 0x4b669e "abc"
        END
        BEGIN info locals
        slicevar = {array = 0xc0000a8000, len = 1, cap = 16}
        mapvar = map[string]string = {[0x4b669e "abc"] = 0x4b66aa "def", [0x4b66b6 "ghi"] = 0x4b66bf "jkl"}
        strvar = 0x4b669e "abc"
        END
        #0  fmt.Println (a=..., n=<optimized out>, err=...) at /home/e/wrk/go/src/fmt/print.go:273
        273	func Println(a ...interface{}) (n int, err error) {
        BEGIN goroutine 1 bt
        #0  fmt.Println (a=..., n=<optimized out>, err=...) at /home/e/wrk/go/src/fmt/print.go:273
        #1  0x0000000000485730 in main.main () at /tmp/go-build339225470/main.go:15
        END
        BEGIN goroutine 2 bt
        #0  runtime.gopark (unlockf=<optimized out>, lock=0x54fdc0 <runtime.forcegc>, reason=16 '\020', traceEv=20 '\024', traceskip=1) at /home/e/wrk/go/src/runtime/proc.go:303
        #1  0x000000000042a3e3 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /home/e/wrk/go/src/runtime/proc.go:308
        #2  0x000000000042a1b3 in runtime.forcegchelper () at /home/e/wrk/go/src/runtime/proc.go:251
        #3  0x00000000004517f1 in runtime.goexit () at /home/e/wrk/go/src/runtime/asm_amd64.s:1340
        #4  0x0000000000000000 in ?? ()
        END
        Breakpoint 2 at 0x48575d: file /tmp/go-build339225470/main.go, line 20.
        hi
        
        Thread 1 "a.exe" hit Breakpoint 2, main.main () at /tmp/go-build339225470/main.go:20
        20	}  // END_OF_PROGRAM
        BEGIN goroutine 1 bt at the end
        #0  main.main () at /tmp/go-build339225470/main.go:20
        END
        
    runtime-gdb_test.go:249: print mapvar failed: $1 = map[string]string = {[0x4b669e "abc"] = 0x4b66aa "def", [0x4b66b6 "ghi"] = 0x4b66bf "jkl"}
--- FAIL: TestGdbPython (1.57s)
    runtime-gdb_test.go:64: gdb version 8.2
    runtime-gdb_test.go:213: gdb output: Loading Go Runtime support.
        Loaded  Script                                                                 
        Yes     /home/e/wrk/go/src/runtime/runtime-gdb.py                              
        Breakpoint 1 at 0x47d5a0: file /home/e/wrk/go/src/fmt/print.go, line 273.
        [New LWP 21599]
        [New LWP 21603]
        [New LWP 21604]
        [New LWP 21605]
        
        Thread 1 "a.exe" hit Breakpoint 1, fmt.Println (a=..., n=<optimized out>, err=...) at /home/e/wrk/go/src/fmt/print.go:273
        273	func Println(a ...interface{}) (n int, err error) {
        BEGIN info goroutines
        * 1 running  runtime.systemstack_switch
          2 waiting  runtime.gopark
          3 waiting  runtime.gopark
          4 runnable runtime.runfinq
        END
        #1  0x0000000000483d10 in main.main () at /tmp/go-build823852741/main.go:14
        14		fmt.Println("hi")
        BEGIN print mapvar
        $1 = map[string]string = {[0x4b367e "abc"] = 0x4b368a "def", [0x4b3696 "ghi"] = 0x4b369f "jkl"}
        END
        BEGIN print strvar
        $2 = 0x4b367e "abc"
        END
        BEGIN info locals
        slicevar = {array = 0xc000088000, len = 1, cap = 16}
        mapvar = map[string]string = {[0x4b367e "abc"] = 0x4b368a "def", [0x4b3696 "ghi"] = 0x4b369f "jkl"}
        strvar = 0x4b367e "abc"
        END
        #0  fmt.Println (a=..., n=<optimized out>, err=...) at /home/e/wrk/go/src/fmt/print.go:273
        273	func Println(a ...interface{}) (n int, err error) {
        BEGIN goroutine 1 bt
        #0  fmt.Println (a=..., n=<optimized out>, err=...) at /home/e/wrk/go/src/fmt/print.go:273
        #1  0x0000000000483d10 in main.main () at /tmp/go-build823852741/main.go:14
        END
        BEGIN goroutine 2 bt
        #0  runtime.gopark (unlockf=<optimized out>, lock=0x54ac90 <runtime.forcegc>, reason=16 '\020', traceEv=20 '\024', traceskip=1) at /home/e/wrk/go/src/runtime/proc.go:303
        #1  0x0000000000428bf3 in runtime.goparkunlock (lock=<optimized out>, reason=<optimized out>, traceEv=<optimized out>, traceskip=<optimized out>) at /home/e/wrk/go/src/runtime/proc.go:308
        #2  0x00000000004289c3 in runtime.forcegchelper () at /home/e/wrk/go/src/runtime/proc.go:251
        #3  0x000000000044fe71 in runtime.goexit () at /home/e/wrk/go/src/runtime/asm_amd64.s:1340
        #4  0x0000000000000000 in ?? ()
        END
        Breakpoint 2 at 0x483d3d: file /tmp/go-build823852741/main.go, line 19.
        hi
        
        Thread 1 "a.exe" hit Breakpoint 2, main.main () at /tmp/go-build823852741/main.go:19
        19	}  // END_OF_PROGRAM
        BEGIN goroutine 1 bt at the end
        #0  main.main () at /tmp/go-build823852741/main.go:19
        END
        
    runtime-gdb_test.go:249: print mapvar failed: $1 = map[string]string = {[0x4b367e "abc"] = 0x4b368a "def", [0x4b3696 "ghi"] = 0x4b369f "jkl"}
FAIL
FAIL	runtime	37.551s
@EduRam

This comment has been minimized.

Copy link
Contributor Author

commented Sep 29, 2018

Probably duplicated from #27608

@agnivade

This comment has been minimized.

Copy link
Member

commented Sep 29, 2018

Can you try the patch at https://go-review.googlesource.com/c/go/+/135055 and see if it fixes your issue ?

@EduRam

This comment has been minimized.

Copy link
Contributor Author

commented Sep 30, 2018

It worked! All tests passed! Feel free to discard this Issue.

    cd runtime/
    unzip 15f99f6.diff.zip 
    git apply 15f99f6.diff
    cd ..
    ./all.bash 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.