Skip to content

runtime: TestGdbPythonCgo, TestGdbPython are failing on linux/mips64le #39368

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

Closed
dmitshur opened this issue Jun 2, 2020 · 6 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Linux
Milestone

Comments

@dmitshur
Copy link
Member

dmitshur commented Jun 2, 2020

Spotted on the linux-mips64le-mengzhuo builder:

--- FAIL: TestGdbPythonCgo (4.08s)
    runtime-gdb_test.go:79: gdb version 8.1
    runtime-gdb_test.go:273: gdb output:
        [...]
    runtime-gdb_test.go:319: print slicemap failed: $2 = map[string][]string = {[0x1200d446e "e"] = {array = 0xc0001161b0, len = 3, cap = 3}, [0x1200d446a "a"] = {array = 0xc000116180, len = 3, cap = 3}}
--- FAIL: TestGdbPython (2.22s)
    runtime-gdb_test.go:79: gdb version 8.1
    runtime-gdb_test.go:273: gdb output:
        [...]
    runtime-gdb_test.go:319: print slicemap failed: $2 = map[string][]string = {[0xe2baa "a"] = {array = 0xc00005a180, len = 3, cap = 3}, [0xe2bae "e"] = {array = 0xc00005a1b0, len = 3, cap = 3}}
FAIL
FAIL	runtime	46.844s

This is occurring as of CL 235926. It's not happening on other ports, so it may be related to the builder.

(Not blocking the 1.15 release because the linux/mips64le port is not included in the list at https://golang.org/wiki/PortingPolicy#first-class-ports.)

/cc @dr2chase @mengzhuo

@dmitshur dmitshur added OS-Linux NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jun 2, 2020
@dmitshur dmitshur added this to the Backlog milestone Jun 2, 2020
@dr2chase
Copy link
Contributor

dr2chase commented Jun 3, 2020

I think I have a fix for that.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/236164 mentions this issue: runtime: repair and verify gdb printing fix for 7.12, 8.{1,2,3}.1, 9.2

@dmitshur dmitshur modified the milestones: Backlog, Go1.15 Jun 3, 2020
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jun 3, 2020
gopherbot pushed a commit that referenced this issue Jun 3, 2020
Hand-verified for listed gdb versions.  Gdb (apparently)
changed the way it names certain Go types, and this change
broke the pretty-printer-activating code in runtime-gdb.py

runtime-gdb_test.go now checks channel, map, string, and slice
printing unconditionally (i.e., no opt-out for old versions).

Updates #39368.

Change-Id: I98d72e1291c66bd40d970990e1a377ff2ed0c5d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/236164
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@siebenmann
Copy link

This commit (3949cae) causes build failures for me on amd64 Fedora 31 with a gdb --version of Fedora 8.3.50.20190824-30.fc31. What I see is:

--- FAIL: TestGdbPython (0.68s)
    runtime-gdb_test.go:77: gdb version 8.3
    runtime-gdb_test.go:270: gdb output:
        Loading Go Runtime support.
        Traceback (most recent call last):
          File "/data/code/go-lang/go/src/runtime/runtime-gdb.py", line 33, in <module>
            majorgdbversion = int(splitgdbversion[0])
        ValueError: invalid literal for int() with base 10: 'Fedora 8'
        Loaded  Script                                                                 
        Yes     /data/code/go-lang/go/src/runtime/runtime-gdb.py                       
        Breakpoint 1 at 0x49ac38: file /tmpfs/cks-gobuild/go-build918948481/main.go, line 26.
        hi
        
        Thread 1 "a.exe" hit Breakpoint 1, main.main () at /tmpfs/cks-gobuild/go-build918948481/main.go:26
        26              gslice = slicevar
        BEGIN info goroutines
        Undefined info command: "goroutines".  Try "help info".
        END
        BEGIN print mapvar
        $1 = (map[string]string) 0xc000104f48
        END
        BEGIN print slicemap
        $2 = (map[string][]string) 0xc00007c150
        END
        BEGIN print strvar
        $3 = 0x4be101 "abc"
        END
        BEGIN print chanint
        $4 = (chan int) 0xc00002a0b0
        END
        BEGIN print chanstr
        $5 = (chan string) 0xc0000301e0
        END
        BEGIN info locals
        mapvar = 0xc000104f48
        chanstr = 0xc0000301e0
        chanint = 0xc00002a0b0
        strvar = 0x4be101 "abc"
        slicemap = 0xc00007c150
        ptrvar = <optimized out>
        slicevar = {array = 0xc00011c000, len = 824634229168, cap = 824634229120}
        END
        BEGIN goroutine 1 bt
        Undefined command: "goroutine".  Try "help".
        END
        BEGIN goroutine all bt
        Undefined command: "goroutine".  Try "help".
        END
        No breakpoint at main.go:15.
        Breakpoint 2 at 0x49adb1: file /tmpfs/cks-gobuild/go-build918948481/main.go, line 29.
        map[a:[b c d] e:[f g h]], 99, spongepants
        
        Thread 1 "a.exe" hit Breakpoint 2, main.main () at /tmpfs/cks-gobuild/go-build918948481/main.go:29
        29      }  // END_OF_PROGRAM
        BEGIN goroutine 1 bt at the end
        Undefined command: "goroutine".  Try "help".
        END
    runtime-gdb_test.go:302: info goroutines failed: Undefined info command: "goroutines".  Try "help info".
