Skip to content

runtime: TestSegv failures in race mode on darwin #73784

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
prattmic opened this issue May 19, 2025 · 3 comments
Closed

runtime: TestSegv failures in race mode on darwin #73784

prattmic opened this issue May 19, 2025 · 3 comments
Assignees
Labels
BugReport Issues describing a possible bug in the Go implementation. 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-Darwin release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@prattmic
Copy link
Member

This is a new consistent failure on darwin race builders. https://go.dev/cl/643897 started running TestSegv (and other testprog tests) in -race mode for the first time.

https://ci.chromium.org/ui/p/golang/builders/ci/gotip-darwin-arm64-race/b8714420763090571297/test-results?sortby=&groupby=

This test is fine in race mode on Linux, but on Darwin we seem to have some problem unwinding.

runtime: newstack sp=0x16d1e69a0 stack=[0xc00003e000, 0xc00003e800]
        	morebuf={pc:0x102dac62c sp:0x16d1e69a0 lr:0x0}
        	sched={pc:0x102c913fc sp:0x16d1e69a0 lr:0x102dac62c ctxt:0x0}
        runtime: gp=0xc0000828c0, goid=19, gp->status=0x2
         runtime: split stack overflow: 0x16d1e69a0 < 0xc00003e000
        fatal error: runtime: split stack overflow
        
        runtime stack:
        runtime.throw({0x102df1816?, 0x102c54044?})
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1089 +0x34 fp=0x16d1e68c0 sp=0x16d1e6890 pc=0x102c8f784
        runtime.newstack()
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/stack.go:1052 +0x588 fp=0x16d1e69f0 sp=0x16d1e68c0 pc=0x102c75148
        runtime.morestack()
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_arm64.s:392 +0x70 fp=0x16d1e69f0 sp=0x16d1e69f0 pc=0x102c953b0
        
        goroutine 19 gp=0xc0000828c0 m=0 mp=0x102f9dc40 [running]:
        runtime.sigpanic()
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/signal_unix.go:906 +0x35c fp=0x16d1e69a0 sp=0x16d1e69a0 pc=0x102c913fc
        runtime: g 19: unexpected return pc for runtime.sigpanic called from 0x102dac62c
        stack: frame={sp:0x16d1e69a0, fp:0x16d1e69a0} stack=[0xc00003e000,0xc00003e800)
        
        created by main.SegvInCgo in goroutine 1
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/testdata/testprogcgo/segv.go:21 +0x94
@prattmic prattmic self-assigned this May 19, 2025
@prattmic prattmic added the NeedsFix The path to resolution is known, but the work has not been done. label May 19, 2025
@prattmic prattmic added this to the Backlog milestone May 19, 2025
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label May 19, 2025
@prattmic
Copy link
Member Author

This is easy to reproduce by running ./testprog Segv on a gomote. Other failure modes I've seen:

traceback: unexpected SPWRITE function racecall                       
fatal error: traceback                                                                                                                                 
                                                                           
runtime stack:                                                      
runtime.throw({0x104776beb?, 0x1046e06b0?})
        /usr/local/google/home/mpratt/src/go/src/runtime/panic.go:1089 +0x34 fp=0x16b7daf10 sp=0x16b7daee0 pc=0x1046d7ff4       
runtime.(*unwinder).resolveInternal(0x16b7db068, 0x0?, 0x1?)
        /usr/local/google/home/mpratt/src/go/src/runtime/traceback.go:365 +0x308 fp=0x16b7daf90 sp=0x16b7daf10 pc=0x1046c8bc8   
runtime.(*unwinder).next(0x16b7db068)
        /usr/local/google/home/mpratt/src/go/src/runtime/traceback.go:513 +0x148 fp=0x16b7db020 sp=0x16b7daf90 pc=0x1046c8d58
runtime.copystack(0xc000003500, 0x1000)
        /usr/local/google/home/mpratt/src/go/src/runtime/stack.go:935 +0x2b8 fp=0x16b7db120 sp=0x16b7db020 pc=0x1046c0158    
runtime.newstack()                        
        /usr/local/google/home/mpratt/src/go/src/runtime/stack.go:1117 +0x354 fp=0x16b7db250 sp=0x16b7db120 pc=0x1046c05e4
runtime.morestack()
        /usr/local/google/home/mpratt/src/go/src/runtime/asm_arm64.s:392 +0x70 fp=0x16b7db250 sp=0x16b7db250 pc=0x1046dd670

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/674276 mentions this issue: runtime: disable TestSegv in race mode

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label May 19, 2025
@dmitshur dmitshur modified the milestones: Backlog, Go1.25 May 22, 2025
@dmitshur dmitshur added OS-Darwin Testing An issue that has been verified to require only test changes, not just a test failure. labels May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. 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-Darwin release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants