Skip to content

runtime: TestLockedDeadlock2 is flaky #35274

Closed
@bcmills

Description

@bcmills

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

Activity

added
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Oct 31, 2019
added this to the Go1.14 milestone on Oct 31, 2019
changed the title [-]runtime: TestLockedDeadlock2 failure on darwin-amd64-10_11[/-] [+]runtime: TestLockedDeadlock2 is flaky[/+] on Oct 31, 2019
bcmills

bcmills commented on Oct 31, 2019

@bcmills
ContributorAuthor
danscales

danscales commented on Oct 31, 2019

@danscales
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

ianlancetaylor commented on Oct 31, 2019

@ianlancetaylor
Contributor

Could be #35294.

gopherbot

gopherbot commented on Nov 1, 2019

@gopherbot
Contributor

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

locked and limited conversation to collaborators on Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.release-blocker

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @danscales@ianlancetaylor@cuonglm@bcmills@gopherbot

        Issue actions

          runtime: TestLockedDeadlock2 is flaky · Issue #35274 · golang/go