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: TestSegv failures with unknown pc on linux-mips-rtrk #59029

Closed
gopherbot opened this issue Mar 14, 2023 · 9 comments
Closed

runtime: TestSegv failures with unknown pc on linux-mips-rtrk #59029

gopherbot opened this issue Mar 14, 2023 · 9 comments
Assignees
Labels
arch-mips compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@gopherbot
Copy link

gopherbot commented Mar 14, 2023

#!watchflakes
post <- pkg == "runtime" && test == "TestSegv" && goarch ~ `mips` && `unknown pc`

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestSegv (0.00s)
    --- FAIL: TestSegv/Segv (0.05s)
        crash_cgo_test.go:622: /tmp/gobuilder-mips64/tmp/go-build3665412076/testprogcgo.exe Segv: exit status 2
        crash_cgo_test.go:623: SIGSEGV: segmentation violation
            PC=0x77ed2ca4 m=4 sigcode=0

            r0   0x0	r1   0x1
            r2   0x0	r3   0x1
            r4   0x3	r5   0x7297ec88
            r6   0x0	r7   0x0
            r8   0x0	r9   0x0
            r10  0x0	r11  0x77e9b400
            r12  0x1	r13  0x70c00481
            r14  0x0	r15  0x8f
            r16  0x77f23afc	r17  0x7297ec88
            r18  0x6c42a0	r19  0x800000
            r20  0x48fdec	r21  0x77eed000
            r22  0x7297ed9c	r23  0xfffffff8
            r24  0xc	r25  0x77ed2c50
            r26  0x10	r27  0x0
            r28  0x77ef5020	r29  0x7297ebc8
            r30  0x800d00	r31  0x577b08
            pc   0x77ed2ca4	link 0x577b08
            lo   0x0	hi   0x0

        crash_cgo_test.go:654: unexpectedly saw "runtime: " in output

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 14, 2023
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "runtime" && test == "TestSegv"
2023-03-13 22:04 linux-mips-rtrk go@40a6e2da runtime.TestSegv (log)
--- FAIL: TestSegv (0.00s)
    --- FAIL: TestSegv/Segv (0.05s)
        crash_cgo_test.go:622: /tmp/gobuilder-mips64/tmp/go-build3665412076/testprogcgo.exe Segv: exit status 2
        crash_cgo_test.go:623: SIGSEGV: segmentation violation
            PC=0x77ed2ca4 m=4 sigcode=0

            r0   0x0	r1   0x1
            r2   0x0	r3   0x1
            r4   0x3	r5   0x7297ec88
            r6   0x0	r7   0x0
            r8   0x0	r9   0x0
            r10  0x0	r11  0x77e9b400
            r12  0x1	r13  0x70c00481
            r14  0x0	r15  0x8f
            r16  0x77f23afc	r17  0x7297ec88
            r18  0x6c42a0	r19  0x800000
            r20  0x48fdec	r21  0x77eed000
            r22  0x7297ed9c	r23  0xfffffff8
            r24  0xc	r25  0x77ed2c50
            r26  0x10	r27  0x0
            r28  0x77ef5020	r29  0x7297ebc8
            r30  0x800d00	r31  0x577b08
            pc   0x77ed2ca4	link 0x577b08
            lo   0x0	hi   0x0

        crash_cgo_test.go:654: unexpectedly saw "runtime: " in output

watchflakes

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 14, 2023
@bcmills bcmills changed the title runtime: TestSegv failures runtime: TestSegv failures with unknown pc on linux-mips-rtrk Mar 14, 2023
@bcmills
Copy link
Contributor

bcmills commented Mar 14, 2023

(attn @golang/mips; CC @golang/runtime)

See also #52963.

@mknyszek
Copy link
Contributor

This looks like a failure to unwind the stack? CC @aclements maybe?

@mknyszek
Copy link
Contributor

