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: SIGSEGV from runtime.(*timersBucket).addtimerLocked on darwin/arm64 #24790

Closed
eliasnaur opened this issue Apr 10, 2018 · 5 comments
Closed
Milestone

Comments

@eliasnaur
Copy link
Contributor

@eliasnaur eliasnaur commented Apr 10, 2018

[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x100a649bc]



goroutine 7 [running]:

runtime.throw(0x100b7e2be, 0x2a)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/runtime/panic.go:598 +0x4c fp=0x1300346d0 sp=0x1300346a0 pc=0x100a49a0c

runtime.sigpanic()

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/runtime/signal_unix.go:372 +0x23c fp=0x130034720 sp=0x1300346d0 pc=0x100a5d33c

runtime.lock(0x0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/runtime/lock_sema.go:43 +0x34 fp=0x130034760 sp=0x130034730 pc=0x100a2a514

runtime.timerproc(0x0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/runtime/time.go:208 +0x22c fp=0x1300347d0 sp=0x130034760 pc=0x100a649bc

runtime.goexit()

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/runtime/asm_arm64.s:1089 +0x4 fp=0x1300347d0 sp=0x1300347d0 pc=0x100a72374

created by runtime.(*timersBucket).addtimerLocked

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/runtime/time.go:160 +0xe4



goroutine 1 [chan receive]:

testing.(*T).Run(0x1300bc0f0, 0x100b77966, 0xc, 0x100b80458, 0x5acc65d5)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:839 +0x248

testing.runTests.func1(0x1300bc000)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:1081 +0x54

testing.tRunner(0x1300bc000, 0x130055df0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:791 +0xa8

testing.runTests(0x1300881c0, 0x100c47ed0, 0x1, 0x1, 0x1300ba0a8)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:1079 +0x248

testing.(*M).Run(0x1300ba100, 0x0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:996 +0x148

main.main()

	_testmain.go:42 +0x148



goroutine 20 [chan receive]:

testing.(*T).Run(0x1300bc1e0, 0x100b7628e, 0x3, 0x13007c6f0, 0x5acc65d5)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:839 +0x248

vendor/golang_org/x/net/nettest.TestTestConn(0x1300bc0f0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest_test.go:26 +0xa0

testing.tRunner(0x1300bc0f0, 0x100b80458)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:791 +0xa8

created by testing.(*T).Run

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:838 +0x22c



goroutine 21 [chan receive]:

testing.(*T).Run(0x1300bc870, 0x100b77f3f, 0xe, 0x13007c9a0, 0x1)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:839 +0x248

vendor/golang_org/x/net/nettest.testConn(0x1300bc1e0, 0x13007c720)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest_go17.go:20 +0x2f4

vendor/golang_org/x/net/nettest.TestConn(0x1300bc1e0, 0x13007c720)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest.go:38 +0x28

vendor/golang_org/x/net/nettest.TestTestConn.func1(0x1300bc1e0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest_test.go:73 +0xac

testing.tRunner(0x1300bc1e0, 0x13007c6f0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:791 +0xa8

created by testing.(*T).Run

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:838 +0x22c



goroutine 69 [semacquire]:

sync.runtime_Semacquire(0x130086628)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/runtime/sema.go:56 +0x2c

sync.(*WaitGroup).Wait(0x130086620)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/sync/waitgroup.go:130 +0x64

vendor/golang_org/x/net/nettest.testPresentTimeout(0x1300bc870, 0x100b94d40, 0x13000e040, 0x100b94d40, 0x1300920a0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest.go:279 +0x13c

vendor/golang_org/x/net/nettest.timeoutWrapper(0x1300bc870, 0x13007c720, 0x100b80528)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest.go:57 +0x1a4

vendor/golang_org/x/net/nettest.testConn.func8(0x1300bc870)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest_go17.go:20 +0x34

testing.tRunner(0x1300bc870, 0x13007c9a0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:791 +0xa8

created by testing.(*T).Run

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/testing/testing.go:838 +0x22c



goroutine 71 [sleep]:

time.Sleep(0x5f5e100)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/runtime/time.go:102 +0x118

vendor/golang_org/x/net/nettest.testPresentTimeout.func1(0x130086620, 0x13001a070, 0x100b94d40, 0x13000e040)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest.go:252 +0x48

created by vendor/golang_org/x/net/nettest.testPresentTimeout

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest.go:250 +0xb8



goroutine 72 [runnable]:

vendor/golang_org/x/net/nettest.testPresentTimeout.func2(0x130086620, 0x100b94d40, 0x13000e040, 0x1300bc870, 0x13001a070)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest.go:257

created by vendor/golang_org/x/net/nettest.testPresentTimeout

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest.go:257 +0xf8



goroutine 73 [runnable]:

syscall.Syscall(0x4, 0x5, 0x1301e8800, 0x400, 0x400, 0x0, 0x0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/syscall/asm_darwin_arm64.s:13 +0x8

syscall.write(0x5, 0x1301e8800, 0x400, 0x400, 0x1300bad00, 0x0, 0x0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/syscall/zsyscall_darwin_arm64.go:1321 +0x48

syscall.Write(0x5, 0x1301e8800, 0x400, 0x400, 0x400, 0x0, 0x0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/syscall/syscall_unix.go:191 +0x38

internal/poll.(*FD).Write(0x1300bad80, 0x1301e8800, 0x400, 0x400, 0x0, 0x0, 0x0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/internal/poll/fd_unix.go:262 +0x118

net.(*netFD).Write(0x1300bad80, 0x1301e8800, 0x400, 0x400, 0x400, 0x100b28fd4, 0x400)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/net/fd_unix.go:220 +0x3c

net.(*conn).Write(0x13000e040, 0x1301e8800, 0x400, 0x400, 0x0, 0x0, 0x0)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/net/net.go:188 +0x50

vendor/golang_org/x/net/nettest.testPresentTimeout.func3(0x130086620, 0x100b94d40, 0x13000e040, 0x1300bc870, 0x13001a070)

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest.go:272 +0x90

created by vendor/golang_org/x/net/nettest.testPresentTimeout

	/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/vendor/golang_org/x/net/nettest/conntest.go:268 +0x138

Process 690 exited with status = 2 (0x00000002) 
go_darwin_arm_exec: test timeout (test completion)
FAIL	vendor/golang_org/x/net/nettest	385.939s

From the builder https://build.golang.org/log/2447525d04850cf62fc23eae4c5f7d2e003a2cfc.

@eliasnaur eliasnaur changed the title runtime: SIGSEGV from runtime.(* runtime: SIGSEGV from runtime.(*timersBucket).addtimerLocked on darwin/arm64 Apr 10, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone Apr 10, 2018
@eliasnaur
Copy link
Contributor Author

@eliasnaur eliasnaur commented Apr 13, 2018

@eliasnaur
Copy link
Contributor Author

@eliasnaur eliasnaur commented Jun 1, 2018

Perhaps this is an example of concurrent access to time.Timer instances, #25686.

@nvanbenschoten
Copy link
Contributor

@nvanbenschoten nvanbenschoten commented Jun 8, 2020

@ianlancetaylor you rewrote the runtime/time.go implementation in Go1.14 to address #6239. (*timersBucket).addtimerLocker was removed during this rewrite. While performing the rewrite, did you get a better sense of how this SIGSEGV was possible? Is it safe to assume that this issue is now fixed in Go1.14?

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jun 8, 2020

@nvanbenschoten Thanks for asking. I don't know what caused this. But the code is completely different, so I feel confident that this is fixed.

As far as I can tell it hasn't happened since April, 2018, so it may have been fixed (somehow) before the rewrite.

I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.