-
Notifications
You must be signed in to change notification settings - Fork 194
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
Fix use of shmem and unix_stream carriers in remote_controlboard and multipleanalogsensorclient network wrapper clients #3147
Merged
randaz81
merged 3 commits into
robotology:master
from
traversaro:fixshmemunixstreamcarriersfornwc
Nov 12, 2024
Merged
Fix use of shmem and unix_stream carriers in remote_controlboard and multipleanalogsensorclient network wrapper clients #3147
randaz81
merged 3 commits into
robotology:master
from
traversaro:fixshmemunixstreamcarriersfornwc
Nov 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update the release notes by adding a file in |
traversaro
had a problem deploying
to
code-analysis
October 25, 2024 10:10 — with
GitHub Actions
Failure
traversaro
temporarily deployed
to
code-analysis
October 25, 2024 10:10 — with
GitHub Actions
Inactive
traversaro
had a problem deploying
to
code-analysis
October 25, 2024 10:10 — with
GitHub Actions
Failure
traversaro
had a problem deploying
to
code-analysis
October 25, 2024 10:15 — with
GitHub Actions
Failure
traversaro
had a problem deploying
to
code-analysis
October 25, 2024 10:15 — with
GitHub Actions
Failure
traversaro
temporarily deployed
to
code-analysis
October 25, 2024 10:15 — with
GitHub Actions
Inactive
Nicogene
previously approved these changes
Oct 25, 2024
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
traversaro
temporarily deployed
to
code-analysis
October 26, 2024 10:30 — with
GitHub Actions
Inactive
traversaro
temporarily deployed
to
code-analysis
October 26, 2024 10:30 — with
GitHub Actions
Inactive
traversaro
had a problem deploying
to
code-analysis
October 26, 2024 10:30 — with
GitHub Actions
Failure
traversaro
had a problem deploying
to
code-analysis
October 27, 2024 09:34 — with
GitHub Actions
Failure
This comment was marked as outdated.
This comment was marked as outdated.
traversaro
changed the title
Fix and add tests for use of shmem and unix_stream carriers in remote_controlboard and multipleanalogsensorclient network wrapper clients
Fix use of shmem and unix_stream carriers in remote_controlboard and multipleanalogsensorclient network wrapper clients
Oct 27, 2024
This comment was marked as outdated.
This comment was marked as outdated.
traversaro
force-pushed
the
fixshmemunixstreamcarriersfornwc
branch
from
October 27, 2024 17:05
f06ba95
to
b7fd30a
Compare
traversaro
temporarily deployed
to
code-analysis
October 27, 2024 17:06 — with
GitHub Actions
Inactive
traversaro
had a problem deploying
to
code-analysis
October 27, 2024 17:06 — with
GitHub Actions
Failure
traversaro
had a problem deploying
to
code-analysis
October 27, 2024 17:06 — with
GitHub Actions
Failure
traversaro
temporarily deployed
to
code-analysis
October 27, 2024 17:06 — with
GitHub Actions
Inactive
traversaro
had a problem deploying
to
code-analysis
October 27, 2024 17:06 — with
GitHub Actions
Failure
traversaro
temporarily deployed
to
code-analysis
October 27, 2024 17:06 — with
GitHub Actions
Inactive
traversaro
force-pushed
the
fixshmemunixstreamcarriersfornwc
branch
from
October 27, 2024 17:13
b7fd30a
to
da454ae
Compare
traversaro
had a problem deploying
to
code-analysis
October 27, 2024 17:43 — with
GitHub Actions
Failure
traversaro
temporarily deployed
to
code-analysis
October 27, 2024 17:43 — with
GitHub Actions
Inactive
traversaro
temporarily deployed
to
code-analysis
October 27, 2024 17:43 — with
GitHub Actions
Inactive
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the context of walking, inside the
ergocub-torso
we are interested in establishing connection that continue to run even if the network interface over which they are established temporary goes down. The rationale for this is that at the moment in most demos we run theyarpserver
in the operator laptop and the walking and the robot robotinterface inside theergocub-torso
board embedded in the robot, and while walking the robot could loose the connection with the operator laptop where the yarpserver is running.To do so, we experimented with using
shmem
andunix_stream
carriers, experiencing the following problems:shmem
, sometimes there was a segfault on one of the two sides of the connection when the shmem connection was disconnected.unix_stream
, it was not possible to open a connection via themultipleanalogsensorsclient
.This PR fixes all these problems, in particular:
shmem
is disconnected by adding a generic mutex for the overall class, to ensure that it is not possible that a thread is calling onShmemInputStreamImpl::write
and that calls gets preempted by another thread that is callingShmemInputStreamImpl::close
and that is destryong the attributes thatShmemInputStreamImpl::write
was using, that was the reason for our segfaults.multipleanalogsensorsclient
, we were using thecarrier
parameter also for therpc
connection, but that is not aligned with othernwc
, so we switched to always usetcp
forrpc
connection as it happens forremote_controlboard
. I am not sure if therpc
not working overunix_stream
is expected or not, but anyhow modifyingmultipleanalogsensorsclient
to be more similar to othernwc
made sense to me anyhow. See also the related comment New carrier option for yarp clients connections #2716 (comment) .Furthermore, in this PR we also use theGENERATE
functionality ofcatch
to ensure that themultipleanalogsensorsclient
andremotecontrolboardremapper
tests are running on all the following carriers:tcp
,fast_tcp
,shmem
,unix_stream
The testing part was dropped as it was also exposed some existing issues that are hard to debug and for which the fix had to touch the internal behaviour of YARP's Port, with an high chance of regressions. For reference, those attempts are documented in the comment in this PRs (that are not hidden as outdated) and the related code is https://github.com/traversaro/yarp/tree/archiveattemptofixvalgrind .