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 – When closing the yarprobotinterface, it always segfaults #1861

Open
S-Dafarra opened this issue Jul 22, 2024 · 3 comments
Assignees
Labels
ergoCub 1.3 S/N:002 ergoCub1.3 platform pinned This label prevents an issue from being closed automatically

Comments

@S-Dafarra
Copy link

Robot Name πŸ€–

ergoCub 1.2 S/N:002

Request/Failure description

Whenever we close the yarprobotinterface, it does not exit gracefully, but it starts throwing a lot of errors and then it crashes. The robot anyhow goes to parking as expected.

Detailed context

Here an example of output

[INFO] Closing device right_leg-FT_remapper
[INFO] Closing device left_leg-FT_remapper
[INFO] Closing device right_leg-eb6-j0_3-strain
[INFO] Closing device left_leg-eb8-j0_3-strain
[INFO] Closing device right_leg-eb7-j4_5-strain
[INFO] Closing device left_leg-eb9-j4_5-strain
[INFO] Closing device right_arm-eb1-j0_1-strain
[INFO] Closing device left_arm-eb2-j0_1-strain
[INFO] Closing device right_leg-eb7-j4_5-mc
[INFO] Closing device right_leg-eb6-j0_3-mc
[ERROR] theNVmanager::Impl::transceiverZ() cannot obtain from TheEthManager a EthResource * for IP = 10.0.1.6
[ERROR] yarprobotinterface intercepted a segmentation fault caused by a faulty plugin:
[ERROR] /usr/local/src/robot/robotology-superbuild/build/install/lib/iCub/embObjPOS.so(_ZN3eth15HostTransceiver11addSetROP__EjPKvjb+0x23) [0x7f92900a2513]
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) [0x7f929b69311b]
yarprobotinterface(+0x9c94) [0x55d0c5284c94]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f929b1b9520]
/usr/local/src/robot/robotology-superbuild/build/install/lib/iCub/embObjPOS.so(_ZN3eth15HostTransceiver11addSetROP__EjPKvjb+0x23) [0x7f92900a2513]
/usr/local/src/robot/robotology-superbuild/build/install/lib/iCub/embObjPOS.so(_ZN3eth12theNVmanager4Impl3setEPNS_15HostTransceiverEjPKv+0x41) [0x7f929008abb1]
/usr/local/src/robot/robotology-superbuild/build/install/lib/iCub/embObjPOS.so(_ZN3eth12theNVmanager4Impl7commandEPNS_15HostTransceiverEjPKvjPvd+0x41) [0x7f929008e1a1]
/usr/local/src/robot/robotology-superbuild/build/install/lib/iCub/embObjPOS.so(_ZN3eth11EthResource14serviceCommandE21eOmn_serv_operation_t20eOmn_serv_category_tPK21eOmn_serv_parameter_tdi+0x12f) [0x7f929006eb4f]
/usr/local/src/robot/robotology-superbuild/build/install/lib/iCub/embObjPOS.so(_ZN3eth11EthResource11serviceStopE20eOmn_serv_category_td+0x23) [0x7f929006f463]
/usr/local/src/robot/robotology-superbuild/build/install/lib/iCub/embObjPOS.so(_ZN3eth13TheEthManager16releaseResource2EPNS_19AbstractEthResourceEPNS_12IethResourceE+0x60) [0x7f92900685d0]
/usr/local/src/robot/robotology-superbuild/build/install/lib/iCub/embObjMotionControl.so(_ZN4yarp3dev19embObjMotionControl7cleanupEv+0x27) [0x7f9280661a67]
/usr/local/src/robot/robotology-superbuild/build/install/lib/iCub/embObjMotionControl.so(_ZN4yarp3dev19embObjMotionControl5closeEv+0x13f) [0x7f928067f17f]
/usr/local/src/robot/robotology-superbuild/build/install/lib/libYARP_dev.so.3(_ZN4yarp3dev10PolyDriver5closeEv+0x68) [0x7f929b11db88]
/usr/local/src/robot/robotology-superbuild/build/install/lib/libYARP_robotinterface.so.3(_ZN4yarp14robotinterface6Device5closeEv+0x48) [0x7f929b8137c8]
/usr/local/src/robot/robotology-superbuild/build/install/lib/libYARP_robotinterface.so.3(_ZN4yarp14robotinterface5Robot7Private12closeDevicesEv+0xe2) [0x7f929b81bf02]
/usr/local/src/robot/robotology-superbuild/build/install/lib/libYARP_robotinterface.so.3(_ZN4yarp14robotinterface5Robot10enterPhaseENS0_11ActionPhaseE+0x6b3) [0x7f929b81ef73]
yarprobotinterface(+0xb0ee) [0x55d0c52860ee]
/usr/local/src/robot/robotology-superbuild/build/install/lib/libYARP_os.so.3(_ZN4yarp2os8RFModule9runModuleEv+0x2b0) [0x7f929b6f2ef0]
yarprobotinterface(+0x8bcf) [0x55d0c5283bcf]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f929b1a0d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f929b1a0e40]
yarprobotinterface(+0x8c95) [0x55d0c5283c95]
Segmentation fault (core dumped)

Additional context

No response

How does it affect you?

No response

@github-actions github-actions bot changed the title When closing the yarprobotinterface, it always segfaults ergoCub 1.2 S/N:002 – When closing the yarprobotinterface, it always segfaults Jul 22, 2024
@github-actions github-actions bot added the ergoCub 1.3 S/N:002 ergoCub1.3 platform label Jul 22, 2024
@pattacini
Copy link
Member

cc @marcoaccame

@marcoaccame
Copy link

The important info is in here

image

What I see happening is that a UDP frame is received from board 10.0.1.6 and the receiver thread managed by object theETHManager cannot get the associated EthResource for its handling (parsing etc.).

I also see that just before that a lot of devices have been destroyed.

I would look at what has changed in the destructors of the devices w/ respect to destruction of the associated EthResource (whihc must be destroyed only when no associated device is remaining).

Or maybe it is a mutex race that depends on the 1 kHz?

@AntonioConsilvio AntonioConsilvio moved this from Triage to In Progress in iCub Tech Support Jul 23, 2024
@AntonioConsilvio AntonioConsilvio changed the title ergoCub 1.2 S/N:002 – When closing the yarprobotinterface, it always segfaults ergoCub 1.3 S/N:002 – When closing the yarprobotinterface, it always segfaults Sep 2, 2024
Copy link

This issue has been automatically marked as stale because it did not have recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale This issue will be soon closed automatically label Jan 21, 2025
@AntonioConsilvio AntonioConsilvio added pinned This label prevents an issue from being closed automatically and removed stale This issue will be soon closed automatically labels Jan 22, 2025
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 pinned This label prevents an issue from being closed automatically
Projects
Status: In Progress
Development

No branches or pull requests

4 participants