-
Notifications
You must be signed in to change notification settings - Fork 89
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
awkward1 form.parameters
exhibits unbounded memory growth
#2310
Comments
Yes, now I see it: RSS for this process is 80000 with the last line commented out, but grows ~linearly with it in. |
It's this function: (only in Uproot 4). |
Merely asking for the while True:
print("manipulating form",i)
i += 1
for _, branch in x.iteritems():
form = branch.interpretation.awkward_form(None)
# form = awkward_form_remove_uproot(awkward, form)
form.parameters |
It goes through this: awkward/src/python/content.cpp Lines 1737 to 1752 in 198cf61
It's possible that the |
This (whole script) shows the unbounded memory growth: import json
import awkward
form = awkward.forms.Form.fromjson(
json.dumps({"class": "EmptyArray", "parameters": {"a": "b"}})
)
i = 0
while True:
i += 1
if i % 100000 == 0:
print(i)
form.parameters |
That's mildly terrifying. I guess this should be moved over to an awkward issue in that case for a fix into the main-v1 branch? |
I'm working on that now. I can move this issue. Actually, I'm seeing it with some relief: we've been trying to find these tiny memory leaks for over 2 years, and it really was a major part of the motivation to rewrite in Python. After this, I'm going to check the reproducers on some of the old leak reports, to see if it's finally gone. This Python C API function is used on all of the bytes ↔ str conversions. I had thought that pybind11 would own it and delete it, but apparently not. |
awkward_form_remove_uproot
exhibits unbounded memory growthform.parameters
exhibits unbounded memory growth
This is an issue for all present users of coffea until they migrate to the to-be released coffea 2023 (previously 0.8), due to how nanoevents manipulates the form.
The following code will grow in memory continuously, this becomes a problem for very long running jobs (and often kills people's analysis runs over the course of hours):
Upon commenting out this last line the unbounded memory growth stops.
The text was updated successfully, but these errors were encountered: