-
Notifications
You must be signed in to change notification settings - Fork 18
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
New framework for detecting OOM issues #586
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #586 +/- ##
==========================================
- Coverage 85.50% 85.48% -0.02%
==========================================
Files 46 46
Lines 24227 24266 +39
Branches 24227 24266 +39
==========================================
+ Hits 20716 20745 +29
- Misses 1669 1672 +3
- Partials 1842 1849 +7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some clarification and DRYisms requested
Is it possible to run this as a binary, similar to |
@moodmosaic It could be possible. Once this is merged, we can create a binary for it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that safety net @Acaccia. The OOM issues are really a pain.
LGTM.
@Acaccia Let's do this :) |
This PR adds a new testing folder called oom-checker.
This one contains a new function
crosscheck_oom
which takes a snippet and modifies it so that the memory that should normally be available would be filled.It could show that a few functions currently suffer from OOM issue (#585, #592).
I am not very pleased by the handling of functions which take lists as arguments. Currently, lists are always computed at runtime, even those that are lists of literals. For such functions, I decided to give the possibility to add the type of arguments to the new
crosscheck
function, so that the length needed to compute it would be accounted in the filling of the memory. This is not very pretty, but I would prefer to have a temporary solution like this one and that we fix #587 instead of having a very beautiful solution that will be removed in a near future.I tried to check all functions that returns in-memory values, I might have forgotten a few.
We will also need another solution for checking functions calls (after all kind of
define-x
for functions, and withcontract-call?
).