-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
BPF JIT segfault due to mprotect failure #18177
Comments
I have the same problem on my TdS validator:
|
Happened again with v1.7.4. |
I just merged the potential mitigation today: #18068 None the less, the conditions to reproduce this still remain a mystery ... |
Thanks! This happens relatively rarely, and systemd just restarts validator after the crash. I'll just wait until the next release. |
I managed to reproduce it by deploying a contract 🎉 The bad news is that it happens every time a new contract is deployed, so we definitely need to figure out the root cause. What happens with the mitigation? Will the validator mark the slot dead and fork every time a failure occurs? |
(just newbie's comment, deploy triggered oddity reminds me of #17350, which was hard to pin-down (ref: #17083 (comment))... I know @Lichtso knows way better than me around these relevant code. so, just my 2 cents) |
It's deploy-triggered, I think, because this causes a new JIT segment to be mapped. |
I found it much easier to cherry-pick relevant patches on solana_rbpf instead of cherry-picking rbpf updates on solana itself. Squashing merges are not helpful here =/. If anyone interested, here are the patches for solana_rbpf v0.2.11 (solana 1.7.8). Patched testnet validator works fine for 12 hours since update. |
This still occurs with 1.6.22:
Any chance the fix could be backported to 1.6.x? |
Interestingly, I have never seen this on mainnet with v1.6.*, but this happened like weekly on testnet with v1.7.*. I am currently running 1.7.11 with patched rbpf on testnet (no crashes since update to patched) and 1.6.22 on mainnet. Both on Fedora 34, kernel 5.13.12. |
Version:
Environment:
Reproducible by deploying a new program:
mprotect failure:
/proc/self/maps:
Backtrace:
Example crash that would follow the mprotect failure above (different crash!):
Disassembly:
rbpf crate fix that catches the mprotect error:
The text was updated successfully, but these errors were encountered: