eclipse-iceoryx / iceoryx

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

Possible double free of memory chunks #562

Open elfenpiff opened 3 years ago

elfenpiff commented 3 years ago

Required information

Operating system: Raspberry Pi OS January 11th 2021 (32-bit)

Compiler version: GCC 8.3

Observed result or behaviour:

pi@raspberrypi:~/taps $ ./iceoryx_examples/iceperf/iceperf-hardy

******      ICEORYX       ********
Waiting for: subscription, subscriber [ success ]
2021-02-13 19:33:01.467 [ Error ]: ICEORYX error! POSH__MEMPOOL_POSSIBLE_DOUBLE_FREE
iceperf-hardy: /home/pi/iceoryx/iceoryx_utils/source/error_handling/error_handling.cpp:56: static void iox::ErrorHandler::ReactOnErrorLevel(iox::ErrorLevel, const char*): Assertion `false' failed.
Aborted

When starting the iceperf example a double free fatal error occurs.

Expected result or behaviour: No double free error

Conditions where it occurred / Performed steps: Run the iceperf example on a Raspberry Pi (32-bit)

elfenpiff commented 3 years ago

Compiling the exact same example on a Raspberry Pi (64-bit) seems to always work.

elBoberido commented 3 years ago

This might be a good excuse to consolidate on the IndexQueue from @MatthiasKillat

elBoberido commented 8 months ago

@elfenpiff I think this is related to atomics using a mutex when the size exceeds 32 bits. These mutex are process local and therefore we get data races. I think we should prevent building for 32 bit systems. What do you think?

elBoberido commented 8 months ago

Add cmake switch to not build it.

elBoberido commented 8 months ago

Possible long term solution: