-
Notifications
You must be signed in to change notification settings - Fork 800
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 TCP infinite loop, client shutdown and reconnection [13540][13718][13721] #2470
Merged
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
New test |
@Mergifyio backport 2.4.x 2.3.x 2.1.x |
🟠 Waiting for conditions to match
|
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
…nnel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com>
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
ebd4332
to
d3e25b7
Compare
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
JLBuenoLopez
approved these changes
Feb 10, 2022
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.
LGTM
CI failures are unrelated
mergify bot
pushed a commit
that referenced
this pull request
Feb 10, 2022
* Fix infinite loop in TCP header read Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add test for channel disconnection during TCP segment reception Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Apply suggestions Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add issue reference Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Refs 13540: Unlock TCP client on shutdown Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Add TCP client stuck test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add TCP client reconnection test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Link tests with issues Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Uncrustify Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Rename TCPChannelResource mock class Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> (cherry picked from commit 6639a84) # Conflicts: # test/blackbox/common/BlackboxTestsTransportTCP.cpp
mergify bot
pushed a commit
that referenced
this pull request
Feb 10, 2022
* Fix infinite loop in TCP header read Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add test for channel disconnection during TCP segment reception Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Apply suggestions Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add issue reference Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Refs 13540: Unlock TCP client on shutdown Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Add TCP client stuck test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add TCP client reconnection test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Link tests with issues Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Uncrustify Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Rename TCPChannelResource mock class Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> (cherry picked from commit 6639a84) # Conflicts: # test/blackbox/common/BlackboxTestsTransportTCP.cpp # test/dds/communication/CMakeLists.txt # test/unittest/transport/CMakeLists.txt
mergify bot
pushed a commit
that referenced
this pull request
Feb 10, 2022
* Fix infinite loop in TCP header read Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add test for channel disconnection during TCP segment reception Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Apply suggestions Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add issue reference Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Refs 13540: Unlock TCP client on shutdown Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Add TCP client stuck test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add TCP client reconnection test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Link tests with issues Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Uncrustify Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Rename TCPChannelResource mock class Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> (cherry picked from commit 6639a84) # Conflicts: # test/blackbox/common/BlackboxTestsTransportTCP.cpp # test/dds/communication/CMakeLists.txt # test/dds/communication/PublisherModule.cpp # test/dds/communication/SubscriberModule.cpp # test/dds/communication/test_build.py # test/unittest/transport/CMakeLists.txt # test/unittest/transport/TCPv4Tests.cpp
✅ Backports have been created
|
JLBuenoLopez
pushed a commit
that referenced
this pull request
Feb 16, 2022
* Fix infinite loop in TCP header read Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add test for channel disconnection during TCP segment reception Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Apply suggestions Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add issue reference Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Refs 13540: Unlock TCP client on shutdown Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Add TCP client stuck test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add TCP client reconnection test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Link tests with issues Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Uncrustify Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Rename TCPChannelResource mock class Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> (cherry picked from commit 6639a84) # Conflicts: # test/blackbox/common/BlackboxTestsTransportTCP.cpp Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
JLBuenoLopez
pushed a commit
that referenced
this pull request
Feb 16, 2022
* Fix infinite loop in TCP header read Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add test for channel disconnection during TCP segment reception Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Apply suggestions Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add issue reference Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Refs 13540: Unlock TCP client on shutdown Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Add TCP client stuck test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add TCP client reconnection test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Link tests with issues Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Uncrustify Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Rename TCPChannelResource mock class Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> (cherry picked from commit 6639a84) # Conflicts: # test/blackbox/common/BlackboxTestsTransportTCP.cpp # test/dds/communication/CMakeLists.txt # test/unittest/transport/CMakeLists.txt Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
JLBuenoLopez
pushed a commit
that referenced
this pull request
Feb 17, 2022
* Fix infinite loop in TCP header read Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add test for channel disconnection during TCP segment reception Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Apply suggestions Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add issue reference Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Refs 13540: Unlock TCP client on shutdown Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Add TCP client stuck test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add TCP client reconnection test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Link tests with issues Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Uncrustify Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Rename TCPChannelResource mock class Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> (cherry picked from commit 6639a84) # Conflicts: # test/blackbox/common/BlackboxTestsTransportTCP.cpp # test/dds/communication/CMakeLists.txt # test/dds/communication/PublisherModule.cpp # test/dds/communication/SubscriberModule.cpp # test/dds/communication/test_build.py # test/unittest/transport/CMakeLists.txt # test/unittest/transport/TCPv4Tests.cpp Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
MiguelCompany
pushed a commit
that referenced
this pull request
Feb 18, 2022
* Fix TCP infinite loop, client shutdown and reconnection (#2470) * Fix infinite loop in TCP header read Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add test for channel disconnection during TCP segment reception Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Apply suggestions Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add issue reference Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Refs 13540: Unlock TCP client on shutdown Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Add TCP client stuck test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add TCP client reconnection test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Link tests with issues Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Uncrustify Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Rename TCPChannelResource mock class Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> (cherry picked from commit 6639a84) # Conflicts: # test/blackbox/common/BlackboxTestsTransportTCP.cpp # test/dds/communication/CMakeLists.txt # test/dds/communication/PublisherModule.cpp # test/dds/communication/SubscriberModule.cpp # test/dds/communication/test_build.py # test/unittest/transport/CMakeLists.txt # test/unittest/transport/TCPv4Tests.cpp Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> * Refs #13540: fix conflicts Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> Co-authored-by: juanlofer-eprosima <88179026+juanlofer-eprosima@users.noreply.github.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
MiguelCompany
pushed a commit
that referenced
this pull request
Feb 22, 2022
* Fix TCP infinite loop, client shutdown and reconnection (#2470) * Fix infinite loop in TCP header read Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add test for channel disconnection during TCP segment reception Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Apply suggestions Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add issue reference Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Refs 13540: Unlock TCP client on shutdown Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Add TCP client stuck test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add TCP client reconnection test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Link tests with issues Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Uncrustify Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Rename TCPChannelResource mock class Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> (cherry picked from commit 6639a84) # Conflicts: # test/blackbox/common/BlackboxTestsTransportTCP.cpp # test/dds/communication/CMakeLists.txt # test/unittest/transport/CMakeLists.txt Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> * Refs #13540: fix conflicts Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> * Refs #13540: fix Windows warning Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> Co-authored-by: juanlofer-eprosima <88179026+juanlofer-eprosima@users.noreply.github.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
MiguelCompany
pushed a commit
that referenced
this pull request
Feb 22, 2022
* Fix TCP infinite loop, client shutdown and reconnection (#2470) * Fix infinite loop in TCP header read Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add test for channel disconnection during TCP segment reception Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Apply suggestions Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add issue reference Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Refs 13540: Unlock TCP client on shutdown Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource Signed-off-by: Eduardo Ponz <eduardoponz@eprosima.com> * Add TCP client stuck test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Add TCP client reconnection test Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Link tests with issues Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Uncrustify Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> * Rename TCPChannelResource mock class Signed-off-by: Juan López Fernández <juanlopez@eprosima.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> (cherry picked from commit 6639a84) # Conflicts: # test/blackbox/common/BlackboxTestsTransportTCP.cpp Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> * Refs #13540: fix conflicts Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> * Refs #13540: linters Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> * Refs #13540: fix Windows warning Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> Co-authored-by: juanlofer-eprosima <88179026+juanlofer-eprosima@users.noreply.github.com> Co-authored-by: Eduardo Ponz <eduardoponz@eprosima.com> Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
This was referenced Mar 1, 2022
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
This PR closes #2299, closes #2289, closes #2409.
It may also be related to #2010, #2318, #2312, #1487.
Issues summary
Infinite loop [13540]: Disabling a TCP channel in the middle of a
Receive
call (invoked inperform_listen_operation
) causes a hungup state.Client shutdown [13718]:
-- Scenario: TCP client is launched before TCP server, and client is deleted also before server.
-- Issue: client stays in a hungup state until server is also deleted.
-- Expected: client gets fully removed without waiting for server's deletion.
Client reconnection [13721]: Publisher on TCP server -Subscriber client mismatch after reconnection from fastrtps tcp client to fastrtps tcp server. [13718] #2409