-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: segmentation fault from vgetrandomPutState
and runtime.growslice
w/ runtime.OSLockThread
[1.24 backport]
#73144
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
Comments
Change https://go.dev/cl/662496 mentions this issue: |
@mvdan suggests that we consider making a 1.24.3 release early for this issue:
Let me add more context on the issue here: Brief summary: Applications that have goroutines exit while holding LockOSThread may crash randomly in running on Linux 6.11+ (because that enables the new VDSO getrandom support added in 1.24). We have reports that both Docker and Dagger suffer from these random crashes, which IIUC occur frequently enough to make those tools basically unusable with Go 1.24. We don't have reports from other projects, but goroutines exiting with LockOSThread held is fairly common in "container" projects because they may modify some thread state in a way that the thread can no longer be reused, and this is the mechanism to drop a thread. If I understand correctly, neither Docker or Dagger have made official releases targeting 1.24, both still target 1.23 minor releases. However, some Linux distributions built these projects with 1.24 for their package manager. It is releases from those package managers where users were encountering crashes. cc @golang/release |
fwiw, Arch Linux has already backported the patch and rebuilt |
k3s-io/k3s#11973 (comment) reports the same crash in containerd as well. (I'm not sure what's going on with the rest of that issue, which is marked as fixed. The crash report may be unrelated to the rest of the issue.) |
vgetrandomPutState
and runtime.growslice
w/ runtime.OSLockThread
[1.24 backport]vgetrandomPutState
and runtime.growslice
w/ runtime.OSLockThread
[1.24 backport]
This is affecting debian trixie and sid (docker specifically) so another +1 for a release with the fix. |
…opping P When an M is destroyed, we put its vgetrandom state back on the shared list for another M to reuse. This list is simply a slice, so appending to the slice may allocate. Currently this operation is performed in mdestroy, after the P is released, meaning allocation is not allowed. More the cleanup earlier in mdestroy when allocation is still OK. Also add //go:nowritebarrierrec to mdestroy since it runs without a P, which would have caught this bug. Fixes #73144. For #73141. Change-Id: I6a6a636c3fbf5c6eec09d07a260e39dbb4d2db12 Reviewed-on: https://go-review.googlesource.com/c/go/+/662455 Reviewed-by: Jason Donenfeld <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> (cherry picked from commit 0b31e6d) Reviewed-on: https://go-review.googlesource.com/c/go/+/662496
@prattmic requested issue #73141 to be considered for backport to the next 1.24 minor release.
The text was updated successfully, but these errors were encountered: