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
Limit recursion-depth in dataflow to a configurable constant #1611
Conversation
6d8b7b9
to
e9ea424
Compare
55b70f3
to
00cdb1a
Compare
- Applying general fix to limit recursion depth while executing continuations - Adding test triggering stack overflows (without this patch) - Fly-by changes in future_data avoiding unneeded refcnt incref/decref
00cdb1a
to
dddf8c5
Compare
- This also applies similar changes to all related spots, needs a thorough code review. Essentially, after calling execute_deferred() the future may have become ready, thus it needs not to be handled by facilities like dataflow(), when_all(), etc.
5fa9599
to
ad2aae0
Compare
This is open for a week now. Please comment asap. |
Conflicts: hpx/lcos/local/packaged_continuation.hpp
} | ||
#endif | ||
#endif | ||
}} | ||
|
||
/////////////////////////////////////////////////////////////////////////////// |
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.
The changes here look unrelated to the recursion depth. Can we have them in a different changeset?
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.
These are unrelated indeed, sorry for those slipping in. They are the result of the necessity to resolve some merge conflicts, things wouldn't compile otherwise.
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.
These changes have been applied to master as well, please disregard them here.
The changes to |
They are not unrelated. If the futures are deferred, then these changes avoid unlimited recursion inside the when_XXX and wait_XXX functions. |
Looks good to me as it seems to fix the issues we currently have. However, those issues might reappear if the limit isn't small enough, for example when a large amount of stack space was previously allocated. I think this needs further thinking instead of trusting on some "magic" number, but the changes are good to be merged |
I agree, but don't have a better solution at this point. |
Limit recursion-depth in dataflow to a configurable constant
No description provided.