eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
1.03k stars 40 forks source link

Pub/Sub Benchmark, unable to map publishers data segment #369

Open elfenpiff opened 2 months ago

elfenpiff commented 2 months ago

Required information

Log Output

       0 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 20, data: "config/iceoryx2.toml" } }, access_mode: Read, permission: Permission(448), has
_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: None }
             | opened
       1 [T] Config { global: Global { root_path_unix: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, root_path_windows: Path { value: FixedSizeBy
teString<255> { len: 17, data: "c:\Temp\iceoryx2\" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } }, service: Service { directory: Path { value
: FixedSizeByteString<255> { len: 8, data: "services" } }, publisher_data_segment_suffix: FileName { value: FixedSizeByteString<255> { len: 15, data: ".publisher_data" } }, stati
c_config_storage_suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".service" } }, dynamic_config_storage_suffix: FileName { value: FixedSizeByteString<255> { le
n: 8, data: ".dynamic" } }, creation_timeout: 500ms, connection_suffix: FileName { value: FixedSizeByteString<255> { len: 11, data: ".connection" } }, event_connection_suffix: Fi
leName { value: FixedSizeByteString<255> { len: 6, data: ".event" } } }, node: Node { directory: Path { value: FixedSizeByteString<255> { len: 5, data: "nodes" } }, monitor_suffi
x: FileName { value: FixedSizeByteString<255> { len: 13, data: ".node_monitor" } }, static_config_suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".details" }
}, service_tag_suffix: FileName { value: FixedSizeByteString<255> { len: 12, data: ".service_tag" } }, cleanup_dead_nodes_on_creation: true, cleanup_dead_nodes_on_destruction: tr
ue } }, defaults: Defaults { publish_subscribe: PublishSubscribe { max_subscribers: 8, max_publishers: 2, max_nodes: 20, subscriber_max_buffer_size: 2, subscriber_max_borrowed_sa
mples: 2, publisher_max_loaned_samples: 2, publisher_history_size: 1, enable_safe_overflow: true, unable_to_deliver_strategy: Block, subscriber_expired_connection_buffer: 128 },
event: Event { max_listeners: 2, max_notifiers: 16, max_nodes: 36, event_id_max_value: 32 } } }
             | Loaded.
       2 [T] Config { global: Global { root_path_unix: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, root_path_windows: Path { value: FixedSizeBy
teString<255> { len: 17, data: "c:\Temp\iceoryx2\" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } }, service: Service { directory: Path { value
: FixedSizeByteString<255> { len: 8, data: "services" } }, publisher_data_segment_suffix: FileName { value: FixedSizeByteString<255> { len: 15, data: ".publisher_data" } }, stati
c_config_storage_suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".service" } }, dynamic_config_storage_suffix: FileName { value: FixedSizeByteString<255> { le
n: 8, data: ".dynamic" } }, creation_timeout: 500ms, connection_suffix: FileName { value: FixedSizeByteString<255> { len: 11, data: ".connection" } }, event_connection_suffix: Fi
leName { value: FixedSizeByteString<255> { len: 6, data: ".event" } } }, node: Node { directory: Path { value: FixedSizeByteString<255> { len: 5, data: "nodes" } }, monitor_suffi
x: FileName { value: FixedSizeByteString<255> { len: 13, data: ".node_monitor" } }, static_config_suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".details" }
}, service_tag_suffix: FileName { value: FixedSizeByteString<255> { len: 12, data: ".service_tag" } }, cleanup_dead_nodes_on_creation: true, cleanup_dead_nodes_on_destruction: tr
ue } }, defaults: Defaults { publish_subscribe: PublishSubscribe { max_subscribers: 8, max_publishers: 2, max_nodes: 20, subscriber_max_buffer_size: 2, subscriber_max_borrowed_sa
mples: 2, publisher_max_loaned_samples: 2, publisher_history_size: 1, enable_safe_overflow: true, unable_to_deliver_strategy: Block, subscriber_expired_connection_buffer: 128 },
event: Event { max_listeners: 2, max_notifiers: 16, max_nodes: 36, event_id_max_value: 32 } } }
             | Set as global config.
       3 [T] Directory { path: Path { value: FixedSizeByteString<255> { len: 49, data: "/tmp/iceoryx2/nodes/10481548106459210960760478046" } }, directory_stream: 0x583104125630,
file_descriptor: FileDescriptor { value: 3, is_owned: false } }
             | created
       4 [T] Builder { storage_name: FileName { value: FixedSizeByteString<255> { len: 4, data: "node" } }, has_ownership: false, config: Configuration { path: Path { value: Fix
edSizeByteString<255> { len: 49, data: "/tmp/iceoryx2/nodes/10481548106459210960760478046" } }, suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".details" } },
prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } } } }
             | Created service root directory "/tmp/iceoryx2/nodes/10481548106459210960760478046" since it did not exist before.
       5 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 67, data: "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_node.details" } }, acce
