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

ergoCub 1.3 S/N:002 – Interface segs fault when connection with yarp.carrier.shmem got closed #1937

Open
GiulioRomualdi opened this issue Oct 16, 2024 · 5 comments
Assignees
Labels
ergoCub 1.3 S/N:002 ergoCub1.3 platform

Comments

@GiulioRomualdi
Copy link
Member

GiulioRomualdi commented Oct 16, 2024

Robot Name πŸ€–

ergoCub 1.3 S/N:002

Request/Failure description

I opened the issue here just to keep track of it.
During the iros2024 demo we closed the walking controller that uses shmem for the remote control board connection and the wbd external contact force port connection.

This is the error

[DEBUG] from BOARD 10.0.1.6 (right_leg-eb6-j0_3) time=19746s 971m 986u :  src LOCAL, adr 3,(code 0x04000001, par16 0x0001 par64 0x0000000000000001) -> DEBUG: tag01  SET CONTROLMODE
[DEBUG] from BOARD 10.0.1.7 (right_leg-eb7-j4_5) time=19746s 953m 221u :  src LOCAL, adr 0,(code 0x04000001, par16 0x0001 par64 0x0000000000000001) -> DEBUG: tag01  SET CONTROLMODE
[DEBUG] from BOARD 10.0.1.7 (right_leg-eb7-j4_5) time=19746s 969m 188u :  src LOCAL, adr 1,(code 0x04000001, par16 0x0001 par64 0x0000000000000001) -> DEBUG: tag01  SET CONTROLMODE
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/head/rpc:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/head/rpc:o to /ergocub/head/rpc:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/head/command:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/head/command:o to /ergocub/head/command:i
[DEBUG] |yarp.carrier.shmem| INTERRUPT
[INFO] |yarp.os.impl.PortCoreOutputUnit|/ergocub/head/stateExt:o| Removing output from /ergocub/head/stateExt:o to /walking-coordinator/remoteControlBoard/ergocub/head/stateExt:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/torso/rpc:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/torso/rpc:o to /ergocub/torso/rpc:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/torso/command:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/torso/command:o to /ergocub/torso/command:i
[DEBUG] |yarp.carrier.shmem| INTERRUPT
[INFO] |yarp.os.impl.PortCoreOutputUnit|/ergocub/torso/stateExt:o| Removing output from /ergocub/torso/stateExt:o to /walking-coordinator/remoteControlBoard/ergocub/torso/stateExt:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/left_arm/rpc:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/left_arm/rpc:o to /ergocub/left_arm/rpc:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/left_arm/command:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/left_arm/command:o to /ergocub/left_arm/command:i
[DEBUG] |yarp.carrier.shmem| INTERRUPT
[INFO] |yarp.os.impl.PortCoreOutputUnit|/ergocub/left_arm/stateExt:o| Removing output from /ergocub/left_arm/stateExt:o to /walking-coordinator/remoteControlBoard/ergocub/left_arm/stateExt:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/right_arm/rpc:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/right_arm/rpc:o to /ergocub/right_arm/rpc:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/right_arm/command:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/right_arm/command:o to /ergocub/right_arm/command:i
[DEBUG] |yarp.carrier.shmem| INTERRUPT
[INFO] |yarp.os.impl.PortCoreOutputUnit|/ergocub/right_arm/stateExt:o| Removing output from /ergocub/right_arm/stateExt:o to /walking-coordinator/remoteControlBoard/ergocub/right_arm/stateExt:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/left_leg/rpc:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/left_leg/rpc:o to /ergocub/left_leg/rpc:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/left_leg/command:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/left_leg/command:o to /ergocub/left_leg/command:i
[DEBUG] |yarp.carrier.shmem| INTERRUPT
[INFO] |yarp.os.impl.PortCoreOutputUnit|/ergocub/left_leg/stateExt:o| Removing output from /ergocub/left_leg/stateExt:o to /walking-coordinator/remoteControlBoard/ergocub/left_leg/stateExt:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/right_leg/rpc:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/right_leg/rpc:o to /ergocub/right_leg/rpc:i
[INFO] |yarp.os.impl.PortCoreInputUnit|/ergocub/right_leg/command:i| Removing input from /walking-coordinator/remoteControlBoard/ergocub/right_leg/command:o to /ergocub/right_leg/command:i
[DEBUG] |yarp.carrier.shmem| INTERRUPT
[ERROR] yarprobotinterface intercepted a segmentation fault caused by a faulty plugin:
[ERROR] /usr/local/src/robot/robotology-superbuild/build/install/lib/yarp/yarp_shmem.so(+0x791d) [0x7fe19555b91d]
Trace requested at /usr/local/src/robot/robotology-superbuild/src/YARP/src/yarprobotinterface/Module.cpp:77 by code called from:
/usr/local/src/robot/robotology-superbuild/build/install/lib/libYARP_os.so.3(_Z16yarp_print_traceP8_IO_FILEPKcj+0x3b) [0x7fe19e14311b]

Detailed context

cc @traversaro @S-Dafarra

Additional context

No response

How does it affect you?

No response

@github-actions github-actions bot changed the title Interface segs fault when connection with yarp.carrier.shmem got closed ergoCub 1.1 S/N:001 – Interface segs fault when connection with yarp.carrier.shmem got closed Oct 16, 2024
Copy link

⚠️ Detected missing mandatory information

