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: “lock ordering problem” between trace and wbufSpans #52794

bcmills opened this issue May 9, 2022 · 3 comments

runtime: “lock ordering problem” between trace and wbufSpans #52794

bcmills opened this issue May 9, 2022 · 3 comments
NeedsFix release-blocker


Copy link

@bcmills bcmills commented May 9, 2022


37363  ======
0 : trace 28 0x8485a0
1 : wbufSpans 39 0x840770
fatal error: lock ordering problem

(attn @golang/runtime; see previously #41021)

@bcmills bcmills added NeedsInvestigation release-blocker labels May 9, 2022
@bcmills bcmills added this to the Go1.19 milestone May 9, 2022
Copy link

@rhysh rhysh commented May 9, 2022

If I understand the log correctly, this would mean that lockrank.go would not allow write barriers when an M is holding trace.lock. The call to gcWriteBarrierCX comes from, setting trace.strings = nil. But that line also exists in go1.18.1, still within the section that holds trace.lock

Another "missing, but valid, edge on the wbufSpans lock"?

I don't see lockRankTrace in the list for lockRankMHeap , but I also don't see anywhere in runtime.StopTrace that allocates .. only write barriers.

Copy link

@mknyszek mknyszek commented May 10, 2022

@rhysh Yeah, this just looks like a missing edge to me. The write barrier path can acquire the mheap lock in order to allocate a new write barrier buffer.

@bcmills bcmills added the NeedsFix label May 10, 2022
@gopherbot gopherbot removed the NeedsInvestigation label May 10, 2022
@mknyszek mknyszek self-assigned this May 10, 2022
Copy link

@gopherbot gopherbot commented May 10, 2022

Change mentions this issue: runtime: add lock partial order edge for trace and wbufSpans and mheap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
NeedsFix release-blocker
None yet

No branches or pull requests

4 participants