eclipse-iceoryx / iceoryx

Eclipse iceoryx™ - true zero-copy inter-process-communication
https://iceoryx.io
Apache License 2.0
1.57k stars 373 forks source link

POPO__CHUNK_LOCKING_ERROR on iox-roudi #2260

Open wanghaEMQ opened 2 months ago

wanghaEMQ commented 2 months ago

Required information

Operating system: Fedora38

Compiler version: GCC 13.2.1

Eclipse iceoryx version: commit a0d387618cc820eb19203f0e7e96d1de31851251.

Observed result or behaviour:

iox-roudi crashed

2024-04-15 05:23:18.744 [Warn ]: Application 'Hello-Iceoryx' is still registered but it seems it has been terminated without RouDi recognizing it. Re-registering application
2024-04-15 05:23:21.531 [Warn ]: Application 'Hello-NanoMQ' is still registered but it seems it has been terminated without RouDi recognizing it. Re-registering application
2024-04-15 23:47:49.769 [Error]: /home/wangha/Documents/iceoryx/iceoryx_hoofs/posix/sync/source/mutex.cpp:325 { iox::expected<void, iox::MutexLockError> iox::mutex::lock() -> iox_pthread_mutex_lock }  :::  [ 130 ]  Owner died
2024-04-15 23:47:49.770 [Error]: The thread/process which owned the mutex died. The mutex is now in an inconsistent state and must be put into a consistent state again with Mutex::make_consistent()
2024-04-15 23:47:49.770 [Fatal]: Locking of an inter-process mutex failed! This indicates that the application holding the lock was terminated or the resources were cleaned up by RouDi due to an unresponsive application.
2024-04-15 23:47:49.770 [Fatal]: /home/wangha/Documents/iceoryx/iceoryx_posh/source/popo/building_blocks/locking_policy.cpp:42 [Fatal Error] [POPO__CHUNK_LOCKING_ERROR (code = 61)] in module [iceoryx_posh (id = 2)]
2024-04-15 23:47:49.770 [Fatal]: /home/wangha/Documents/iceoryx/iceoryx_posh/source/popo/building_blocks/locking_policy.cpp:42 [PANIC]
[1]    493478 IOT instruction (core dumped)  ./iox-roudi

Expected result or behaviour: no crash

Conditions where it occurred / Performed steps: I am testing a benchmark written by myself with iceoryx c binding. And a crash on iox-roudi happened accidently.

Edit by elBoberido:

Related issues

niclar commented 2 months ago

https://github.com/eclipse-iceoryx/iceoryx/issues/2193

elBoberido commented 2 months ago

@wanghaEMQ this is related to #325 and #2193

Unfortunately, this is not trivial to fix with the current design. If you gracefully shut down your applications, you should not encounter this issue. From the log it looks like the applications did not have the chance to cleanup its resources and where killed in the middle of a transmission.

This issue will finally be fixed by iceoryx2 which should be on feature parity with iceoryx later this year and also have C and C++ language bindings.

wanghaEMQ commented 2 months ago

Ok. Thanks. I will shutdown gracefully and try.