ss_mode: ReadWrite, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: Some(CreateExclusive) }
             | created
       6 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 78, data: "/tmp/iceoryx2/nodes/iox2_10481548106459210960760478046.node_monitor_owner_lock
" } }, access_mode: ReadWrite, permission: Permission(448), has_ownership: true, owner: None, group: None, truncate_size: None, creation_mode: Some(CreateExclusive) }
             | created
       7 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 67, data: "/tmp/iceoryx2/nodes/iox2_10481548106459210960760478046.node_monitor" } }, acce
ss_mode: ReadWrite, permission: Permission(128), has_ownership: true, owner: None, group: None, truncate_size: None, creation_mode: Some(CreateExclusive) }
             | created
       8 [T] "ProcessGuard::new()"
             | create process state "/tmp/iceoryx2/nodes/iox2_10481548106459210960760478046.node_monitor" for monitoring
       9 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 107, data: "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_9c8644f5b78c0c7ba767f2
1c6ee2b7e3227ee148.service_tag" } }, access_mode: ReadWrite, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: Some
(CreateExclusive) }
             | created
      10 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 76, data: "/tmp/iceoryx2/services/iox2_9c8644f5b78c0c7ba767f21c6ee2b7e3227ee148.service"
} }, access_mode: ReadWrite, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: Some(CreateExclusive) }
             | created
      11 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 94, data: "iox2_305ad9523c6b202364d581359ec3d2c5743e42e7_9c8644f5b78c0c7ba767f21c6ee2b7e3227e
e148.dynamic" } }, size: 987, base_address: 0x75ca6aeb0000, has_ownership: false, file_descriptor: FileDescriptor { value: 8, is_owned: true }, memory_lock: None }
             | create
      12 [T] "Service::open()"
             | open service: a2b (ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "9c8644f5b78c0c7ba767f21c6ee2b7e3227ee148" } }))
      13 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 107, data: "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_ed2ee19d017cb42504336d
5a4aa43a814987bd41.service_tag" } }, access_mode: ReadWrite, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: Some
(CreateExclusive) }
             | created
      14 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 76, data: "/tmp/iceoryx2/services/iox2_ed2ee19d017cb42504336d5a4aa43a814987bd41.service"
} }, access_mode: ReadWrite, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: Some(CreateExclusive) }
             | created
      15 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 94, data: "iox2_305ad9523c6b202364d581359ec3d2c5743e42e7_ed2ee19d017cb42504336d5a4aa43a814987
bd41.dynamic" } }, size: 987, base_address: 0x75ca6aeaf000, has_ownership: false, file_descriptor: FileDescriptor { value: 10, is_owned: true }, memory_lock: None }
             | create
      16 [T] "Service::open()"
             | open service: b2a (ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a814987bd41" } }))
      17 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 95, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_89727713997303446496847337822.p
ublisher_data" } }, size: 41282, base_address: 0x75ca6aea4000, has_ownership: true, file_descriptor: FileDescriptor { value: 6, is_owned: true }, memory_lock: None }
      18      [T]          | create
SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 96, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_168956358340522989383879498078.publisher_data
" } }, size: 41282, base_address: 0x75ca6ae99000, has_ownership: true, file_descriptor: FileDescriptor { value: 11, is_owned: true }, memory_lock: None }
             | create
      20        19 [D] [D] SharedMemoryBuilder { name: FileName { value: FixedSizeByteString<255> { len: 118, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_16895635834052
2989383879498078_248186557744267945986112887134.connection" } }, size: 0, is_memory_locked: false, has_ownership: true, permission: Permission(448), creation_mode: None, zero_mem
ory: true, access_mode: ReadWrite, enforce_base_address: None }SharedMemoryBuilder { name: FileName { value: FixedSizeByteString<255> { len: 117, data: "iox2_b9fc73e5c1f646968758
453273c6c65cb372831b_89727713997303446496847337822_327414785965834674133079693662.connection" } }, size: 0, is_memory_locked: false, has_ownership: true, permission: Permission(4
48), creation_mode: None, zero_memory: true, access_mode: ReadWrite, enforce_base_address: None }
             | Unable to open shared memory since the shared memory does not exist.

             | Unable to open shared memory since the shared memory does not exist.
      21 [D] Builder { storage_name: FileName { value: FixedSizeByteString<255> { len: 61, data: "168956358340522989383879498078_248186557744267945986112887134" } }, supplementa
ry_size: 67, has_ownership: true, config: Configuration { suffix: FileName { value: FixedSizeByteString<255> { len: 11, data: ".connection" } }, prefix: FileName { value: FixedSi
zeByteString<255> { len: 5, data: "iox2_" } }, path: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, _data: PhantomData<iceoryx2_cal::zero_copy_conn
ection::common::details::SharedManagementData> }, timeout: 500ms, initializer: , _phantom_data: PhantomData<iceoryx2_cal::zero_copy_connection::common::details::SharedManagementD
ata> }
      22 [D]               | Failed to open  since a shared memory with that name does not exists.Builder { storage_name: FileName { value: FixedSizeByteString<255> { len: 60, d
ata: "89727713997303446496847337822_327414785965834674133079693662" } }, supplementary_size: 67, has_ownership: true, config: Configuration { suffix: FileName { value: FixedSizeB
yteString<255> { len: 11, data: ".connection" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } }, path: Path { value: FixedSizeByteString<255> {
len: 14, data: "/tmp/iceoryx2/" } }, _data: PhantomData<iceoryx2_cal::zero_copy_connection::common::details::SharedManagementData> }, timeout: 500ms, initializer: , _phantom_data
: PhantomData<iceoryx2_cal::zero_copy_connection::common::details::SharedManagementData> }

             | Failed to open  since a shared memory with that name does not exists.
      23 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 118, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_168956358340522989383879498078_2481
86557744267945986112887134.connection" } }, size: 227, base_address: 0x75ca6ae98000, has_ownership: true, file_descriptor: FileDescriptor { value: 12, is_owned: true }, memory_lo
ck: None }
             | create
      24 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 117, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_89727713997303446496847337822_32741
4785965834674133079693662.connection" } }, size: 227, base_address: 0x75ca6ae97000, has_ownership: true, file_descriptor: FileDescriptor { value: 13, is_owned: true }, memory_loc
k: None }
             | create
      25 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 96, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_168956358340522989383879498078.
publisher_data" } }, size: 41282, base_address: 0x75ca6ae8c000, has_ownership: false, file_descriptor: FileDescriptor { value: 14, is_owned: true }, memory_lock: None }
         26            [T] | open
SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 95, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_89727713997303446496847337822.publisher_data"
} }, size: 41282, base_address: 0x75ca6ae81000, has_ownership: false, file_descriptor: FileDescriptor { value: 15, is_owned: true }, memory_lock: None }
             | open
      27 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 117, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_89727713997303446496847337822_32741
4785965834674133079693662.connection" } }, size: 227, base_address: 0x75ca6ab70000, has_ownership: false, file_descriptor: FileDescriptor { value: 16, is_owned: true }, memory_lo
ck: None }
             | open
      28 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 118, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_168956358340522989383879498078_2481
86557744267945986112887134.connection" } }, size: 227, base_address: 0x75ca6ab6f000, has_ownership: false, file_descriptor: FileDescriptor { value: 17, is_owned: true }, memory_l
ock: None }
             | open
      29 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 117, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_89727713997303446496847337822_32741
4785965834674133079693662.connection" } }, size: 227, base_address: 0x75ca6ae97000, has_ownership: false, file_descriptor: FileDescriptor { value: 13, is_owned: true }, memory_lo
ck: None }
             | close
      30 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 118, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_168956358340522989383879498078_2481
86557744267945986112887134.connection" } }, size: 227, base_address: 0x75ca6ae98000, has_ownership: false, file_descriptor: FileDescriptor { value: 12, is_owned: true }, memory_l
ock: None }
             | close
      31 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 95, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_89727713997303446496847337822.p
ublisher_data" } }, size: 41282, base_address: 0x75ca6ae81000, has_ownership: false, file_descriptor: FileDescriptor { value: 15, is_owned: true }, memory_lock: None }
             | close
      32 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 96, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_168956358340522989383879498078.
publisher_data" } }, size: 41282, base_address: 0x75ca6ae8c000, has_ownership: false, file_descriptor: FileDescriptor { value: 14, is_owned: true }, memory_lock: None }
             | close
      33 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 96, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_168956358340522989383879498078.
publisher_data" } }, size: 41282, base_address: 0x75ca6ae99000, has_ownership: true, file_descriptor: FileDescriptor { value: 11, is_owned: true }, memory_lock: None }
             | close
      34 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 95, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_89727713997303446496847337822.p
ublisher_data" } }, size: 41282, base_address: 0x75ca6aea4000, has_ownership: true, file_descriptor: FileDescriptor { value: 6, is_owned: true }, memory_lock: None }
             | close
      35 [T]        36 SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 96, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_168956358340522989383
879498078.publisher_data" } }, size: 41282, base_address: 0x75ca6ae99000, has_ownership: true, file_descriptor: FileDescriptor { value: 11, is_owned: true }, memory_lock: None }[
T]  
SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 95, data: "iox2_0354a209029e7d094a819e2d4030ea331e6caaf0_6494_89727713997303446496847337822.publisher_data"
} }, size: 41282, base_address: 0x75ca6aea4000, has_ownership: true, file_descriptor: FileDescriptor { value: 6, is_owned: true }, memory_lock: None }
             | delete
             | delete
      37 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 118, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_168956358340522989383879498078_2481
86557744267945986112887134.connection" } }, size: 227, base_address: 0x75ca6ab6f000, has_ownership: true, file_descriptor: FileDescriptor { value: 17, is_owned: true }, memory_lo
ck: None }
      38 [T]               | closeSharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 117, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_89727713997303
