Skip to content

runtime: document explicitly that finalizers and cleanups can hold up other finalizers and cleanups #72950

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
mknyszek opened this issue Mar 19, 2025 · 4 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation Issues describing a change to documentation.
Milestone

Comments

@mknyszek
Copy link
Contributor

We should add a sentence to the finalizer and cleanup documentation that makes it abundantly clear a finalizer/cleanup can hold up other ones. We should also list this as one of the complications of using them in https://go.dev/doc/gc-guide.

@mknyszek mknyszek added the Documentation Issues describing a change to documentation. label Mar 19, 2025
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 19, 2025
@gabyhelp
Copy link

@camdenmcgath
Copy link

@mknyszek are you working on this? I'd love to contribute some documentation if it's still needed.

@mknyszek
Copy link
Contributor Author

mknyszek commented Apr 9, 2025

@camdenmcgath Please go ahead! Sorry for the delay, I was unavailable until today.

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/671437 mentions this issue: runtime: report finalizer and cleanup queue length with checkfinalizer>0

gopherbot pushed a commit that referenced this issue May 20, 2025
This change adds tracking for approximate finalizer and cleanup queue
lengths. These lengths are reported once every GC cycle as a single line
printed to stderr when GODEBUG=checkfinalizer>0.

This change lays the groundwork for runtime/metrics metrics to produce
the same values.

For #72948.
For #72950.

Change-Id: I081721238a0fc4c7e5bee2dbaba6cfb4120d1a33
Reviewed-on: https://go-review.googlesource.com/c/go/+/671437
Reviewed-by: Michael Pratt <[email protected]>
Auto-Submit: Michael Knyszek <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Sirherobrine23 pushed a commit to Sirherobrine23/go that referenced this issue May 24, 2025
This change adds tracking for approximate finalizer and cleanup queue
lengths. These lengths are reported once every GC cycle as a single line
printed to stderr when GODEBUG=checkfinalizer>0.

This change lays the groundwork for runtime/metrics metrics to produce
the same values.

For golang#72948.
For golang#72950.

Change-Id: I081721238a0fc4c7e5bee2dbaba6cfb4120d1a33
Reviewed-on: https://go-review.googlesource.com/c/go/+/671437
Reviewed-by: Michael Pratt <[email protected]>
Auto-Submit: Michael Knyszek <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Documentation Issues describing a change to documentation.
Projects
Development

No branches or pull requests

4 participants