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: TestNetpollDeadlock failure on darwin/amd64 #22403

rsc opened this issue Oct 23, 2017 · 1 comment


None yet
3 participants
Copy link

commented Oct 23, 2017

This could just be more of the usual macOS flakiness, but I wanted to record it here because it reminds me a little of #22394 in that a pollWait appears to have gotten stuck.

--- FAIL: TestNetpollDeadlock (60.02s)
	crash_test.go:88: testprognet NetpollDeadlock exit status: exit status 2
	crash_test.go:398: output does not start with "done\n":
		SIGQUIT: quit
		PC=0x105747b m=0 sigcode=0
		goroutine 0 [idle]:
		runtime.mach_semaphore_wait(0x1003, 0x1261270, 0x1261270, 0x1027d8a, 0x7fff00000e03, 0x11dcb00, 0x7fff5fbff258, 0x1051c83, 0xffffffffffffffff, 0x10271e1, ...)
			/Users/rsc/go/src/runtime/sys_darwin_amd64.s:542 +0xb
		runtime.semasleep1(0xffffffffffffffff, 0x10271e1)
			/Users/rsc/go/src/runtime/os_darwin.go:417 +0x52
			/Users/rsc/go/src/runtime/os_darwin.go:436 +0x33
			/Users/rsc/go/src/runtime/asm_amd64.s:437 +0xab
		runtime.semasleep(0xffffffffffffffff, 0x7fff5fbff2d0)
			/Users/rsc/go/src/runtime/os_darwin.go:435 +0x44
			/Users/rsc/go/src/runtime/lock_sema.go:167 +0xe9
			/Users/rsc/go/src/runtime/proc.go:2082 +0x8c
			/Users/rsc/go/src/runtime/proc.go:2467 +0x2da
			/Users/rsc/go/src/runtime/proc.go:2578 +0xb6
			/Users/rsc/go/src/runtime/asm_amd64.s:363 +0x5b
		goroutine 1 [IO wait, locked to thread]:
		internal/poll.runtime_pollWait(0x12c3ff0, 0x77, 0x12c3ff8)
			/Users/rsc/go/src/runtime/netpoll.go:173 +0x57
		internal/poll.(*pollDesc).wait(0xc4200c2098, 0x77, 0xc42005f600, 0xc42005f690, 0xc42005f601)
			/Users/rsc/go/src/internal/poll/fd_poll_runtime.go:85 +0xae
		internal/poll.(*pollDesc).waitWrite(0xc4200c2098, 0xc4200c2000, 0x0, 0x0)
			/Users/rsc/go/src/internal/poll/fd_poll_runtime.go:94 +0x3d
		internal/poll.(*FD).WaitWrite(0xc4200c2080, 0xc42009c008, 0xc42009c008)
			/Users/rsc/go/src/internal/poll/fd_unix.go:411 +0x37
		net.(*netFD).connect(0xc4200c2080, 0x1146c80, 0xc42009c008, 0x0, 0x0, 0x11462c0, 0xc4200bc0c0, 0x0, 0x0, 0x0, ...)
			/Users/rsc/go/src/net/fd_unix.go:152 +0x290
		net.(*netFD).dial(0xc4200c2080, 0x1146c80, 0xc42009c008, 0x1146fe0, 0x0, 0x1146fe0, 0xc420096660, 0xc42005f8a0, 0x10cefae)
			/Users/rsc/go/src/net/sock_posix.go:142 +0xe9
		net.socket(0x1146c80, 0xc42009c008, 0x112e813, 0x3, 0x1e, 0x1, 0x0, 0x0, 0x1146fe0, 0x0, ...)
			/Users/rsc/go/src/net/sock_posix.go:93 +0x1a6
		net.internetSocket(0x1146c80, 0xc42009c008, 0x112e813, 0x3, 0x1146fe0, 0x0, 0x1146fe0, 0xc420096660, 0x1, 0x0, ...)
			/Users/rsc/go/src/net/ipsock_posix.go:141 +0x129
		net.doDialTCP(0x1146c80, 0xc42009c008, 0x112e813, 0x3, 0x0, 0xc420096660, 0xc42005fbe0, 0x10b17ac, 0x11dc0e0)
			/Users/rsc/go/src/net/tcpsock_posix.go:62 +0xb9
		net.dialTCP(0x1146c80, 0xc42009c008, 0x112e813, 0x3, 0x0, 0xc420096660, 0x2, 0x59ee25e0, 0x72b3b)
			/Users/rsc/go/src/net/tcpsock_posix.go:58 +0xe4
		net.dialSingle(0x1146c80, 0xc42009c008, 0xc4200c2000, 0x1146680, 0xc420096660, 0x0, 0x0, 0x0, 0x0)
			/Users/rsc/go/src/net/dial.go:547 +0x395
		net.dialSerial(0x1146c80, 0xc42009c008, 0xc4200c2000, 0xc4200aa1c0, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0)
			/Users/rsc/go/src/net/dial.go:515 +0x22d
		net.(*Dialer).DialContext(0xc42005fe18, 0x1146c80, 0xc42009c008, 0x112e813, 0x3, 0x113016b, 0xf, 0x0, 0x0, 0x0, ...)
			/Users/rsc/go/src/net/dial.go:397 +0x6a1
		net.(*Dialer).Dial(0xc42005fe18, 0x112e813, 0x3, 0x113016b, 0xf, 0x0, 0x8, 0xc4200be000, 0x0)
			/Users/rsc/go/src/net/dial.go:320 +0x75
		net.Dial(0x112e813, 0x3, 0x113016b, 0xf, 0x0, 0x0, 0xc4200aa101, 0xc420094360)
			/Users/rsc/go/src/net/dial.go:291 +0x99
			/Users/rsc/go/src/runtime/testdata/testprognet/net.go:19 +0x8f
		main.registerInit(0x11300c6, 0xf, 0x1136448)
			/Users/rsc/go/src/runtime/testdata/testprognet/main.go:20 +0x78
			/Users/rsc/go/src/runtime/testdata/testprognet/net.go:13 +0x42
		goroutine 19 [syscall]:
			/Users/rsc/go/src/runtime/sigqueue.go:131 +0xa7
			/Users/rsc/go/src/os/signal/signal_unix.go:22 +0x22
		created by os/signal.init.0
			/Users/rsc/go/src/os/signal/signal_unix.go:28 +0x41
		rax    0xe
		rbx    0x11dd240
		rcx    0x7fff5fbff1f8
		rdx    0x7fff5fbff280
		rdi    0x1003
		rsi    0x1
		rbp    0x7fff5fbff230
		rsp    0x7fff5fbff1f8
		r8     0x0
		r9     0x0
		r10    0x0
		r11    0x286
		r12    0xffffffffffffffff
		r13    0x4
		r14    0x3
		r15    0x80
		rip    0x105747b
		rflags 0x286
		cs     0x7
		fs     0x0
		gs     0x0
FAIL	runtime	81.104s

@rsc rsc added this to the Go1.10 milestone Oct 23, 2017

@rsc rsc modified the milestones: Go1.10, Go1.11 Nov 22, 2017

@ianlancetaylor ianlancetaylor modified the milestones: Go1.11, Go1.10 Nov 22, 2017


This comment has been minimized.

Copy link

commented Jan 3, 2018

My guess is that the connect is simply timing out. A connect on Darwin will time out in 75 seconds. We give the program 60 seconds to complete. What we are seeing here is that the program is hanging running init functions, and getting killed. That makes this a dup of #22019, so, closing as dup.

@golang golang locked and limited conversation to collaborators Jan 3, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.