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

params: fix double promise call #1788

Merged
merged 6 commits into from
May 24, 2022
Merged

Conversation

julianoes
Copy link
Collaborator

This fixes a segfault/abort when using get_all_params(). The issue was that the timeout handler was not removed as it should have been, and so after a successful completion, we got another call from the timeout handler which then satisfies the promise a second time which is not possible.

This did not show up in the integration test (or at least not often) because the test was already destructed by the time the timeout would trigger.

Fixes #1785.

This fixes a segfault/abort when using get_all_params(). The issue was
that the timeout handler was not removed as it should have been, and so
after a successful completion, we got another call from the timeout
handler which then satisfies the promise a second time which is not
possible.

This did not show up in the integration test (or at least not often)
because the test was already destructed by the time the timeout would
trigger.
JonasVautherin
JonasVautherin previously approved these changes May 23, 2022
I had introduced unlock calls before calling callbacks in order to
prevent deadlocks. I don't think this is required anymore, as all
callbacks back to the user are now served later from a queue. This does
assume that we don't have any such deadlocks internally though.
JonasVautherin
JonasVautherin previously approved these changes May 23, 2022
The problem is that the function called when a timeout happens, always
calls the _all_params_callback which it should not. In fact, there
should be two different timeout handlers instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_all_params error (std::future_error: Promise already satisfied)
2 participants