Skip to content

extract the result response before the callback is issued. - #2133

Merged
fujitatomoya merged 1 commit into
humblefrom
fujitatomoya/humble/bugfix-rclcpp-issues-2130
Mar 30, 2023
Merged

fujitatomoya merged 1 commit into
humblefrom
fujitatomoya/humble/bugfix-rclcpp-issues-2130

Conversation

@fujitatomoya

Copy link
Copy Markdown
Collaborator

humble backport of #2132

  backport of #2132

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Chen Lihui <lihui.chen@sony.com>
@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

@iuhilnehc-ynos requesting review on this. since i borrowed your code, let me assign as co-author.

@fujitatomoya fujitatomoya self-assigned this Mar 20, 2023
@clalancette

Copy link
Copy Markdown
Contributor

I'm really not sure if we should backport this one to humble or not. It definitely changes behavior, in that a lock that was held across the callback before no longer is.

At the very least, we should do some additional testing in Rolling/Iron before we roll this change out to Humble.

@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

@clalancette

behavior change is actually correct. only thing that i can think of is the following critical case.

  • before, when user callback is executing, that element is in the pending_result_response. (this is guaranteed)
  • after, when user callback is executing, that element is NOT in the pending_result_response.

I think get system lock during user callback is unnecessary, and we should avoid that situation. there are some places that we do avoid this situation because that is easy to make dead lock. in this particular case, i do not see any reason to keep this mutex lock... maybe i might be missing though 💦

At the very least, we should do some additional testing in Rolling/Iron before we roll this change out to Humble.

I am not sure if we can add more test for this critical section, but i understand your concern.

at least, we can wait for a couple weeks to see #2132 could cause any issue? and then we can come back on this to see if we can backport this or not? How does that sound to you?

i mean, i am not pushing this backport fix asap since it is already there, but it would be nicer to avoid this deadlock eventually.

@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

btw, this PR can be backport to foxy. (see #2132 (comment))

@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

@Mergifyio backport foxy

@mergify

mergify Bot commented Mar 30, 2023 •

Copy link
Copy Markdown
Contributor

backport foxy

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Mar 30, 2023
backport of #2132

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Chen Lihui <lihui.chen@sony.com>
(cherry picked from commit c8ac675)
@fujitatomoya

Copy link
Copy Markdown
Collaborator Author

Ah, i just found that i did not run the CI against this PR. I will revert this and resubmit the PR again.

fujitatomoya pushed a commit that referenced this pull request Mar 30, 2023
…2133)"

This reverts commit c8ac675.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
fujitatomoya pushed a commit that referenced this pull request Mar 31, 2023
…2133)" (#2148)

This reverts commit c8ac675.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
fujitatomoya pushed a commit that referenced this pull request Mar 31, 2023
…sued. (#2133)" (#2148)"

This reverts commit 19a666f.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
fujitatomoya pushed a commit that referenced this pull request Apr 3, 2023
…sued. (#2133)" (#2148)" (#2152)

This reverts commit 19a666f.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
mergify Bot pushed a commit that referenced this pull request Apr 3, 2023
…sued. (#2133)" (#2148)" (#2152)

This reverts commit 19a666f.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit b2b7bde)
fujitatomoya pushed a commit that referenced this pull request Apr 4, 2023
…… (backport #2152) (#2153)

* Revert "Revert "extract the result response before the callback is issued. (#2133)" (#2148)" (#2152)

This reverts commit 19a666f.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit b2b7bde)

* address cpplint error.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

---------

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
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.

3 participants