Skip to content

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

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

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 <[email protected]>
Signed-off-by: Juan López Fernández <[email protected]>
Signed-off-by: Juan López Fernández <[email protected]>
…nnel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>
Signed-off-by: Juan López Fernández <[email protected]>
Signed-off-by: Juan López Fernández <[email protected]>
Signed-off-by: Juan López Fernández <[email protected]>
Signed-off-by: Juan López Fernández <[email protected]>
@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 <[email protected]>
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 <[email protected]>

* Add test for channel disconnection during TCP segment reception

Signed-off-by: Juan López Fernández <[email protected]>

* Apply suggestions

Signed-off-by: Juan López Fernández <[email protected]>

* Add issue reference

Signed-off-by: Juan López Fernández <[email protected]>

* Refs 13540: Unlock TCP client on shutdown

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>

* Add TCP client stuck test

Signed-off-by: Juan López Fernández <[email protected]>

* Add TCP client reconnection test

Signed-off-by: Juan López Fernández <[email protected]>

* Link tests with issues

Signed-off-by: Juan López Fernández <[email protected]>

* Uncrustify

Signed-off-by: Juan López Fernández <[email protected]>

* Rename TCPChannelResource mock class

Signed-off-by: Juan López Fernández <[email protected]>

Co-authored-by: Eduardo Ponz <[email protected]>
(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 <[email protected]>

* Add test for channel disconnection during TCP segment reception

Signed-off-by: Juan López Fernández <[email protected]>

* Apply suggestions

Signed-off-by: Juan López Fernández <[email protected]>

* Add issue reference

Signed-off-by: Juan López Fernández <[email protected]>

* Refs 13540: Unlock TCP client on shutdown

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>

* Add TCP client stuck test

Signed-off-by: Juan López Fernández <[email protected]>

* Add TCP client reconnection test

Signed-off-by: Juan López Fernández <[email protected]>

* Link tests with issues

Signed-off-by: Juan López Fernández <[email protected]>

* Uncrustify

Signed-off-by: Juan López Fernández <[email protected]>

* Rename TCPChannelResource mock class

Signed-off-by: Juan López Fernández <[email protected]>

Co-authored-by: Eduardo Ponz <[email protected]>
(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 <[email protected]>

* Add test for channel disconnection during TCP segment reception

Signed-off-by: Juan López Fernández <[email protected]>

* Apply suggestions

Signed-off-by: Juan López Fernández <[email protected]>

* Add issue reference

Signed-off-by: Juan López Fernández <[email protected]>

* Refs 13540: Unlock TCP client on shutdown

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>

* Add TCP client stuck test

Signed-off-by: Juan López Fernández <[email protected]>

* Add TCP client reconnection test

Signed-off-by: Juan López Fernández <[email protected]>

* Link tests with issues

Signed-off-by: Juan López Fernández <[email protected]>

* Uncrustify

Signed-off-by: Juan López Fernández <[email protected]>

* Rename TCPChannelResource mock class

Signed-off-by: Juan López Fernández <[email protected]>

Co-authored-by: Eduardo Ponz <[email protected]>
(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 <[email protected]>

* Add test for channel disconnection during TCP segment reception

Signed-off-by: Juan López Fernández <[email protected]>

* Apply suggestions

Signed-off-by: Juan López Fernández <[email protected]>

* Add issue reference

Signed-off-by: Juan López Fernández <[email protected]>

* Refs 13540: Unlock TCP client on shutdown

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>

* Add TCP client stuck test

Signed-off-by: Juan López Fernández <[email protected]>

* Add TCP client reconnection test

Signed-off-by: Juan López Fernández <[email protected]>

* Link tests with issues

Signed-off-by: Juan López Fernández <[email protected]>

* Uncrustify

Signed-off-by: Juan López Fernández <[email protected]>

* Rename TCPChannelResource mock class

Signed-off-by: Juan López Fernández <[email protected]>

Co-authored-by: Eduardo Ponz <[email protected]>
(cherry picked from commit 6639a84)

# Conflicts:
#	test/blackbox/common/BlackboxTestsTransportTCP.cpp
Signed-off-by: JLBuenoLopez-eProsima <[email protected]>
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 <[email protected]>

* Add test for channel disconnection during TCP segment reception

Signed-off-by: Juan López Fernández <[email protected]>

* Apply suggestions

Signed-off-by: Juan López Fernández <[email protected]>

* Add issue reference

Signed-off-by: Juan López Fernández <[email protected]>

* Refs 13540: Unlock TCP client on shutdown

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>

* Add TCP client stuck test

Signed-off-by: Juan López Fernández <[email protected]>

* Add TCP client reconnection test

Signed-off-by: Juan López Fernández <[email protected]>

* Link tests with issues

Signed-off-by: Juan López Fernández <[email protected]>

* Uncrustify

Signed-off-by: Juan López Fernández <[email protected]>

* Rename TCPChannelResource mock class

Signed-off-by: Juan López Fernández <[email protected]>

Co-authored-by: Eduardo Ponz <[email protected]>
(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 <[email protected]>
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 <[email protected]>

* Add test for channel disconnection during TCP segment reception

Signed-off-by: Juan López Fernández <[email protected]>

* Apply suggestions

Signed-off-by: Juan López Fernández <[email protected]>

* Add issue reference

Signed-off-by: Juan López Fernández <[email protected]>

* Refs 13540: Unlock TCP client on shutdown

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>

* Add TCP client stuck test

Signed-off-by: Juan López Fernández <[email protected]>

* Add TCP client reconnection test

Signed-off-by: Juan López Fernández <[email protected]>

* Link tests with issues

Signed-off-by: Juan López Fernández <[email protected]>

* Uncrustify

Signed-off-by: Juan López Fernández <[email protected]>

* Rename TCPChannelResource mock class

Signed-off-by: Juan López Fernández <[email protected]>

Co-authored-by: Eduardo Ponz <[email protected]>
(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 <[email protected]>
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 <[email protected]>

* Add test for channel disconnection during TCP segment reception

Signed-off-by: Juan López Fernández <[email protected]>

* Apply suggestions

Signed-off-by: Juan López Fernández <[email protected]>

* Add issue reference

Signed-off-by: Juan López Fernández <[email protected]>

* Refs 13540: Unlock TCP client on shutdown

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>

* Add TCP client stuck test

Signed-off-by: Juan López Fernández <[email protected]>

* Add TCP client reconnection test

Signed-off-by: Juan López Fernández <[email protected]>

* Link tests with issues

Signed-off-by: Juan López Fernández <[email protected]>

* Uncrustify

Signed-off-by: Juan López Fernández <[email protected]>

* Rename TCPChannelResource mock class

Signed-off-by: Juan López Fernández <[email protected]>

Co-authored-by: Eduardo Ponz <[email protected]>
(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 <[email protected]>

* Refs #13540: fix conflicts

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

Co-authored-by: juanlofer-eprosima <[email protected]>
Co-authored-by: Eduardo Ponz <[email protected]>
Co-authored-by: JLBuenoLopez-eProsima <[email protected]>
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 <[email protected]>

* Add test for channel disconnection during TCP segment reception

Signed-off-by: Juan López Fernández <[email protected]>

* Apply suggestions

Signed-off-by: Juan López Fernández <[email protected]>

* Add issue reference

Signed-off-by: Juan López Fernández <[email protected]>

* Refs 13540: Unlock TCP client on shutdown

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>

* Add TCP client stuck test

Signed-off-by: Juan López Fernández <[email protected]>

* Add TCP client reconnection test

Signed-off-by: Juan López Fernández <[email protected]>

* Link tests with issues

Signed-off-by: Juan López Fernández <[email protected]>

* Uncrustify

Signed-off-by: Juan López Fernández <[email protected]>

* Rename TCPChannelResource mock class

Signed-off-by: Juan López Fernández <[email protected]>

Co-authored-by: Eduardo Ponz <[email protected]>
(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 <[email protected]>

* Refs #13540: fix conflicts

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #13540: fix Windows warning

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

Co-authored-by: juanlofer-eprosima <[email protected]>
Co-authored-by: Eduardo Ponz <[email protected]>
Co-authored-by: JLBuenoLopez-eProsima <[email protected]>
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 <[email protected]>

* Add test for channel disconnection during TCP segment reception

Signed-off-by: Juan López Fernández <[email protected]>

* Apply suggestions

Signed-off-by: Juan López Fernández <[email protected]>

* Add issue reference

Signed-off-by: Juan López Fernández <[email protected]>

* Refs 13540: Unlock TCP client on shutdown

Signed-off-by: Eduardo Ponz <[email protected]>

* Refs 13540: Update TCP sender resource channel on openning output channel when reusing sender resource

Signed-off-by: Eduardo Ponz <[email protected]>

* Add TCP client stuck test

Signed-off-by: Juan López Fernández <[email protected]>

* Add TCP client reconnection test

Signed-off-by: Juan López Fernández <[email protected]>

* Link tests with issues

Signed-off-by: Juan López Fernández <[email protected]>

* Uncrustify

Signed-off-by: Juan López Fernández <[email protected]>

* Rename TCPChannelResource mock class

Signed-off-by: Juan López Fernández <[email protected]>

Co-authored-by: Eduardo Ponz <[email protected]>
(cherry picked from commit 6639a84)

# Conflicts:
#	test/blackbox/common/BlackboxTestsTransportTCP.cpp
Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #13540: fix conflicts

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #13540: linters

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #13540: fix Windows warning

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

Co-authored-by: juanlofer-eprosima <[email protected]>
Co-authored-by: Eduardo Ponz <[email protected]>
Co-authored-by: JLBuenoLopez-eProsima <[email protected]>
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