In triage @cherrymui is working on these tests anyway because of a ppc64 bug that might be related. (Signal lands in thread creation. This test is not cgo specific but is using a cgo binary.)

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "runtime" && test == "TestSegv" && goarch ~ `mips` && `unknown pc`
2023-04-14 20:10 linux-mips64le-rtrk go@5da1f415 runtime.TestSegv (log)
--- FAIL: TestSegv (0.00s)
    --- FAIL: TestSegv/Segv (0.05s)
        crash_cgo_test.go:628: /tmp/gobuilder-mips64le/tmp/go-build3342685780/testprogcgo.exe Segv: exit status 2
        crash_cgo_test.go:629: SIGSEGV: segmentation violation
            PC=0xfff75fc70c m=4 sigcode=0

            r0   0x0	r1   0x1
            r2   0x0	r3   0x1
            r4   0x3	r5   0xffcf05a5a0
            r6   0x0	r7   0x0
            r8   0xfff7652a60	r9   0xffcd7df8d0
            r10  0xffcd7d8290	r11  0x0
            r12  0xffcd7d8978	r13  0xffb80008e1
            r14  0x0	r15  0xfff75bd320
            r16  0x0	r17  0x1202f9500
            r18  0xfffbca0c5e	r19  0xfffbca0c5f
            r20  0x120092320	r21  0x0
            r22  0xffcf05a6d0	r23  0x1202b0000
            r24  0x8	r25  0xfff75fc6c0
            r26  0x10	r27  0x0
            r28  0xfff761f030	r29  0xffcf05a500
            r30  0xc000003520	r31  0x12017a950
            pc   0xfff75fc70c	link 0x12017a950
            lo   0x120	hi   0x0

        crash_cgo_test.go:660: unexpectedly saw "runtime: " in output

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "runtime" && test == "TestSegv" && goarch ~ `mips` && `unknown pc`
2023-05-05 21:04 linux-mips64le-rtrk go@89138ce7 runtime.TestSegv (log)
--- FAIL: TestSegv (0.00s)
    --- FAIL: TestSegv/Segv (0.05s)
        crash_cgo_test.go:651: /tmp/gobuilder-mips64le/tmp/go-build1129627506/testprogcgo.exe Segv: exit status 2
        crash_cgo_test.go:652: SIGSEGV: segmentation violation
            PC=0xfff709e70c m=3 sigcode=0

            r0   0x0	r1   0x1
            r2   0x0	r3   0x1
            r4   0x3	r5   0xffafafd5a0
            r6   0x0	r7   0x0
            r8   0xfff70f4a60	r9   0xffaeac38d0
            r10  0xffaeabc290	r11  0x0
            r12  0xffaeabc978	r13  0xffa00008e1
            r14  0x0	r15  0xfff705f320
            r16  0x0	r17  0x1202ff3b0
            r18  0x31	r19  0x188
            r20  0x0	r21  0x0
            r22  0xffafafd4f8	r23  0x1202c0000
            r24  0x8	r25  0xfff709e6c0
            r26  0x10	r27  0x0
            r28  0xfff70c1030	r29  0xffafafd500
            r30  0xc000002ea0	r31  0x12017cf30
            pc   0xfff709e70c	link 0x12017cf30
            lo   0x120	hi   0x0

        crash_cgo_test.go:683: unexpectedly saw "runtime: " in output

watchflakes

@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "runtime" && test == "TestSegv" && goarch ~ `mips` && `unknown pc`
2023-05-23 18:15 linux-mips64le-rtrk go@b0f15b4a runtime.TestSegv (log)
--- FAIL: TestSegv (0.00s)
    --- FAIL: TestSegv/Segv (0.05s)
        crash_cgo_test.go:651: /tmp/gobuilder-mips64le/tmp/go-build3946090123/testprogcgo.exe Segv: exit status 2
        crash_cgo_test.go:652: SIGSEGV: segmentation violation
            PC=0xfff77dc70c m=5 sigcode=0

            r0   0x0	r1   0x1
            r2   0x0	r3   0x1
            r4   0x3	r5   0xffaf1f95a0
            r6   0x0	r7   0x0
            r8   0xfff7832a60	r9   0xffae17f8d0
            r10  0xffae178290	r11  0x0
            r12  0xffae178978	r13  0xff980008e1
            r14  0x0	r15  0xfff779d320
            r16  0x0	r17  0x1203103b0
            r18  0x31	r19  0x188
            r20  0x0	r21  0x0
            r22  0xffaf1f94f8	r23  0x1202d0000
            r24  0x8	r25  0xfff77dc6c0
            r26  0x10	r27  0x0
            r28  0xfff77ff030	r29  0xffaf1f9500
            r30  0xc0000821a0	r31  0x1201864e0
            pc   0xfff77dc70c	link 0x1201864e0
            lo   0x120	hi   0x0

        crash_cgo_test.go:683: unexpectedly saw "runtime: " in output

watchflakes

@gopherbot
Copy link
Author

Change https://go.dev/cl/500535 mentions this issue: runtime: move Segv and TgkillSegv to testprog

gopherbot pushed a commit that referenced this issue Jun 5, 2023
The non-cgo test points Segv and TgkillSegv are currently in
testprogcgo. Although the test points don't explicitly use cgo,
being a cgo program, there is still some C code that runs when
the test point is invoked, such as thread creation code.

For the cgo test points, sometimes we fail to unwind the stack if
C code is involved. For the non-cgo ones, we want to always be
able to unwind the stack, so we check for stack unwinding failures.
But if a signal is landed in the small piece of C code mentioned
above, we may still fail to unwind. Move the non-cgo test points
to a pure-Go program to avoid this problem.

May fix #52963.
Updates #59029, #59443, #59492.

Change-Id: I35d99a0dd4c7cdb627e2083d2414887a24a2822d
Reviewed-on: https://go-review.googlesource.com/c/go/+/500535
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
@cherrymui
Copy link
Member

The CL above might help. Tentatively closing for now. If it occurs again watchflakes will reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-mips compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: Done
Development

No branches or pull requests

4 participants