8000 runtime: lock ordering problem: strongFromWeakQueue, synctest · Issue #73817 · golang/go · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

runtime: lock ordering problem: strongFromWeakQueue, synctest #73817

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

Open
prattmic opened this issue May 21, 2025 · 4 comments
Open

runtime: lock ordering problem: strongFromWeakQueue, synctest #73817

prattmic opened this issue May 21, 2025 · 4 comments
Assignees
Labels
BugReport Issues describing a possible bug in the Go implementation. compiler/runtime Issues related to the Go compiler and/or runtime.

Comments

@prattmic
Copy link
Member

I saw this in a presubmit, not sure if it is new or not: https://ci.chromium.org/ui/p/golang/builders/try/gotip-linux-amd64-staticlockranking/b8714236497007266369/test-results?sortby=&groupby=

The crash is hidden away inside of JSON in the dist output, but I have formatted it nicely:

1263533  ======
0 : strongFromWeakQueue 8 0xe4d9b0
1 : synctest 34 0xc0003c4160
fatal error: lock ordering problem

runtime stack:
runtime.throw({0x9e0683?, 0x101000000e4fb60?})
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1094 +0x48 fp=0x7c981aef7d20 sp=0x7c981aef7cf0 pc=0x47f988
runtime.checkRanks(0xc000003c00, 0xc0003ee8c0?, 0x7c981aef7dd0?)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/lockrank_on.go:166 +0x216 fp=0x7c981aef7d80 sp=0x7c981aef7d20 pc=0x419176
runtime.lockWithRank.func1()
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/lockrank_on.go:87 +0x85 fp=0x7c981aef7db0 sp=0x7c981aef7d80 pc=0x418de5
runtime.lockWithRank(0x7c981aef7e38?, 0x451f3e?)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/lockrank_on.go:76 +0x79 fp=0x7c981aef7de8 sp=0x7c981aef7db0 pc=0x418d19
runtime.lock(...)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/lock_spinbit.go:152
runtime.(*synctestBubble).incActive(0xc0003c4160)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/synctest.go:110 +0x1b fp=0x7c981aef7e08 sp=0x7c981aef7de8 pc=0x4681db
runtime.park_m(0xc0003ee8c0)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/proc.go:4169 +0x65 fp=0x7c981aef7e68 sp=0x7c981aef7e08 pc=0x451ba5
runtime.mcall()
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_amd64.s:458 +0x55 fp=0x7c981aef7e80 sp=0x7c981aef7e68 pc=0x485e15

goroutine 275 gp=0xc0003ee8c0 m=6 mp=0xc0000b0008 [running, synctest bubble 170, not durably blocked]:
runtime.gopark(0xc00033b4b0?, 0x47d371?, 0x2b?, 0x88?, 0xc00033b4e0?)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/proc.go:460 +0xce fp=0xc00033b480 sp=0xc00033b460 pc=0x47faae
runtime.goparkunlock(...)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/proc.go:466
runtime.gcParkStrongFromWeak()
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mheap.go:2524 +0x59 fp=0xc00033b4c0 sp=0xc00033b480 pc=0x436eb9
weak.runtime_makeStrongFromWeak(0xc000510200)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/mheap.go:2459 +0x5c fp=0xc00033b4f0 sp=0xc00033b4c0 pc=0x47e2dc
weak.Pointer[...].Value(...)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/weak/pointer.go:89
crypto/tls.(*weakCertCache).newCert(0xc0000ccc00, {0xc000562a8b, 0x34c, 0x375})
        /home/swarming/.swarming/w/ir/x/w/goroot/src/crypto/tls/cache.go:21 +0xb2 fp=0xc00033b5b0 sp=0xc00033b4f0 pc=0x646032
crypto/tls.(*Conn).verifyServerCertificate(0xc00033e008, {0xc0005360f0, 0x1, 0x1})
        /home/swarming/.swarming/w/ir/x/w/goroot/src/crypto/tls/handshake_client.go:1111 +0xba fp=0xc00033b838 sp=0xc00033b5b0 pc=0x6616da
crypto/tls.(*clientHandshakeStateTLS13).readServerCertificate(0xc00033bc48)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/crypto/tls/handshake_client_tls13.go:659 +0x26f fp=0xc00033ba58 sp=0xc00033b838 pc=0x666a6f
crypto/tls.(*clientHandshakeStateTLS13).handshake(0xc00033bc48)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/crypto/tls/handshake_client_tls13.go:137 +0x76c fp=0xc00033bb18 sp=0xc00033ba58 pc=0x6635cc
crypto/tls.(*Conn).clientHandshake(0xc00033e008, {0xab9928, 0xc0000fee10})
        /home/swarming/.swarming/w/ir/x/w/goroot/src/crypto/tls/handshake_client.go:368 +0x80e fp=0xc00033bd40 sp=0xc00033bb18 pc=0x65d2ee
crypto/tls.(*Conn).clientHandshake-fm({0xab9928?, 0xc0000fee10?})
        \u003cautogenerated\u003e:1 +0x33 fp=0xc00033bd68 sp=0xc00033bd40 pc=0x699f53
crypto/tls.(*Conn).handshakeContext(0xc00033e008, {0xab9928, 0xc0000fedc0})
        /home/swarming/.swarming/w/ir/x/w/goroot/src/crypto/tls/conn.go:1574 +0x372 fp=0xc00033bf70 sp=0xc00033bd68 pc=0x654332
crypto/tls.(*Conn).HandshakeContext(...)
        /home/swarming/.swarming/w/ir/x/w/goroot/src/crypto/tls/conn.go:1514
net/http.(*persistConn).addTLS.func2()
        /home/swarming/.swarming/w/ir/x/w/goroot/src/net/http/transport.go:1703 +0x6e fp=0xc00033bfe0 sp=0xc00033bf70 pc=0x73510e
runtime.goexit({})
        /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_amd64.s:1693 +0x1 fp=0xc00033bfe8 sp=0xc00033bfe0 pc=0x487e41
created by net/http.(*persistConn).addTLS in goroutine 274
        /home/swarming/.swarming/w/ir/x/w/goroot/src/net/http/transport.go:1699 +0x309

cc @mknyszek @neild @golang/runtime

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label May 21, 2025
@neild neild self-assigned this May 21, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label May 21, 2025
@mknyszek mknyszek self-assigned this May 21, 2025
@mknyszek
Copy link
Contributor

It's possible this is just a missing partial order edge. But this might actually be a real lock ordering problem, in which case the fix might be trickier.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/675176 mentions this issue: runtime: define lock ranking between weak pointers and synctest

@neild
Copy link
Contributor
neild commented May 21, 2025

I think it's just missing an edge, mercifully.

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.
Projects
Status: No status
Development

No branches or pull requests

5 participants
0