-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: fatal error: stack growth after fork on s390x #58785
Comments
(attn @golang/s390x) |
In triage, we think that this might be a race mode bug. There's a stack growth triggered on |
I made code changes to introduce //go:norace and //go:nochkptr pragmas for forkAndExecInChild1()... I could see that the checkptrAlignment instrumentation was disabled.. But I could see another issue/failure.. Any thoughts or suggestions on this.. BenchmarkAESCFBEncrypt1K-4 fatal error: checkptr: converted pointer straddles multiple allocations goroutine 67 [running]: |
The new error seems not S390X-specific. I can reproduce on AMD64 with Also, do you mind sending a CL for the |
@cherrymui.. Thanks for your response on this and reproducing this issue on AMD64 and confirming that it not s390x specific one.. The issue is that "benchmarkAESStream()" gets called from various other functions such as: So, the "b.N" value inside the "benchmarkAESStream()" function is set using the "buf" that gets passed to this function. When I printed the b.N value inside "benchmarkAESStream()" function it printed these values below: And, the below "for" loop is run with "b.N" times everytime the control enters this function and calls "XORKeyStream()" inside it.. Loop running over ~1-billion times in the last case, causing the condition of a pointer straddling multiple heap objects, that too when we run this with "-race" option.. Fix that I have come up with to take care of this issue is that to create a copy of a buffer with "buf" length and send that buffer to the XORKeyStream() function instead of calling it inside the for loop.. Code snippet: When I made the above change and ran the "./race.bash" script from "src", all the tests passed and the race functionality worked correctly.. Please let me know your thoughts or comments on this... |
I know what the problem in
If The fix is pretty simple, just bail early |
Fix for the issue "BenchmarkAESCFBEncrypt1K-4 fatal error: checkptr: converted pointer straddles multiple allocations" seen both on s390x and on AMD64 has been given by Keith Randall.. Below is the link for the CL.. @randall77, I verified your fix on s390x and its working fine.. Thanks for accepting the issue and fixing it... |
Change https://go.dev/cl/481415 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. The issue is reproducible easily.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Race detection feature is not working properly on linux s390x. In order to evaluate that, I ran the "race.bash" script from "go/src" directory and I see that the script fails, and this is one of the errors that I am seeing.
What did you expect to see?
I expected the "race.bash" to run without any errors or issues.
What did you see instead?
The stack trace of the error is as below:
The text was updated successfully, but these errors were encountered: