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

Fix TCP infinite loop, client shutdown and reconnection [13540][13718][13721] #2470

Merged
merged 11 commits into from
Feb 10, 2022

Conversation

juanlofer-eprosima
Copy link
Contributor

@juanlofer-eprosima juanlofer-eprosima commented Feb 7, 2022

This PR closes #2299, closes #2289, closes #2409.

It may also be related to #2010, #2318, #2312, #1487.

Issues summary

@JLBuenoLopez
Copy link
Contributor

New test DDSCommunication_close_TCP_client is failing in Linux Ubuntu 20.04

@EduPonz
Copy link

EduPonz commented Feb 9, 2022

@Mergifyio backport 2.4.x 2.3.x 2.1.x

@mergify
Copy link
Contributor

mergify bot commented Feb 9, 2022

backport 2.4.x 2.3.x 2.1.x

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

juanlofer-eprosima and others added 10 commits February 10, 2022 08:16
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>
@juanlofer-eprosima juanlofer-eprosima changed the title Fix TCP client stuck on shutdown [13540] & TCP client reconnection issue [13718] Fix TCP infinite loop, client shutdown and reconnection [13540][13718][13721] Feb 10, 2022
Signed-off-by: Juan López Fernández <juanlopez@eprosima.com>
Copy link
Contributor

@JLBuenoLopez JLBuenoLopez left a 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

@JLBuenoLopez JLBuenoLopez added the ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. label Feb 10, 2022
@MiguelCompany MiguelCompany merged commit 6639a84 into master Feb 10, 2022
@MiguelCompany MiguelCompany deleted the bugfix/tcp_client_block branch February 10, 2022 14:35
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
@mergify
Copy link
Contributor

mergify bot commented Feb 10, 2022

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.
Projects
None yet
4 participants