--- FAIL: TestGdbPythonCgo (1.73s)
    runtime-gdb_test.go:77: gdb version 8.3
    runtime-gdb_test.go:270: gdb output:
        Loading Go Runtime support.
        Traceback (most recent call last):
          File "/data/code/go-lang/go/src/runtime/runtime-gdb.py", line 33, in <module>
            majorgdbversion = int(splitgdbversion[0])
        ValueError: invalid literal for int() with base 10: 'Fedora 8'
        Loading Go Runtime support.
        Traceback (most recent call last):
          File "/data/code/go-lang/go/src/runtime/runtime-gdb.py", line 33, in <module>
            majorgdbversion = int(splitgdbversion[0])
        ValueError: invalid literal for int() with base 10: 'Fedora 8'
        Breakpoint 1 at 0x49c738: file /tmpfs/cks-gobuild/go-build903045418/main.go, line 27.
        [Thread debugging using libthread_db enabled]
        Using host libthread_db library "/lib64/libthread_db.so.1".
        hi
        
        Thread 1 "a.exe" hit Breakpoint 1, main.main () at /tmpfs/cks-gobuild/go-build903045418/main.go:27
        27              gslice = slicevar
        BEGIN info goroutines
        Undefined info command: "goroutines".  Try "help info".
        END
        BEGIN print mapvar
        $1 = (map[string]string) 0xc000064f48
        END
        BEGIN print slicemap
        $2 = (map[string][]string) 0xc00011e150
        END
        BEGIN print strvar
        $3 = 0x4c1121 "abc"
        END
        BEGIN print chanint
        $4 = (chan int) 0xc00013e000
        END
        BEGIN print chanstr
        $5 = (chan string) 0xc000138120
        END
        BEGIN info locals
        mapvar = 0xc000064f48
        chanstr = 0xc000138120
        chanint = 0xc00013e000
        strvar = 0x4c1121 "abc"
        slicemap = 0xc00011e150
        ptrvar = <optimized out>
        slicevar = {array = 0xc000142000, len = 824634892720, cap = 824634892672}
        END
        BEGIN goroutine 1 bt
        Undefined command: "goroutine".  Try "help".
        END
        BEGIN goroutine all bt
        Undefined command: "goroutine".  Try "help".
        END
        No breakpoint at main.go:15.
        Breakpoint 2 at 0x49c8b1: file /tmpfs/cks-gobuild/go-build903045418/main.go, line 30.
        map[a:[b c d] e:[f g h]], 99, spongepants
        
        Thread 1 "a.exe" hit Breakpoint 2, main.main () at /tmpfs/cks-gobuild/go-build903045418/main.go:30
        30      }  // END_OF_PROGRAM
        BEGIN goroutine 1 bt at the end
        Undefined command: "goroutine".  Try "help".
        END
    runtime-gdb_test.go:302: info goroutines failed: Undefined info command: "goroutines".  Try "help info".
FAIL
FAIL    runtime 31.549s

Switching back to the commit immediately before it builds successfully; moving forward to this commit causes the failure.

@dr2chase
Copy link
Contributor

dr2chase commented Jun 3, 2020

Fixed by https://go-review.googlesource.com/c/go/+/236280

Slowbot tested on

linux-amd64
linux-amd64-fedora
linux-amd64-jessie
linux-amd64-sid
linux-mips64le-mengzhuo
linux-s390x-ibm

@dr2chase dr2chase closed this as completed Jun 3, 2020
@dmitshur
Copy link
Member Author

dmitshur commented Jun 3, 2020

Thank you @dr2chase.

@dr2chase
Copy link
Contributor

dr2chase commented Jun 4, 2020

Sorry about the hiccups. I'll never trust a version "number" again.

@golang golang locked and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Linux
Projects
None yet
Development

No branches or pull requests

4 participants