Skip to content
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 program consumes the entire budget on panic with jit #18683

Closed
jackcmay opened this issue Jul 15, 2021 · 7 comments · Fixed by #18869
Closed

BPF program consumes the entire budget on panic with jit #18683

jackcmay opened this issue Jul 15, 2021 · 7 comments · Fixed by #18869
Assignees

Comments

@jackcmay
Copy link
Contributor

Problem

When running a local node with jit and executing the panic bpf program the runtime reports that the entire compute budget was consumed when actually only a few thousand were.

This behavior has been observed on mainnet, its not clear there if the issue is only with panic or other program exits as well.

Proposed Solution

This appears to have something to do with how jitt'd programs account for compute budget on exit.

This can be recreated by running a local node with jit enabled, deploying the panic program, and sending it an instruction with no accounts and no instruction data. This should also be recreatable in a unit test but I was not able to observe that.

@jackcmay
Copy link
Contributor Author

Here is another example, this time the program retuned an error: https://explorer.solana.com/tx/55NUP1eDmu5YnnbVDe7FbvYDFoX1UqSSVLMEmwWsBwDDL6i3Cy9z3EKrC1tMRQPGcSEQVZkWRDM6fMBkPWrop6UY

@Lichtso
Copy link
Contributor

Lichtso commented Jul 15, 2021

This only happens if JIT is enabled, right?
What happens if you extract the program and run it in the standalone CLI tool?

@jackcmay
Copy link
Contributor Author

Didn't try that

@jackcmay
Copy link
Contributor Author

This bug will be exposed further to developers via #18715

@Lichtso
Copy link
Contributor

Lichtso commented Jul 23, 2021

I just released RBPF v0.2.14 which should fix this.
Can you check if the issues still occurs on this branch?

@jackcmay
Copy link
Contributor Author

Yup, look good!

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2022

This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants