-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
maps: segmentation violation in maps.Clone #69110
Comments
Note: this is similar to #62203 but it's a different code path, and this version includes that fix. |
Stop using `maps.Clone` because of golang/go#69110 Fixes cockroachdb#3894
Stop using `maps.Clone` because of golang/go#69110 Fixes cockroachdb#3894
it seems that it is hard to reproduce this bug.
|
@cuiweixie: are you sure it is actually running the test? On my machine (Apple M1), it can only do a couple hundred runs per 5s:
P.S. A friendly request - please don't post long irrelevant backtraces, it makes the issue hard to navigate. E.g. it would have been sufficient to post just |
Sorry, I changed the number of iterations! |
Stop using `maps.Clone` because of golang/go#69110 Fixes #3894
It took ~7 minutes for it to crash. But I tried again now and it didn't crash in 11 minutes. It might take a long time. Note that in cockroachdb/pebble#3894 we saw the fault on address 0 ( |
I run with you code now!
|
It might take a while, I'd increase the timeout to e.g. 1 hour. I ran it on many different versions on the test until I saw a crash, so it could have been a particularly lucky run. |
cc @golang/runtime |
I can reproduce, albeit rarely (~1 in 100000 runs). 1.22.5: tip: I suspect something about same-sized grow. I'll keep looking. |
Yes, looks like it is an odd interaction between same-sized growth, regular growth, and cloning. Here's a reproducer:
|
Change https://go.dev/cl/609757 mentions this issue: |
@gopherbot Please open backport issues. |
Backport issue(s) opened: #69155 (for 1.22), #69156 (for 1.23). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Go version
go version go1.22.5 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
This is a test that adds, removes, and clones a map:
What did you see happen?
Ran it under stress (
-exec 'stress -p 10'
) and got this (after a few thousand runs):What did you expect to see?
No crash.
The text was updated successfully, but these errors were encountered: