-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: 'unexpected fault address 0x0' in crypto/sha256.blockGeneric on linux/mips64le #42229
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
I suspect that this is a bug in the compiler or runtime specific to mips64le or perhaps MIPS in general. The symptom is similar to #34835. |
I don't understand this panic. As far as I can tell, the instruction reported can't panic.
Of course that doesn't correspond to the PC reported, so I'm not sure how reliable that deduction is. Is ASLR or other relocation going on for mips64le? I did
Then looked for sha256.blockGeneric in the resulting file. If a mips64 person can check my work, that would be great. |
@randall77 The other day I looked at it and came to the same conclusion: that instruction cannot panic.
No. |
If there is no funky remapping going on, then I think we may not be syncing to what the OP was looking at. I would expect the low 12 bits of any PCs to match with the OP's run and our disassembly, and they don't. |
Maybe. it's an off tree kernel from Loongson company. |
The version of the kernel you used on linux-mips64le-mengzhuo, you must be very clear. Please clarify this matter. |
It just pure guess. This kernel is a forked version of LInux 5.4.38 made by Lemote (a MIPS vendor). @XiaodongLoong |
New failure: https://build.golang.org/log/65f0559e504202b1f1859c3b4f588724000b231e This one shows sha256block.go:95 and the first failure log shows sha256block.go:101 go/src/crypto/sha256/sha256block.go Lines 90 to 105 in e508c1c
Both of lines are impossible to me, however second failure log shows RotateLeft32 failed access addr=0x0. Maybe an reg addr based related bug in the compiler? |
This is the instruction that address faulted:
That instruction can't address fault. Contradictory logic cycle ensues... |
This bug also affect mipsle What interest me is all failed from cmd/go/internal/cache |
Change https://golang.org/cl/279632 mentions this issue: |
@mengzhuo Are perhaps huge pages enabled on your machine? I seem to remember that there were series of similar failures on rtrk machines until huge pages support was fixed. |
Yes. THP is enabled.
Could you send me how rtrk fix this issue?
Thanks.
Dragan Mladjenovic <[email protected]>于2021年1月10日 周日10:30写道:
… @mengzhuo <https://github.com/mengzhuo> Are perhaps huge pages enabled on
your machine? I seem to remember that there were series of similar failures
on rtrk machines until huge pages support was fixed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42229 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGYHHQJVKRSMGJVXKPKNHTSZEGL5ANCNFSM4TATFRQQ>
.
|
I believe that it was fixed by this commit [1]. If it is missing from your kernel, you can disable THP ($ echo never > /sys/kernel/mm/transparent_hugepage/enabled) and leave it for some time to see if it fixes the problem. [1] torvalds/linux@b42aa3f#diff-d20543288b2266f423cf078db1e846e6c1ed83b226368f6bf477a65cb5179783 |
Looks like it recurred again: |
@draganmladjenovic I've disabled THP when this failed occurred. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
build golang and run test on linux/mips64le, report error:
Logs URL: https://build.golang.org/log/e160e033f5373a9699024cf8de6234d420215579
What did you expect to see?
The bug can be fixed.
What did you see instead?
The text was updated successfully, but these errors were encountered: