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: TestLockedDeadlock2 is flaky #35274

Closed
bcmills opened this issue Oct 31, 2019 · 5 comments
Closed

runtime: TestLockedDeadlock2 is flaky #35274

bcmills opened this issue Oct 31, 2019 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Oct 31, 2019

darwin-amd64-10_11 (https://build.golang.org/log/87cbb5de232913d0f63dd1690c7e01da6ff3a56b):

--- FAIL: TestLockedDeadlock2 (60.01s)
    crash_test.go:95: testprog LockedDeadlock2 exit status: exit status 2
    crash_test.go:207: output does not start with "fatal error: all goroutines are asleep - deadlock!\n":
        SIGQUIT: quit
        PC=0x7fff97615db6 m=0 sigcode=0
        
        goroutine 0 [idle]:
        runtime.pthread_cond_wait(0x11cb8a8, 0x11cb868, 0xc000000000)
        	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/sys_darwin.go:386 +0x39
        runtime.semasleep(0xffffffffffffffff, 0x7fff5fbff510)
        	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/os_darwin.go:63 +0x85
        runtime.notesleep(0x11cb668)
        	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/lock_sema.go:173 +0xe0
        runtime.stoplockedm()
        	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/proc.go:1995 +0x88
        runtime.schedule()
        	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/proc.go:2478 +0x49f
        runtime.park_m(0xc00005a480)
        	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/proc.go:2682 +0x9d
        runtime.mcall(0x1057076)
        	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/asm_amd64.s:318 +0x5b
        
        goroutine 1 [sleep]:
        time.Sleep(0xf4240)
        	/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/time.go:247 +0xba
        main.LockedDeadlock2()
        	/private/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/testdata/testprog/deadlock.go:60 +0x42
        main.main()
        	/private/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/testdata/testprog/main.go:34 +0x1cc
        
        goroutine 18 [select (no cases), locked to thread]:
        main.LockedDeadlock2.func1()
        	/private/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/testdata/testprog/deadlock.go:58 +0x25
        created by main.LockedDeadlock2
        	/private/var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/workdir/go/src/runtime/testdata/testprog/deadlock.go:56 +0x35
        
        rax    0x104
        rbx    0x200
        rcx    0x7fff5fbff318
        rdx    0x200
        rdi    0x11cb8a8
        rsi    0x20100000300
        rbp    0x7fff5fbff3d0
        rsp    0x7fff5fbff318
        r8     0x0
        r9     0x60
        r10    0x0
        r11    0x202
        r12    0x1
        r13    0x11cb868
        r14    0x20100000300
        r15    0x7fff7716c000
        rip    0x7fff97615db6
        rflags 0x203
        cs     0x7
        fs     0x0
        gs     0x0
FAIL
FAIL	runtime	76.602s

This may be the same root cause as #34575; I'm not sure.

CC @mknyszek @aclements @danscales

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 31, 2019
@bcmills bcmills added this to the Go1.14 milestone Oct 31, 2019
@bcmills bcmills changed the title runtime: TestLockedDeadlock2 failure on darwin-amd64-10_11 runtime: TestLockedDeadlock2 is flaky Oct 31, 2019
@bcmills
Copy link
Contributor Author

bcmills commented Oct 31, 2019

@cuonglm
Copy link
Member

cuonglm commented Oct 31, 2019

@danscales
Copy link
Contributor

I wasn't able to reproduce on the darwin-amd64-10_11 gomote running this command 100 times:

go test runtime -test.count=500 -test.run TestLockedDeadlock2

I guess this could be related to #34575 (since it seems to be a hang), even though that only ever showed up on ppc64. We could wait until the fix for that is in, and see if this problem repros. Just that we only saw cases within the last day seems like it would indicate it was a different issue.

@ianlancetaylor
Copy link
Contributor

Could be #35294.

@gopherbot
Copy link

Change https://golang.org/cl/204800 mentions this issue: runtime: wake netpoller when dropping P, don't sleep too long in sysmon

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants