You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The discover server example should work well when many readers and writers are matching with tcpv4/reilability,and should be closed by Ctrl+C.
Current behavior
The example can be started but stucked and can not be close by Ctrl+C.
Steps to reproduce
To test discover server performance when many readers and writers are matching,I add simple code to create 1000 differern topics and related (one with per topic ) 1000 writers/readers.
Add simple source code only to create 1000 topics/writers/readers for matching test:
diff --git a/examples/cpp/discovery_server/ClientPublisherApp.cpp b/examples/cpp/discovery_server/ClientPublisherApp.cpp
index 52422d14a..cb05752a0 100644
--- a/examples/cpp/discovery_server/ClientPublisherApp.cpp
+++ b/examples/cpp/discovery_server/ClientPublisherApp.cpp
@@ -209,6 +209,11 @@ ClientPublisherApp::ClientPublisherApp(
{
throwstd::runtime_error("DataWriter initialization failed");
}
+ for (int i = 0, n = 1000; i < n; ++i) {
+ constauto& tn = config.topic_name + std::to_string(i);
+ auto topic = participant_->create_topic(tn, type_.get_type_name(), TOPIC_QOS_DEFAULT);
+ assert(publisher_->create_datawriter(topic, wqos, this) != nullptr);
+ }
}
ClientPublisherApp::~ClientPublisherApp()
diff --git a/examples/cpp/discovery_server/ClientSubscriberApp.cpp b/examples/cpp/discovery_server/ClientSubscriberApp.cpp
index a026455eb..c9b7fcf83 100644
--- a/examples/cpp/discovery_server/ClientSubscriberApp.cpp
+++ b/examples/cpp/discovery_server/ClientSubscriberApp.cpp
@@ -209,6 +209,11 @@ ClientSubscriberApp::ClientSubscriberApp(
{
throwstd::runtime_error("DataWriter initialization failed");
}
+ for (int i = 0, n = 1000; i < n; ++i) {
+ constauto& tn = config.topic_name + std::to_string(i);
+ auto topic = participant_->create_topic(tn, type_.get_type_name(), TOPIC_QOS_DEFAULT);
+ assert(subscriber_->create_datareader(topic, rqos, this) != nullptr);
+ }
}
ClientSubscriberApp::~ClientSubscriberApp()
Open a terminal,start server app: ./discovery_serverd server --transport tcpv4
Open a terminal,start publisher app: ./discovery_serverd publisher --reliable --transport tcpv4
Open a terminal,start subscriber app: ./discovery_serverd subscriber --reliable --transport tcpv4
After a while, all three apps are stucked or deadlock,and Ctrl+C can not kill any app.As top shown in the image above,three apps are no CPU usage,no send/receive log,Ctrl+C failed.
Fast DDS version/commit
FastDDS v3.0.0
Platform/Architecture
Ubuntu Focal 20.04 amd64
Transport layer
TCPv4
Additional context
No response
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response
The text was updated successfully, but these errors were encountered:
JesusPoderoso
changed the title
The discovery_server example is stucked or deadlock when many readers and writers are matching with tcpv4/reilability.
[21654] The discovery_server example is stucked or deadlock when many readers and writers are matching with tcpv4/reilability.
Sep 13, 2024
Is there an already existing issue for this?
Expected behavior
The discover server example should work well when many readers and writers are matching with tcpv4/reilability,and should be closed by Ctrl+C.
Current behavior
The example can be started but stucked and can not be close by Ctrl+C.
Steps to reproduce
To test discover server performance when many readers and writers are matching,I add simple code to create 1000 differern topics and related (one with per topic ) 1000 writers/readers.
./discovery_serverd server --transport tcpv4
./discovery_serverd publisher --reliable --transport tcpv4
./discovery_serverd subscriber --reliable --transport tcpv4
Fast DDS version/commit
FastDDS v3.0.0
Platform/Architecture
Ubuntu Focal 20.04 amd64
Transport layer
TCPv4
Additional context
No response
XML configuration file
No response
Relevant log output
No response
Network traffic capture
No response
The text was updated successfully, but these errors were encountered: