[20227] Prevent index overflow and correctly assert the end iterator in DataSharing#4321
Merged
MiguelCompany merged 6 commits intomasterfrom Feb 20, 2024
Merged
[20227] Prevent index overflow and correctly assert the end iterator in DataSharing#4321MiguelCompany merged 6 commits intomasterfrom
MiguelCompany merged 6 commits intomasterfrom
Conversation
0be97cb to
88c548e
Compare
Contributor
Author
|
@richiprosima please test linux |
Contributor
Author
|
@richiprosima please test mac |
Contributor
Author
|
@richiprosima please test discovery_server |
Contributor
Author
|
@richiprosima please test mac |
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
9c0139e to
85a6457
Compare
Contributor
Author
|
@richiprosima please test this |
EduPonz
approved these changes
Feb 16, 2024
|
@richiprosima please test mac |
7 similar comments
Contributor
Author
|
@richiprosima please test mac |
Contributor
Author
|
@richiprosima please test mac |
Contributor
Author
|
@richiprosima please test mac |
Contributor
Author
|
@richiprosima please test mac |
|
@richiprosima please test mac |
Contributor
Author
|
@richiprosima please test mac |
Contributor
Author
|
@richiprosima please test mac |
Contributor
|
CI issues unrelated to the PR. Ready to merge! |
Member
|
@Mergifyio backport 2.12.x 2.10.x 2.6.x |
Contributor
✅ Backports have been createdDetails
|
mergify Bot
pushed a commit
that referenced
this pull request
Feb 20, 2024
…haring (#4321) * Refs #20227: Add DDS communication test Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Prevent history index to overflow history size Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Correctly assert the current end Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Linter Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Initialize test timeout argument properly Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Rev suggestion Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> --------- Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> (cherry picked from commit 66de89e)
mergify Bot
pushed a commit
that referenced
this pull request
Feb 20, 2024
…haring (#4321) * Refs #20227: Add DDS communication test Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Prevent history index to overflow history size Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Correctly assert the current end Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Linter Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Initialize test timeout argument properly Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Rev suggestion Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> --------- Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> (cherry picked from commit 66de89e)
This was referenced Feb 20, 2024
MiguelCompany
pushed a commit
that referenced
this pull request
Feb 21, 2024
…haring (#4321) (#4403) * Refs #20227: Add DDS communication test Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Prevent history index to overflow history size Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Correctly assert the current end Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Linter Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Initialize test timeout argument properly Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Rev suggestion Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> --------- Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> (cherry picked from commit 66de89e) Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
Mario-DL
added a commit
that referenced
this pull request
Feb 23, 2024
…haring (#4321) * Refs #20227: Add DDS communication test Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Prevent history index to overflow history size Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Correctly assert the current end Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Linter Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Initialize test timeout argument properly Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Rev suggestion Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> --------- Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
MiguelCompany
pushed a commit
that referenced
this pull request
Mar 1, 2024
…haring (#4321) (#4404) * Refs #20227: Add DDS communication test * Refs #20227: Prevent history index to overflow history size * Refs #20227: Correctly assert the current end * Refs #20227: Linter * Refs #20227: Initialize test timeout argument properly * Refs #20227: Rev suggestion --------- Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
EduPonz
pushed a commit
that referenced
this pull request
Mar 12, 2024
…haring (#4321) (#4402) * Refs #20227: Add DDS communication test Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Prevent history index to overflow history size Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Correctly assert the current end Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Linter Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Initialize test timeout argument properly Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #20227: Rev suggestion Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> --------- Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> (cherry picked from commit 66de89e) Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
This file contains hidden or 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
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.
Description
When a DataSharing compatible publisher and subscriber were launched at high frequency (publication interval set to
0), it happened two different issues:notified_endof the segment iterator was being updated before being actually checked, making anassert()compare two different versions of this iterator.next_payload_counter could occur.Apart from the included test, in order to reproduce the first issue it is enough to launch a
BasicConfigurationExamplewith aboundedtype and no sleep betweenwrites(). Launching, killing and relaunching the subscriber should trigger theassertion.For reproducing the second issue, launch the subscriber first and then the publisher, a
SIGSEVwill be triggered in20 secondsor so.This PR includes two fixes that mitigate the problem.
The idea of the test is that if in 20 seconds we have not crashed by some of the above issues, we give the test as passed.
Important note It was noticed that enabling all the verbosity messages in the test, makes the test not work properly under
colconsince thetimeoutnotification of theSubscriberModule.cppcondition variable is never fired. It seems that the test stresses the cpu and the timeout notification is lost. However, if thepython3is directly invoked from a terminal (outside colcon), then there is no problem even if all the logs are enabled.@Mergifyio backport 2.12.x 2.11.x 2.10.x 2.6.x
Contributor Checklist
versions.mdfile (if applicable).Reviewer Checklist