446496847337822_327414785965834674133079693662.connection" } }, size: 227, base_address: 0x75ca6ab70000, has_ownership: true, file_descriptor: FileDescriptor { value: 16, is_owne
d: true }, memory_lock: None }

             | close
      39 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 118, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_168956358340522989383879498078_2481
86557744267945986112887134.connection" } }, size: 227, base_address: 0x75ca6ab6f000, has_ownership: true, file_descriptor: FileDescriptor { value: 17, is_owned: true }, memory_lo
ck: None }
             | delete
      40 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 117, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_89727713997303446496847337822_32741
4785965834674133079693662.connection" } }, size: 227, base_address: 0x75ca6ab70000, has_ownership: true, file_descriptor: FileDescriptor { value: 16, is_owned: true }, memory_loc
k: None }
             | delete
iceoryx2::service::ipc::Service ::: Iterations: 1, Time: 0.000644707, Latency: 322353 ns, Sample Size: 8192
      41 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 107, data: "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_ed2ee19d017cb42504336d
5a4aa43a814987bd41.service_tag" } }, access_mode: Read, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: None }
             | opened
      42 [T] "File::remove"
             | "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_ed2ee19d017cb42504336d5a4aa43a814987bd41.service_tag"
      43 [T] "ServiceState::drop()"
             | close and remove service: b2a (ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a814987bd41" } }))
      44 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 94, data: "iox2_305ad9523c6b202364d581359ec3d2c5743e42e7_ed2ee19d017cb42504336d5a4aa43a814987
bd41.dynamic" } }, size: 987, base_address: 0x75ca6aeaf000, has_ownership: true, file_descriptor: FileDescriptor { value: 10, is_owned: true }, memory_lock: None }
             | close
      45 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 94, data: "iox2_305ad9523c6b202364d581359ec3d2c5743e42e7_ed2ee19d017cb42504336d5a4aa43a814987
bd41.dynamic" } }, size: 987, base_address: 0x75ca6aeaf000, has_ownership: true, file_descriptor: FileDescriptor { value: 10, is_owned: true }, memory_lock: None }
             | delete
      46 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 76, data: "/tmp/iceoryx2/services/iox2_ed2ee19d017cb42504336d5a4aa43a814987bd41.service"
} }, access_mode: Read, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: None }
             | opened
      47 [T] "File::remove"
             | "/tmp/iceoryx2/services/iox2_ed2ee19d017cb42504336d5a4aa43a814987bd41.service"
      48 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 107, data: "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_9c8644f5b78c0c7ba767f2
1c6ee2b7e3227ee148.service_tag" } }, access_mode: Read, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: None }
             | opened
      49 [T] "File::remove"
             | "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_9c8644f5b78c0c7ba767f21c6ee2b7e3227ee148.service_tag"
      50 [T] "ServiceState::drop()"
             | close and remove service: a2b (ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "9c8644f5b78c0c7ba767f21c6ee2b7e3227ee148" } }))
      51 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 94, data: "iox2_305ad9523c6b202364d581359ec3d2c5743e42e7_9c8644f5b78c0c7ba767f21c6ee2b7e3227e
e148.dynamic" } }, size: 987, base_address: 0x75ca6aeb0000, has_ownership: true, file_descriptor: FileDescriptor { value: 8, is_owned: true }, memory_lock: None }
             | close
      52 [T] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 94, data: "iox2_305ad9523c6b202364d581359ec3d2c5743e42e7_9c8644f5b78c0c7ba767f21c6ee2b7e3227e
e148.dynamic" } }, size: 987, base_address: 0x75ca6aeb0000, has_ownership: true, file_descriptor: FileDescriptor { value: 8, is_owned: true }, memory_lock: None }
             | delete
      53 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 76, data: "/tmp/iceoryx2/services/iox2_9c8644f5b78c0c7ba767f21c6ee2b7e3227ee148.service"
} }, access_mode: Read, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: None }
             | opened
      54 [T] "File::remove"
             | "/tmp/iceoryx2/services/iox2_9c8644f5b78c0c7ba767f21c6ee2b7e3227ee148.service"
      55 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 67, data: "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_node.details" } }, acce
ss_mode: Read, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: None }
             | opened
      56 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { len: 67, data: "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_node.details" } }, acce