Hi @GiulioRomualdi πŸ‘‹πŸ»

Some of the following points need your attention.

You are required to:

  • enter the Robot Name.
  • give the issue a meaningful Title.
  • provide a Detailed Context (at least 100 characters).

Please, mark the points above as solved once done.

@github-actions github-actions bot added the ergoCub 1.1 S/N:001 ergoCub1.1 platform label Oct 16, 2024
@GiulioRomualdi GiulioRomualdi changed the title ergoCub 1.1 S/N:001 – Interface segs fault when connection with yarp.carrier.shmem got closed ergoCub 1.1 S/N:002 – Interface segs fault when connection with yarp.carrier.shmem got closed Oct 16, 2024
@traversaro
Copy link
Member

I was able to reproduce the error with this git diff:

diff --git a/src/devices/controlBoardRemapper/tests/controlBoardRemapper_t1_test.cpp b/src/devices/controlBoardRemapper/tests/controlBoardRemapper_t1_test.cpp
index 496474d2b..de296aa59 100644
--- a/src/devices/controlBoardRemapper/tests/controlBoardRemapper_t1_test.cpp
+++ b/src/devices/controlBoardRemapper/tests/controlBoardRemapper_t1_test.cpp
@@ -15,6 +15,8 @@
 #include <catch2/catch_amalgamated.hpp>
 #include <harness.h>
 
+#define YARP_PORT_TEST_CARRIER_UNDER_TEST "shmem"
+
 using namespace yarp::os;
 using namespace yarp::dev;
 
@@ -379,6 +381,7 @@ TEST_CASE("dev::ControlBoardRemapperTest", "[yarp::dev]")
         remoteAxesList.addString("axisC3");
         remoteAxesList.addString("axisA2");
 
+
         Bottle remoteControlBoards;
         Bottle & remoteControlBoardsList = remoteControlBoards.addList();
         remoteControlBoardsList.addString("/testRemapperRobot/a");
@@ -390,6 +393,7 @@ TEST_CASE("dev::ControlBoardRemapperTest", "[yarp::dev]")
 
         Property & opts = pRemoteRemapper.addGroup("REMOTE_CONTROLBOARD_OPTIONS");
         opts.put("writeStrict","on");
+        opts.put("carrier", YARP_PORT_TEST_CARRIER_UNDER_TEST);
 
         REQUIRE(ddRemoteRemapper.open(pRemoteRemapper)); // remotecontrolboardremapper open reported successful, testing it
 
@@ -565,6 +569,7 @@ TEST_CASE("dev::ControlBoardRemapperTest", "[yarp::dev]")
 
         Property & opts = pRemoteRemapper.addGroup("REMOTE_CONTROLBOARD_OPTIONS");
         opts.put("writeStrict","on");
+        opts.put("carrier",YARP_PORT_TEST_CARRIER_UNDER_TEST);
 
         REQUIRE(ddRemoteRemapper.open(pRemoteRemapper)); // remotecontrolboardremapper open reported successful, testing it
 
diff --git a/src/devices/networkWrappers/RemoteControlBoard/tests/RemoteControlBoard_test.cpp b/src/devices/networkWrappers/RemoteControlBoard/tests/RemoteControlBoard_test.cpp
index ccf29005c..7c542432a 100644
--- a/src/devices/networkWrappers/RemoteControlBoard/tests/RemoteControlBoard_test.cpp
+++ b/src/devices/networkWrappers/RemoteControlBoard/tests/RemoteControlBoard_test.cpp
@@ -42,6 +42,9 @@
 using namespace yarp::dev;
 using namespace yarp::os;
 
+#define YARP_PORT_TEST_CARRIER_UNDER_TEST "shmem"
+
+
 TEST_CASE("dev::RemoteControlBoardTest", "[yarp::dev]")
 {
     YARP_REQUIRE_PLUGIN("fakeMotionControl", "device");
@@ -104,6 +107,7 @@ TEST_CASE("dev::RemoteControlBoardTest", "[yarp::dev]")
             p_cfg.put("device", "remote_controlboard");
             p_cfg.put("local", "/local_controlboard");
             p_cfg.put("remote", "/controlboardserver");
+            p_cfg.put("carrier", YARP_PORT_TEST_CARRIER_UNDER_TEST);
             REQUIRE(ddnwc.open(p_cfg));
         }
 
@@ -196,6 +200,7 @@ TEST_CASE("dev::RemoteControlBoardTest", "[yarp::dev]")
             p_cfg.put("device", "remote_controlboard");
             p_cfg.put("local", "/local_controlboard");
             p_cfg.put("remote", "/controlboardserver");
+            p_cfg.put("carrier", YARP_PORT_TEST_CARRIER_UNDER_TEST);
             REQUIRE(ddnwc.open(p_cfg));
         }
 
diff --git a/src/libYARP_os/tests/PortTest.cpp b/src/libYARP_os/tests/PortTest.cpp
index 5190382e0..5c3a95459 100644
--- a/src/libYARP_os/tests/PortTest.cpp
+++ b/src/libYARP_os/tests/PortTest.cpp
@@ -39,6 +39,8 @@
 #include <catch2/catch_amalgamated.hpp>
 #include <harness.h>
 
+#define YARP_PORT_TEST_CARRIER_UNDER_TEST "shmem"
+
 using namespace yarp::os;
 using namespace yarp::os::impl;
 
@@ -236,7 +238,7 @@ public:
     DelegatedWriter()
     {
         p.open("/writer");
-        Network::connect("/writer", "/reader");
+        Network::connect("/writer", "/reader", YARP_PORT_TEST_CARRIER_UNDER_TEST);
     }
 
      void run() override
@@ -918,7 +920,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         DelegatedCallback callback;
         out.open("/out");
         in.open("/in");
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         PortReaderBuffer<Bottle> reader;
         reader.setStrict();
         reader.attach(in);
@@ -940,7 +942,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         in.setStrict();
         out.open("/out");
         in.open("/in");
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         in.useCallback(callback);
         Bottle src("10 10 20");
         out.write(src);
@@ -1002,7 +1004,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         in.open("/in");
         out.open("/out");
 
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
 
         Bottle& outBot1 = out.prepare();
         outBot1.fromString("hello world");
@@ -1036,7 +1038,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         in.open("/in");
         out.open("/out");
 
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
 
         Bottle& outBot1 = out.prepare();
         outBot1.fromString("hello world");
@@ -1064,7 +1066,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Port receiver;
         sender.open("/sender");
         receiver.open("/receiver");
-        Network::connect("/sender", "/receiver");
+        Network::connect("/sender", "/receiver", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Time::delay(duration_250ms);
         Bottle& bot = sender.prepare();
         bot.clear();
@@ -1093,7 +1095,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         p2.open("/test2");
         p2.open("/in");
         p3.open("/out");
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         p3.prepare().fromString("10 20 30");
         p3.write();
         INFO("wait for input...");
@@ -1103,7 +1105,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         p3.write();
         p2.open("/test1");
         p3.open("/test2");
-        Network::connect("/test2", "/test1");
+        Network::connect("/test2", "/test1", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         p3.prepare().fromString("10 20 30");
         p3.write();
         INFO("wait for input...");
@@ -1124,7 +1126,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
             Port p;
             p.enableBackgroundWrite(true);
             p.open("...");
-            NetworkBase::connect(p.getName(), pa.getName());
+            NetworkBase::connect(p.getName(), pa.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST);
             Bottle b("10 20 30");
             p.write(b);
             pa.read(b);
@@ -1144,8 +1146,8 @@ TEST_CASE("os::PortTest", "[yarp::os]")
             CHECK(p[i].getInputCount() == 0); // no input connections
             CHECK(p[i].getOutputCount() == 0); // no output connections
         }
-        Network::connect("/a", "/b");
-        Network::connect("/a", "/c");
+        Network::connect("/a", "/b", YARP_PORT_TEST_CARRIER_UNDER_TEST);
+        Network::connect("/a", "/c", YARP_PORT_TEST_CARRIER_UNDER_TEST);
 
         Network::sync("/a");
         Network::sync("/b");
@@ -1180,7 +1182,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         DelegatedReader reader(false);
         reader.start();
         p1.open("/writer");
-        Network::connect("/writer", "/reader");
+        Network::connect("/writer", "/reader", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Network::sync("/writer");
         Network::sync("/reader");
         Bottle bsend;
@@ -1198,7 +1200,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Port p2;
         p1.open("/foo");
         p2.open("/bar");
-        Network::connect("/foo", "/bar");
+        Network::connect("/foo", "/bar", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Network::sync("/foo");
         Network::sync("/bar");
         MyReport report;
@@ -1219,7 +1221,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         p2.setReporter(report2);
         p1.open("/foo");
         p2.open("/bar");
-        Network::connect("/foo", "/bar");
+        Network::connect("/foo", "/bar", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Network::sync("/foo");
         Network::sync("/bar");
         CHECK(report1.ct>0); // sender got report callback
@@ -1238,7 +1240,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         RpcServer p2;
         p1.open("/foo");
         p2.open("/bar");
-        Network::connect("/foo", "/bar");
+        Network::connect("/foo", "/bar", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Network::sync("/foo");
         Network::sync("/bar");
         MyReport report;
@@ -1278,7 +1280,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Port p2;
         p1.open("/p1");
         p2.open("/p2");
-        Network::connect("/p2", "/p1");
+        Network::connect("/p2", "/p1", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Network::sync("/p1");
         Network::sync("/p2");
 
@@ -1301,7 +1303,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         out.setStrict();
         in.open("/in");
         out.open("/out");
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
 
         out.prepare().fromString("1");
         out.write(true);
@@ -1342,6 +1344,8 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         in.release(key2);
     }
 
+// // This test is fialing with shmmem and unix_stream
+/*
     SECTION("check N second timeout")
     {
         Port a;
@@ -1353,13 +1357,13 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         }
         a.open("/a");
         b.open("/b");
-        NetworkBase::connect("/a", "/b");
+        NetworkBase::connect("/a", "/b", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Bottle msg("hello");
         Bottle reply;
         ok = a.write(msg, reply);
         CHECK_FALSE(ok); // send failed correctly
     }
-
+*/
     SECTION("check yarp ... /write works")
     {
         WriteReader writer;
@@ -1415,7 +1419,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         BufferedPort<Bottle> output;
         input.open("/in");
         output.open("/out");
-        CHECK(yarp::os::Network::connect("/out", "/in")); // checking connection
+        CHECK(yarp::os::Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST)); // checking connection
 
         Bottle& botOut1 = output.prepare();
         botOut1.clear();
@@ -1451,6 +1455,8 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         input.close();
     }
 
+// Failing on shmem
+/*
     SECTION("checking interrupt on input side")
     {
         PortReaderBuffer<Bottle> buf;
@@ -1504,7 +1510,11 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         output.close();
         input.close();
     }
+*/
 
+// This is not passing in shmem and unix_stream
+
+/*
     SECTION("checking interrupt on input side without buffering")
     {
         Port input;
@@ -1546,7 +1556,11 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         output.close();
         input.close();
     }
+*/
 
+// This is not passing in shmem and unix_stream
+
+/*
     SECTION("checking interrupt for a port with pending reply")
     {
         PortReaderBuffer<PortablePair<Bottle, Bottle> > buf;
@@ -1554,7 +1568,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         ServiceUser output("/out");
         Port input;
         input.open("/in");
-        Network::connect(output.p.getName(), input.getName());
+        Network::connect(output.p.getName(), input.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST);
         output.start();
         Bottle cmd;
         Bottle reply;
@@ -1567,7 +1581,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         output.stop();
         output.p.close();
         INFO("successfully closed");
-    }
+    }*/
 
     SECTION("checking interrupt with bad reader")
     {
@@ -1575,7 +1589,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Port input;
         input.open("/in");
 
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
 
         output.start();
         Time::delay(2);
@@ -1596,7 +1610,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         BufferedPort<Bottle> port;
         port.open("/test");
 
-        Network::connect("/test2", "/test");
+        Network::connect("/test2", "/test", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Network::sync("/test");
         Network::sync("/test2");
         port2.prepare().fromString("1 msg");
@@ -1615,7 +1629,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Bottle *bot = port.read(false);
         CHECK(bot==nullptr); // reader correctly reset
 
-        Network::connect("/test2", "/test");
+        Network::connect("/test2", "/test", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Network::sync("/test");
         Network::sync("/test2");
         port2.prepare().fromString("2 msg");
@@ -1633,7 +1647,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         BufferedPort<Bottle> pout;
         pout.open("/out");
         pin.open("/in");
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Network::sync("/out");
         Network::sync("/in");
         Bottle& msg = pout.prepare();
@@ -1684,7 +1698,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Port pout;
         pout.setAdminMode();
         pout.open("/out");
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Bottle cmd("hello");
         Bottle reply;
         pout.write(cmd, reply);
@@ -1694,6 +1708,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         CHECK(reply.size()>=4); // yarp commands still work
     }
 
+/*
     SECTION("checking callback locking")
     {
         Port pin;
@@ -1704,7 +1719,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         pout.enableBackgroundWrite(true);
         pin.open("/in");
         pout.open("/out");
-        Network::connect("/out", "/in");
+        Network::connect("/out", "/in", YARP_PORT_TEST_CARRIER_UNDER_TEST);
         Bottle cmd("hello");
         pin.lockCallback();
         pout.write(cmd);
@@ -1718,7 +1733,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         CHECK(data.size() == 1); // data does eventually arrive
         pin.close();
         pout.close();
-    }
+    }*/
 
 #if defined(ENABLE_BROKEN_TESTS)
     SECTION("checking tcp")
@@ -1767,7 +1782,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Network::sync("/in");
 
         TestModifyingCarrier::reset();
-        REQUIRE(Network::connect(out.getName(), in.getName(), "tcp+send.test_mod"));
+        REQUIRE(Network::connect(out.getName(), in.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST "+send.test_mod"));
 
         Bottle cmd_out("hello");
         Bottle cmd_in;
@@ -1798,7 +1813,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Network::sync("/in");
 
         TestModifyingCarrier::reset();
-        REQUIRE(Network::connect(out.getName(), in.getName(), "tcp+send.test_mod"));
+        REQUIRE(Network::connect(out.getName(), in.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST "+send.test_mod"));
 
         Bottle cmd_out("hello");
         Bottle cmd_in;
@@ -1839,7 +1854,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Network::sync("/in");
 
         TestModifyingCarrier::reset();
-        REQUIRE(Network::connect(out.getName(), in.getName(), "tcp+send.test_mod"));
+        REQUIRE(Network::connect(out.getName(), in.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST "+send.test_mod"));
 
         Bottle cmd_out("hello");
         Bottle cmd_in;
@@ -1866,7 +1881,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Network::sync("/in");
 
         TestModifyingCarrier::reset();
-        REQUIRE(Network::connect(out.getName(), in.getName(), "tcp+recv.test_mod"));
+        REQUIRE(Network::connect(out.getName(), in.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST "+recv.test_mod"));
 
         Bottle cmd_out("hello");
         Bottle cmd_in;
@@ -1897,7 +1912,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Network::sync("/in");
 
         TestModifyingCarrier::reset();
-        REQUIRE(Network::connect(out.getName(), in.getName(), "tcp+recv.test_mod"));
+        REQUIRE(Network::connect(out.getName(), in.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST "+recv.test_mod"));
 
         Bottle cmd_out("hello");
         Bottle cmd_in;
@@ -1937,7 +1952,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Network::sync("/in");
 
         TestModifyingCarrier::reset();
-        REQUIRE(Network::connect(out.getName(), in.getName(), "tcp+recv.test_mod"));
+        REQUIRE(Network::connect(out.getName(), in.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST "+recv.test_mod"));
 
         Bottle cmd_out("hello");
         Bottle cmd_in;
@@ -1965,7 +1980,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Network::sync("/in");
 
         TestModifyingCarrier::reset();
-        REQUIRE(Network::connect(out.getName(), in.getName(), "tcp+send.test_mod+recv.test_mod"));
+        REQUIRE(Network::connect(out.getName(), in.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST "+send.test_mod+recv.test_mod"));
 
         Bottle cmd_out("hello");
         Bottle cmd_in;
@@ -1995,7 +2010,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Network::sync("/in");
 
         TestModifyingCarrier::reset();
-        REQUIRE(Network::connect(out.getName(), in.getName(), "tcp+send.test_mod+recv.test_mod"));
+        REQUIRE(Network::connect(out.getName(), in.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST "+send.test_mod+recv.test_mod"));
 
         Bottle cmd_out("hello");
         Bottle cmd_in;
@@ -2035,7 +2050,7 @@ TEST_CASE("os::PortTest", "[yarp::os]")
         Network::sync("/in");
 
         TestModifyingCarrier::reset();
-        REQUIRE(Network::connect(out.getName(), in.getName(), "tcp+send.test_mod+recv.test_mod"));
+        REQUIRE(Network::connect(out.getName(), in.getName(), YARP_PORT_TEST_CARRIER_UNDER_TEST "+send.test_mod+recv.test_mod"));
 
         Bottle cmd_out("hello");
         Bottle cmd_in;
diff --git a/src/yarpDeviceParamParserGenerator/tests/test1/TestDeviceWGP1_ParamsParser.cpp b/src/yarpDeviceParamParserGenerator/tests/test1/TestDeviceWGP1_ParamsParser.cpp
index bed660418..6de23771e 100644
--- a/src/yarpDeviceParamParserGenerator/tests/test1/TestDeviceWGP1_ParamsParser.cpp
+++ b/src/yarpDeviceParamParserGenerator/tests/test1/TestDeviceWGP1_ParamsParser.cpp
@@ -8,7 +8,7 @@
 // This is an automatically generated file. Please do not edit it.
 // It will be re-generated if the cmake flag ALLOW_DEVICE_PARAM_PARSER_GERNERATION is ON.
 
-// Generated on: Thu Mar  7 16:55:07 2024
+// Generated on: Thu Oct 17 13:25:56 2024
 
 
 #include "TestDeviceWGP1_ParamsParser.h"
diff --git a/src/yarpDeviceParamParserGenerator/tests/test1/TestDeviceWGP1_ParamsParser.h b/src/yarpDeviceParamParserGenerator/tests/test1/TestDeviceWGP1_ParamsParser.h
index b27e2198b..b319050b7 100644
--- a/src/yarpDeviceParamParserGenerator/tests/test1/TestDeviceWGP1_ParamsParser.h
+++ b/src/yarpDeviceParamParserGenerator/tests/test1/TestDeviceWGP1_ParamsParser.h
@@ -8,7 +8,7 @@
 // This is an automatically generated file. Please do not edit it.
 // It will be re-generated if the cmake flag ALLOW_DEVICE_PARAM_PARSER_GERNERATION is ON.
 
-// Generated on: Thu Mar  7 16:55:07 2024
+// Generated on: Thu Oct 17 13:25:56 2024
 
 
 #ifndef TESTDEVICEWGP1_PARAMSPARSER_H
diff --git a/src/yarpDeviceParamParserGenerator/tests/test2/TestDeviceWGP2_ParamsParser.cpp b/src/yarpDeviceParamParserGenerator/tests/test2/TestDeviceWGP2_ParamsParser.cpp
index 04020bf18..8524bcc12 100644
--- a/src/yarpDeviceParamParserGenerator/tests/test2/TestDeviceWGP2_ParamsParser.cpp
+++ b/src/yarpDeviceParamParserGenerator/tests/test2/TestDeviceWGP2_ParamsParser.cpp
@@ -8,7 +8,7 @@
 // This is an automatically generated file. Please do not edit it.
 // It will be re-generated if the cmake flag ALLOW_DEVICE_PARAM_PARSER_GERNERATION is ON.
 
-// Generated on: Thu Mar  7 16:55:08 2024
+// Generated on: Thu Oct 17 13:26:00 2024
 
 
 #include "TestDeviceWGP2_ParamsParser.h"
diff --git a/src/yarpDeviceParamParserGenerator/tests/test2/TestDeviceWGP2_ParamsParser.h b/src/yarpDeviceParamParserGenerator/tests/test2/TestDeviceWGP2_ParamsParser.h
index 00fe45869..9ef3f7b70 100644
--- a/src/yarpDeviceParamParserGenerator/tests/test2/TestDeviceWGP2_ParamsParser.h
+++ b/src/yarpDeviceParamParserGenerator/tests/test2/TestDeviceWGP2_ParamsParser.h
@@ -8,7 +8,7 @@
 // This is an automatically generated file. Please do not edit it.
 // It will be re-generated if the cmake flag ALLOW_DEVICE_PARAM_PARSER_GERNERATION is ON.
 
-// Generated on: Thu Mar  7 16:55:08 2024
+// Generated on: Thu Oct 17 13:26:00 2024
 
 
 #ifndef TESTDEVICEWGP2_PARAMSPARSER_H

and running this command:

valgrind -s /home/traversaro/yarp/buildconda/bin/harness_dev_controlBoardRemapper_t1 "dev::ControlBoardRemapperTest" "-s" "--colour-mode default"

The failure is not deterministic, but sometimes it fails with:

/home/traversaro/yarp/src/devices/controlBoardRemapper/tests/controlBoardRemapper_t1_test.cpp:159: PASSED:
  CHECK( setPosition[i] == readedEncoders[i] )
with expansion:
  650.0 == 650.0

[INFO] |yarp.os.impl.PortCoreInputUnit|/testRemapperRobot/a/rpc:i| Removing input from /test/remoteControlBoardRemapper/testRemapperRobot/a/rpc:o to /testRemapperRobot/a/rpc:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/remoteControlBoardRemapper/testRemapperRobot/a/rpc:o| Removing output from /test/remoteControlBoardRemapper/testRemapperRobot/a/rpc:o to /testRemapperRobot/a/rpc:i
[DEBUG] |yarp.carrier.shmem| INTERRUPT
[INFO] |yarp.os.impl.PortCoreInputUnit|/testRemapperRobot/a/command:i| Removing input from /test/remoteControlBoardRemapper/testRemapperRobot/a/command:o to /testRemapperRobot/a/command:i
[INFO] |yarp.os.impl.PortCoreOutputUnit|/test/remoteControlBoardRemapper/testRemapperRobot/a/command:o| Removing output from /test/remoteControlBoardRemapper/testRemapperRobot/a/command:o to /testRemapperRobot/a/command:i
[DEBUG] |yarp.carrier.shmem| INTERRUPT
==70843== Thread 30:
==70843== Invalid read of size 8
==70843==    at 0x4E2E094: ShmemInputStreamImpl::read(char*, int) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4E2E2CA: ShmemInputStreamImpl::read(yarp::os::Bytes&) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4E2BF9B: non-virtual thunk to ShmemHybridStream::read(yarp::os::Bytes&) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4AC6CD2: yarp::os::InputStream::readFull(yarp::os::Bytes&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4AB4E00: yarp::os::AbstractCarrier::defaultExpectAck(yarp::os::ConnectionState&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BBEFBB: yarp::os::impl::Protocol::write(yarp::os::SizedWriter&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BB9BA2: yarp::os::impl::PortCoreOutputUnit::sendHelper() (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BBAD27: yarp::os::impl::PortCoreOutputUnit::run() (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BD48D4: theExecutiveBranch(void*) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4D06B64: execute_native_thread_routine (thread.cc:104)
==70843==    by 0x4FDFA93: start_thread (pthread_create.c:447)
==70843==    by 0x506CA33: clone (clone.S:100)
==70843==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==70843==
/home/traversaro/yarp/src/devices/controlBoardRemapper/tests/controlBoardRemapper_t1_test.cpp:159: FAILED:
  {Unknown expression after the reported line}
due to a fatal error condition:
  SIGSEGV - Segmentation violation signal

===============================================================================[INFO] |yarp.os.impl.PortCoreInputUnit|/test/remoteControlBoardRemapper/testRemapperRobot/a/stateExt:i| Removing input from /testRemapperRobot/a/stateExt:o to /test/remoteControlBoardRemapper/testRemapperRobot/a/stateExt:i

test cases:   1 |   0 passed | 1 failed
assertions: 103 | 102 passed | 1 failed

==70843==
==70843== Process terminating with default action of signal 11 (SIGSEGV)
==70843==    at 0x4FE1B1C: __pthread_kill_implementation (pthread_kill.c:44)
==70843==    by 0x4FE1B1C: __pthread_kill_internal (pthread_kill.c:78)
==70843==    by 0x4FE1B1C: pthread_kill@@GLIBC_2.34 (pthread_kill.c:89)
==70843==    by 0x4F8826D: raise (raise.c:26)
==70843==    by 0x4F8831F: ??? (in /usr/lib/x86_64-linux-gnu/libc.so.6)
==70843==    by 0x4E2E093: ShmemInputStreamImpl::read(char*, int) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4E2E2CA: ShmemInputStreamImpl::read(yarp::os::Bytes&) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4E2BF9B: non-virtual thunk to ShmemHybridStream::read(yarp::os::Bytes&) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4AC6CD2: yarp::os::InputStream::readFull(yarp::os::Bytes&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4AB4E00: yarp::os::AbstractCarrier::defaultExpectAck(yarp::os::ConnectionState&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BBEFBB: yarp::os::impl::Protocol::write(yarp::os::SizedWriter&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BB9BA2: yarp::os::impl::PortCoreOutputUnit::sendHelper() (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BBAD27: yarp::os::impl::PortCoreOutputUnit::run() (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BD48D4: theExecutiveBranch(void*) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==
==70843== HEAP SUMMARY:
==70843==     in use at exit: 1,035,998 bytes in 9,293 blocks
==70843==   total heap usage: 673,649 allocs, 664,356 frees, 66,999,225 bytes allocated
==70843==
==70843== LEAK SUMMARY:
==70843==    definitely lost: 0 bytes in 0 blocks
==70843==    indirectly lost: 0 bytes in 0 blocks
==70843==      possibly lost: 102,896 bytes in 125 blocks
==70843==    still reachable: 933,102 bytes in 9,168 blocks
==70843==                       of which reachable via heuristic:
==70843==                         length64           : 149,216 bytes in 164 blocks
==70843==                         newarray           : 4,344 bytes in 21 blocks
==70843==                         multipleinheritance: 14,656 bytes in 5 blocks
==70843==         suppressed: 0 bytes in 0 blocks
==70843== Rerun with --leak-check=full to see details of leaked memory
==70843==
==70843== Use --track-origins=yes to see where uninitialised values come from
==70843== ERROR SUMMARY: 7 errors from 2 contexts (suppressed: 0 from 0)
==70843==
==70843== 1 errors in context 1 of 2:
==70843== Invalid read of size 8
==70843==    at 0x4E2E094: ShmemInputStreamImpl::read(char*, int) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4E2E2CA: ShmemInputStreamImpl::read(yarp::os::Bytes&) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4E2BF9B: non-virtual thunk to ShmemHybridStream::read(yarp::os::Bytes&) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4AC6CD2: yarp::os::InputStream::readFull(yarp::os::Bytes&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4AB4E00: yarp::os::AbstractCarrier::defaultExpectAck(yarp::os::ConnectionState&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BBEFBB: yarp::os::impl::Protocol::write(yarp::os::SizedWriter&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BB9BA2: yarp::os::impl::PortCoreOutputUnit::sendHelper() (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BBAD27: yarp::os::impl::PortCoreOutputUnit::run() (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BD48D4: theExecutiveBranch(void*) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4D06B64: execute_native_thread_routine (thread.cc:104)
==70843==    by 0x4FDFA93: start_thread (pthread_create.c:447)
==70843==    by 0x506CA33: clone (clone.S:100)
==70843==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==70843==
==70843==
==70843== 6 errors in context 2 of 2:
==70843== Thread 32:
==70843== Syscall param write(buf) points to uninitialised byte(s)
==70843==    at 0x505F5AD: __libc_write (write.c:26)
==70843==    by 0x505F5AD: write (write.c:24)
==70843==    by 0x52AF3AD: write (OS_NS_unistd.inl:1158)
==70843==    by 0x52AF3AD: send_i (ACE.inl:222)
==70843==    by 0x52AF3AD: ACE::send_n_i(int, void const*, unsigned long, unsigned long*) (ACE.cpp:1586)
==70843==    by 0x4E2CCAC: ShmemHybridStream::accept() (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4E2BC28: ShmemCarrier::becomeShmemVersionHybridStream(yarp::os::ConnectionState&, bool) (in /home/traversaro/yarp/buildconda/lib/yarp/yarp_shmem.so)
==70843==    by 0x4BBF2F5: yarp::os::impl::Protocol::respondToHeader() (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BBFCE0: non-virtual thunk to yarp::os::impl::Protocol::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BB28E3: yarp::os::impl::PortCoreInputUnit::run() (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4BD48D4: theExecutiveBranch(void*) (in /home/traversaro/yarp/buildconda/lib/libYARP_os.so.3.9.0)
==70843==    by 0x4D06B64: execute_native_thread_routine (thread.cc:104)
==70843==    by 0x4FDFA93: start_thread (pthread_create.c:447)
==70843==    by 0x506CA33: clone (clone.S:100)
==70843==  Address 0x17a1580c is on thread 32's stack
==70843==  in frame #2, created by ShmemHybridStream::accept() (???:)
==70843==
==70843== ERROR SUMMARY: 7 errors from 2 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

@traversaro
Copy link
Member

Better error:

[INFO] |yarp.os.impl.PortCoreInputUnit|/testRemapperRobot/b/command:i| Removing input from /test/remoteControlBoardRemapper/testRemapperRobot/b/command:o to /testRemapperRobot/b/command:i
[DEBUG] |yarp.carrier.shmem| INTERRUPT
/home/traversaro/yarp/src/devices/controlBoardRemapper/tests/controlBoardRemapper_t1_test.cpp:159: FAILED:
  {Unknown expression after the reported line}
due to a fatal error condition:
  SIGSEGV - Segmentation violation signal

===============================================================================
test cases:   1 |   0 passed | 1 failed
assertions: 103 | 102 passed | 1 failed

==72961==
==72961== Process terminating with default action of signal 11 (SIGSEGV)
==72961==    at 0x4FB9B1C: __pthread_kill_implementation (pthread_kill.c:44)
==72961==    by 0x4FB9B1C: __pthread_kill_internal (pthread_kill.c:78)
==72961==    by 0x4FB9B1C: pthread_kill@@GLIBC_2.34 (pthread_kill.c:89)
==72961==    by 0x4F6026D: raise (raise.c:26)
==72961==    by 0x4F6031F: ??? (in /usr/lib/x86_64-linux-gnu/libc.so.6)
==72961==    by 0x4FB3F42: __lll_lock_wait (lowlevellock.c:45)
==72961==    by 0x4FBB0F0: lll_mutex_lock_optimized (pthread_mutex_lock.c:48)
==72961==    by 0x4FBB0F0: pthread_mutex_lock@@GLIBC_2.2.5 (pthread_mutex_lock.c:93)
==72961==    by 0x52D3C35: ACE_OS::mutex_lock(pthread_mutex_t*) (OS_NS_Thread.cpp:2024)
==72961==    by 0x4E05DC8: acquire (Mutex.inl:102)
==72961==    by 0x4E05DC8: ShmemInputStreamImpl::read(char*, int) (ShmemInputStream.cpp:158)
==72961==    by 0x4E05FEA: ShmemInputStreamImpl::read(yarp::os::Bytes&) (ShmemInputStream.cpp:208)
==72961==    by 0x4E03F2B: non-virtual thunk to ShmemHybridStream::read(yarp::os::Bytes&) (ShmemHybridStream.h:40)
==72961==    by 0x4AC0162: read (InputStream.cpp:34)
==72961==    by 0x4AC0162: yarp::os::InputStream::readFull(yarp::os::Bytes&) (InputStream.cpp:103)
==72961==    by 0x4AB0990: yarp::os::AbstractCarrier::defaultExpectAck(yarp::os::ConnectionState&) (AbstractCarrier.cpp:249)
==72961==    by 0x4B9E20B: yarp::os::impl::Protocol::write(yarp::os::SizedWriter&) (Protocol.cpp:314)
==72961==
==72961== HEAP SUMMARY:
==72961==     in use at exit: 987,629 bytes in 8,855 blocks
==72961==   total heap usage: 677,605 allocs, 668,750 frees, 68,262,482 bytes allocated
==72961==
==72961== LEAK SUMMARY:
==72961==    definitely lost: 0 bytes in 0 blocks
==72961==    indirectly lost: 0 bytes in 0 blocks
==72961==      possibly lost: 100,016 bytes in 116 blocks
==72961==    still reachable: 887,613 bytes in 8,739 blocks
==72961==                       of which reachable via heuristic:
==72961==                         length64           : 149,216 bytes in 164 blocks
==72961==                         newarray           : 4,344 bytes in 21 blocks
==72961==                         multipleinheritance: 11,504 bytes in 4 blocks
==72961==         suppressed: 0 bytes in 0 blocks
==72961== Rerun with --leak-check=full to see details of leaked memory
==72961==
==72961== Use --track-origins=yes to see where uninitialised values come from
==72961== ERROR SUMMARY: 6 errors from 1 contexts (suppressed: 0 from 0)
==72961==
==72961== 6 errors in context 1 of 1:
==72961== Syscall param write(buf) points to uninitialised byte(s)
==72961==    at 0x50375AD: __libc_write (write.c:26)
==72961==    by 0x50375AD: write (write.c:24)
==72961==    by 0x52873AD: write (OS_NS_unistd.inl:1158)
==72961==    by 0x52873AD: send_i (ACE.inl:222)
==72961==    by 0x52873AD: ACE::send_n_i(int, void const*, unsigned long, unsigned long*) (ACE.cpp:1586)
==72961==    by 0x4E049B0: send_n (ACE.inl:184)
==72961==    by 0x4E049B0: send_n (SOCK_Stream.inl:115)
==72961==    by 0x4E049B0: ShmemHybridStream::accept() (ShmemHybridStream.cpp:91)
==72961==    by 0x4E03C28: ShmemCarrier::becomeShmemVersionHybridStream(yarp::os::ConnectionState&, bool) (ShmemCarrier.cpp:79)
==72961==    by 0x4B9E45F: yarp::os::impl::Protocol::respondToHeader() (Protocol.cpp:510)
==72961==    by 0x4B9EB18: yarp::os::impl::Protocol::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (Protocol.cpp:220)
==72961==    by 0x4B949C3: yarp::os::impl::PortCoreInputUnit::run() (PortCoreInputUnit.cpp:99)
==72961==    by 0x4BADE64: theExecutiveBranch(void*) (ThreadImpl.cpp:81)
==72961==    by 0x4CDEB64: execute_native_thread_routine (thread.cc:104)
==72961==    by 0x4FB7A93: start_thread (pthread_create.c:447)
==72961==    by 0x5044A33: clone (clone.S:100)
==72961==  Address 0x179ed82c is on thread 32's stack
==72961==  in frame #2, created by ShmemHybridStream::accept() (ACE.inl:50)
==72961==
==72961== ERROR SUMMARY: 6 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

traversaro added a commit to traversaro/yarp that referenced this issue Oct 18, 2024
@traversaro
Copy link
Member

I provided a fix (or workaround, not sure) at https://github.com/traversaro/yarp/tree/fixshmem, if this happens again feel free to cherry-pick the fix traversaro/yarp@bff2606 on top of the yarp branch used on the robot. @S-Dafarra @GiulioRomualdi

@GiulioRomualdi GiulioRomualdi added ergoCub 1.3 S/N:002 ergoCub1.3 platform and removed ergoCub 1.1 S/N:001 ergoCub1.1 platform labels Oct 22, 2024
@AntonioConsilvio AntonioConsilvio changed the title ergoCub 1.1 S/N:002 – Interface segs fault when connection with yarp.carrier.shmem got closed ergoCub 1.3 S/N:002 – Interface segs fault when connection with yarp.carrier.shmem got closed Oct 22, 2024
traversaro added a commit to traversaro/yarp that referenced this issue Oct 25, 2024
@traversaro
Copy link
Member

I opened robotology/yarp#3147 to fix the problem with shmem upstream in YARP. I also found and fixed the problem with unix_stream and multipleanalogsensorclient, so if we have problems with shmem we can also test again unix_stream, if you want to cherry-pick the changes the related commits are:

traversaro added a commit to robotology/yarp that referenced this issue Oct 27, 2024
traversaro added a commit to traversaro/yarp that referenced this issue Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ergoCub 1.3 S/N:002 ergoCub1.3 platform
Projects
Status: Triage
Development

No branches or pull requests

3 participants