ss_mode: Read, permission: Permission(448), has_ownership: false, owner: None, group: None, truncate_size: None, creation_mode: None }
             | opened
      57 [T] "File::remove"
             | "/tmp/iceoryx2/nodes/10481548106459210960760478046/iox2_node.details"
      58 [T] "Directory::remove"
             | removed "/tmp/iceoryx2/nodes/10481548106459210960760478046"
      59 [T] "File::remove"
             | "/tmp/iceoryx2/nodes/iox2_10481548106459210960760478046.node_monitor"
      60 [T] "File::remove"
             | "/tmp/iceoryx2/nodes/iox2_10481548106459210960760478046.node_monitor_owner_lock"
      61 [T] "Service::open()"
             | open service: a2b (ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "9c8644f5b78c0c7ba767f21c6ee2b7e3227ee148" } }))
      62 [T] "Service::open()"
             | open service: b2a (ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a814987bd41" } }))
      63 [D] Builder { name: FileName { value: FixedSizeByteString<255> { len: 61, data: "566976270706792965573263235422_646205090275634464627326196062" } }, supplementary_size:
67, has_ownership: true, config: Configuration { suffix: FileName { value: FixedSizeByteString<255> { len: 11, data: ".connection" } }, prefix: FileName { value: FixedSizeByteSt
ring<255> { len: 5, data: "iox2_" } }, path_hint: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, _data: PhantomData<iceoryx2_cal::zero_copy_connect
ion::common::details::SharedManagementData> }, initializer: , _phantom_data: PhantomData<iceoryx2_cal::zero_copy_connection::common::details::SharedManagementData> }
             | Failed to open dynamic storage since the storage does not exist.
      64 [D] Builder { name: FileName { value: FixedSizeByteString<255> { len: 61, data: "487747867259604281259265628510_725434282173558347434978974046" } }, supplementary_size:
67, has_ownership: true, config: Configuration { suffix: FileName { value: FixedSizeByteString<255> { len: 11, data: ".connection" } }, prefix: FileName { value: FixedSizeByteSt
ring<255> { len: 5, data: "iox2_" } }, path_hint: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, _data: PhantomData<iceoryx2_cal::zero_copy_connect
ion::common::details::SharedManagementData> }, initializer: , _phantom_data: PhantomData<iceoryx2_cal::zero_copy_connection::common::details::SharedManagementData> }
             | Failed to open dynamic storage since the storage does not exist.
      65 [D] Builder { name: FileName { value: FixedSizeByteString<255> { len: 35, data: "6494_566976270706792965573263235422" } }, supplementary_size: 0, has_ownership: false,
config: Configuration { suffix: FileName { value: FixedSizeByteString<255> { len: 15, data: ".publisher_data" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, da
ta: "iox2_" } }, path_hint: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, _data: PhantomData<iceoryx2_cal::shared_memory::common::details::Allocat
orDetails<iceoryx2_cal::shm_allocator::pool_allocator::PoolAllocator>> }, initializer: , _phantom_data: PhantomData<iceoryx2_cal::shared_memory::common::details::AllocatorDetails
<iceoryx2_cal::shm_allocator::pool_allocator::PoolAllocator>> }
             | Failed to open dynamic storage since the storage does not exist.
      66 [D] Builder { name: FileName { value: FixedSizeByteString<255> { len: 35, data: "6494_566976270706792965573263235422" } }, size: 0, config: Configuration { zero_memory:
true, dynamic_storage_config: Configuration { suffix: FileName { value: FixedSizeByteString<255> { len: 15, data: ".publisher_data" } }, prefix: FileName { value: FixedSizeByteS
tring<255> { len: 5, data: "iox2_" } }, path_hint: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, _data: PhantomData<iceoryx2_cal::shared_memory::c
ommon::details::AllocatorDetails<iceoryx2_cal::shm_allocator::pool_allocator::PoolAllocator>> }, _phantom: PhantomData<iceoryx2_cal::shm_allocator::pool_allocator::PoolAllocator>
, _phantom_storage: PhantomData<iceoryx2_cal::dynamic_storage::process_local::Storage<iceoryx2_cal::shared_memory::common::details::AllocatorDetails<iceoryx2_cal::shm_allocator::
pool_allocator::PoolAllocator>>> }, timeout: 500ms, has_ownership: true }
             | Unable to open shared memory since a shared memory with that name does not exist.
      67 [D] PublisherConnections { connections: [UnsafeCell { .. }], subscriber_id: UniqueSubscriberId(UniqueSystemId { value: 646205090275634464627326196062, pid: 6494, creati
on_time: Time { clock_type: Realtime, seconds: 1725374656, nanoseconds: 671109769 } }), service_state: ServiceState { static_config: StaticConfig { service_id: ServiceId(Restrict
edFileName { value: FixedSizeByteString<64> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a814987bd41" } }), service_name: ServiceName { value: "b2a" }, attributes: AttributeSet
([]), messaging_pattern: PublishSubscribe(StaticConfig { max_subscribers: 1, max_publishers: 1, max_nodes: 20, history_size: 0, subscriber_max_buffer_size: 1, subscriber_max_borr
owed_samples: 2, enable_safe_overflow: true, message_type_details: MessageTypeDetails { header: TypeDetail { variant: FixedSize, type_name: "iceoryx2::service::header::publish_su
bscribe::Header", size: 32, alignment: 8 }, user_header: TypeDetail { variant: FixedSize, type_name: "()", size: 0, alignment: 1 }, payload: TypeDetail { variant: Dynamic, type_n
ame: "u8", size: 1, alignment: 1 } } }) }, shared_node: SharedNode { id: NodeId(UniqueSystemId { value: 408511447724438134238484633950, pid: 6494, creation_time: Time { clock_typ
e: Realtime, seconds: 1725374656, nanoseconds: 670613475 } }), details: NodeDetails { executable: FileName { value: FixedSizeByteString<255> { len: 27, data: "benchmark-publish-s
ubscribe" } }, name: NodeName { value: "" }, config: Config { global: Global { root_path_unix: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, root_
path_windows: Path { value: FixedSizeByteString<255> { len: 17, data: "c:\Temp\iceoryx2\" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } }, ser
vice: Service { directory: Path { value: FixedSizeByteString<255> { len: 8, data: "services" } }, publisher_data_segment_suffix: FileName { value: FixedSizeByteString<255> { len:
15, data: ".publisher_data" } }, static_config_storage_suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".service" } }, dynamic_config_storage_suffix: FileName
{ value: FixedSizeByteString<255> { len: 8, data: ".dynamic" } }, creation_timeout: 500ms, connection_suffix: FileName { value: FixedSizeByteString<255> { len: 11, data: ".conne
ction" } }, event_connection_suffix: FileName { value: FixedSizeByteString<255> { len: 6, data: ".event" } } }, node: Node { directory: Path { value: FixedSizeByteString<255> { l
en: 5, data: "nodes" } }, monitor_suffix: FileName { value: FixedSizeByteString<255> { len: 13, data: ".node_monitor" } }, static_config_suffix: FileName { value: FixedSizeByteSt
ring<255> { len: 8, data: ".details" } }, service_tag_suffix: FileName { value: FixedSizeByteString<255> { len: 12, data: ".service_tag" } }, cleanup_dead_nodes_on_creation: true
, cleanup_dead_nodes_on_destruction: true } }, defaults: Defaults { publish_subscribe: PublishSubscribe { max_subscribers: 8, max_publishers: 2, max_nodes: 20, subscriber_max_buf
fer_size: 2, subscriber_max_borrowed_samples: 2, publisher_max_loaned_samples: 2, publisher_history_size: 1, enable_safe_overflow: true, unable_to_deliver_strategy: Block, subscr
iber_expired_connection_buffer: 128 }, event: Event { max_listeners: 2, max_notifiers: 16, max_nodes: 36, event_id_max_value: 32 } } } }, monitoring_token: UnsafeCell { .. }, reg
istered_services: RegisteredServices { data: Mutex { data: {ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a814987bd
41" } }): (ContainerHandle { index: 0, container_id: 11 }, 1), ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "9c8644f5b78c0c7ba767f21c6ee2b7e3227
ee148" } }): (ContainerHandle { index: 0, container_id: 8 }, 1)}, poisoned: false, .. } }, _details_storage: Storage { name: FileName { value: FixedSizeByteString<255> { len: 4,
data: "node" } }, has_ownership: false, config: Configuration { path: Path { value: FixedSizeByteString<255> { len: 50, data: "/tmp/iceoryx2/nodes/408511447724438134238484633950"
} }, suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".details" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } } }, content
: StorageContent { is_locked: true, value: [] } } }, dynamic_storage: Storage { name: FileName { value: FixedSizeByteString<255> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a8
14987bd41" } }, data: StorageDetails { data_ptr: 0x583104127a28, layout: Layout { size: 979, align: 8 (1 << 3) } }, has_ownership: false, config: Configuration { suffix: FileName
{ value: FixedSizeByteString<255> { len: 8, data: ".dynamic" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } }, path_hint: Path { value: FixedS
izeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, _data: PhantomData<iceoryx2::service::dynamic_config::DynamicConfig> } }, static_storage: Storage { name: FileName { val
ue: FixedSizeByteString<255> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a814987bd41" } }, has_ownership: false, config: Configuration { path: Path { value: FixedSizeByteStrin
g<255> { len: 22, data: "/tmp/iceoryx2/services" } }, suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".service" } }, prefix: FileName { value: FixedSizeByteSt
ring<255> { len: 5, data: "iox2_" } } }, content: StorageContent { is_locked: true, value: [] } } }, static_config: StaticConfig { max_subscribers: 1, max_publishers: 1, max_node
s: 20, history_size: 0, subscriber_max_buffer_size: 1, subscriber_max_borrowed_samples: 2, enable_safe_overflow: true, message_type_details: MessageTypeDetails { header: TypeDeta
il { variant: FixedSize, type_name: "iceoryx2::service::header::publish_subscribe::Header", size: 32, alignment: 8 }, user_header: TypeDetail { variant: FixedSize, type_name: "()
", size: 0, alignment: 1 }, payload: TypeDetail { variant: Dynamic, type_name: "u8", size: 1, alignment: 1 } } }, buffer_size: 1 }
             | Unable to establish connection to publisher UniquePublisherId(UniqueSystemId { value: 566976270706792965573263235422, pid: 6494, creation_time: Time { clock_type:
Realtime, seconds: 1725374656, nanoseconds: 671074150 } }) from subscriber UniqueSubscriberId(UniqueSystemId { value: 646205090275634464627326196062, pid: 6494, creation_time: T
ime { clock_type: Realtime, seconds: 1725374656, nanoseconds: 671109769 } }). since the publishers data segment could not be opened.
      68 [W] Subscriber { dynamic_subscriber_handle: Some(ContainerHandle { index: 0, container_id: 9 }), publisher_connections: PublisherConnections { connections: [UnsafeCell
{ .. }], subscriber_id: UniqueSubscriberId(UniqueSystemId { value: 646205090275634464627326196062, pid: 6494, creation_time: Time { clock_type: Realtime, seconds: 1725374656, nan
oseconds: 671109769 } }), service_state: ServiceState { static_config: StaticConfig { service_id: ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "
ed2ee19d017cb42504336d5a4aa43a814987bd41" } }), service_name: ServiceName { value: "b2a" }, attributes: AttributeSet([]), messaging_pattern: PublishSubscribe(StaticConfig { max_s
ubscribers: 1, max_publishers: 1, max_nodes: 20, history_size: 0, subscriber_max_buffer_size: 1, subscriber_max_borrowed_samples: 2, enable_safe_overflow: true, message_type_deta
ils: MessageTypeDetails { header: TypeDetail { variant: FixedSize, type_name: "iceoryx2::service::header::publish_subscribe::Header", size: 32, alignment: 8 }, user_header: TypeD
etail { variant: FixedSize, type_name: "()", size: 0, alignment: 1 }, payload: TypeDetail { variant: Dynamic, type_name: "u8", size: 1, alignment: 1 } } }) }, shared_node: Shared
Node { id: NodeId(UniqueSystemId { value: 408511447724438134238484633950, pid: 6494, creation_time: Time { clock_type: Realtime, seconds: 1725374656, nanoseconds: 670613475 } }),
details: NodeDetails { executable: FileName { value: FixedSizeByteString<255> { len: 27, data: "benchmark-publish-subscribe" } }, name: NodeName { value: "" }, config: Config {
global: Global { root_path_unix: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, root_path_windows: Path { value: FixedSizeByteString<255> { len: 17
, data: "c:\Temp\iceoryx2\" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } }, service: Service { directory: Path { value: FixedSizeByteString<2
55> { len: 8, data: "services" } }, publisher_data_segment_suffix: FileName { value: FixedSizeByteString<255> { len: 15, data: ".publisher_data" } }, static_config_storage_suffix
: FileName { value: FixedSizeByteString<255> { len: 8, data: ".service" } }, dynamic_config_storage_suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".dynamic"
} }, creation_timeout: 500ms, connection_suffix: FileName { value: FixedSizeByteString<255> { len: 11, data: ".connection" } }, event_connection_suffix: FileName { value: FixedSi
zeByteString<255> { len: 6, data: ".event" } } }, node: Node { directory: Path { value: FixedSizeByteString<255> { len: 5, data: "nodes" } }, monitor_suffix: FileName { value: Fi
xedSizeByteString<255> { len: 13, data: ".node_monitor" } }, static_config_suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".details" } }, service_tag_suffix:
FileName { value: FixedSizeByteString<255> { len: 12, data: ".service_tag" } }, cleanup_dead_nodes_on_creation: true, cleanup_dead_nodes_on_destruction: true } }, defaults: Defau
lts { publish_subscribe: PublishSubscribe { max_subscribers: 8, max_publishers: 2, max_nodes: 20, subscriber_max_buffer_size: 2, subscriber_max_borrowed_samples: 2, publisher_max
_loaned_samples: 2, publisher_history_size: 1, enable_safe_overflow: true, unable_to_deliver_strategy: Block, subscriber_expired_connection_buffer: 128 }, event: Event { max_list
eners: 2, max_notifiers: 16, max_nodes: 36, event_id_max_value: 32 } } } }, monitoring_token: UnsafeCell { .. }, registered_services: RegisteredServices { data: Mutex { data: {Se
rviceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a814987bd41" } }): (ContainerHandle { index: 0, container_id: 11 }, 1),
ServiceId(RestrictedFileName { value: FixedSizeByteString<64> { len: 40, data: "9c8644f5b78c0c7ba767f21c6ee2b7e3227ee148" } }): (ContainerHandle { index: 0, container_id: 8 }, 1
)}, poisoned: false, .. } }, _details_storage: Storage { name: FileName { value: FixedSizeByteString<255> { len: 4, data: "node" } }, has_ownership: false, config: Configuration
{ path: Path { value: FixedSizeByteString<255> { len: 50, data: "/tmp/iceoryx2/nodes/408511447724438134238484633950" } }, suffix: FileName { value: FixedSizeByteString<255> { len
: 8, data: ".details" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } } }, content: StorageContent { is_locked: true, value: [] } } }, dynamic_s
torage: Storage { name: FileName { value: FixedSizeByteString<255> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a814987bd41" } }, data: StorageDetails { data_ptr: 0x583104127a2
8, layout: Layout { size: 979, align: 8 (1 << 3) } }, has_ownership: false, config: Configuration { suffix: FileName { value: FixedSizeByteString<255> { len: 8, data: ".dynamic"
} }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } }, path_hint: Path { value: FixedSizeByteString<255> { len: 14, data: "/tmp/iceoryx2/" } }, _dat
a: PhantomData<iceoryx2::service::dynamic_config::DynamicConfig> } }, static_storage: Storage { name: FileName { value: FixedSizeByteString<255> { len: 40, data: "ed2ee19d017cb42
504336d5a4aa43a814987bd41" } }, has_ownership: false, config: Configuration { path: Path { value: FixedSizeByteString<255> { len: 22, data: "/tmp/iceoryx2/services" } }, suffix:
FileName { value: FixedSizeByteString<255> { len: 8, data: ".service" } }, prefix: FileName { value: FixedSizeByteString<255> { len: 5, data: "iox2_" } } }, content: StorageConte
nt { is_locked: true, value: [] } } }, static_config: StaticConfig { max_subscribers: 1, max_publishers: 1, max_nodes: 20, history_size: 0, subscriber_max_buffer_size: 1, subscri
ber_max_borrowed_samples: 2, enable_safe_overflow: true, message_type_details: MessageTypeDetails { header: TypeDetail { variant: FixedSize, type_name: "iceoryx2::service::header
::publish_subscribe::Header", size: 32, alignment: 8 }, user_header: TypeDetail { variant: FixedSize, type_name: "()", size: 0, alignment: 1 }, payload: TypeDetail { variant: Dyn
amic, type_name: "u8", size: 1, alignment: 1 } } }, buffer_size: 1 }, to_be_removed_connections: UnsafeCell { .. }, static_config: StaticConfig { service_id: ServiceId(Restricted
FileName { value: FixedSizeByteString<64> { len: 40, data: "ed2ee19d017cb42504336d5a4aa43a814987bd41" } }), service_name: ServiceName { value: "b2a" }, attributes: AttributeSet([
]), messaging_pattern: PublishSubscribe(StaticConfig { max_subscribers: 1, max_publishers: 1, max_nodes: 20, history_size: 0, subscriber_max_buffer_size: 1, subscriber_max_borrow
ed_samples: 2, enable_safe_overflow: true, message_type_details: MessageTypeDetails { header: TypeDetail { variant: FixedSize, type_name: "iceoryx2::service::header::publish_subs
cribe::Header", size: 32, alignment: 8 }, user_header: TypeDetail { variant: FixedSize, type_name: "()", size: 0, alignment: 1 }, payload: TypeDetail { variant: Dynamic, type_nam
e: "u8", size: 1, alignment: 1 } } }) }, degration_callback: None, publisher_list_state: UnsafeCell { .. }, _payload: PhantomData<[u8]>, _user_header: PhantomData<()> }
             | Unable to establish connection to new publisher UniquePublisherId(UniqueSystemId { value: 566976270706792965573263235422, pid: 6494, creation_time: Time { clock_t
ype: Realtime, seconds: 1725374656, nanoseconds: 671074150 } }).
IpFruion commented 1 month ago

I know this was opened a while ago but I am experiencing a similar issue. For extra context I see this occur when I have my subscriber busy looping in debug mode and my publisher sends a singular message and then exits program normally.

If I add a thread::sleep to the publisher after sending the dynamic payload ([u8]) the subscriber is able to receive the data sent.

Not sure how to deal with this race condition but that seems to be an issue with the subscriber receiving the payload but during that call the publisher cleans up the sent information after being deallocated from the program ending.

In the config I specifically removed node cleanup for construction and destruction of the publisher.

elfenpiff commented 1 month ago

@IpFruion Is your sequence somehow like this:

  1. Subscriber created
  2. Publisher created
  3. Publisher sends sample
  4. Publisher is removed
  5. Subscriber calls receive and receives nothing?

If so then this is something caused by the decentral architecture of iceoryx2. The underlying reason is that the subscriber checks in receive if the service had any updates and if so connects to the new publishers and removes the old ones. But in this case there is nothing to connect since the publisher is gone again.

Currently, we are evaluating multiple approaches to handle this issue. We could add a configurable parameter so that the publisher waits on drop (with a timeout X) until every subscriber has confirmed that it is connected. This would require the subscriber to have a loop that waits for at most X. With the new WaitSet (Event multiplexing mechanism) this could be handled elegantly by waking up another process. There will be an example demonstrating this in the near future.

IpFruion commented 1 month ago

@elfenpiff Yes exactly that is the flow I am working with. Thanks for the insight to the issue 💯. I am working with a kind of mpsc (multiple producers single consumer) kind of situation. My current set of solutions (plus the one you gave)

  1. Use the event system to wait until the subscriber has received the message and post the event back to the publisher saying it received the content.
  2. Use the WaitSet solution
  3. The future planned request response work should also help with this.

If you have any others to keep an eye on let me know.