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

[#361] creation timeout #363

Closed elfenpiff closed 2 months ago

elfenpiff commented 2 months ago

Notes for Reviewer

From previous PR: How about calling this cpu_core_participant_1 and cpu_core_participant_2. We could then use the same names for the multi-process benchmark.

In the PR we check if the version number is equal zero to additionally determine if the shared memory was initialized or not. Technically it is undefined behavior but works most of the time since the OS zero's the memory. A cleaner solution would be to apply the access rights strategy to the trampoline files but this will cost a lot of effort. Here is the tracking issue for that: https://github.com/eclipse-iceoryx/iceoryx2/issues/364

In this PR I would pursue the version flag approach since it offers a solution and pursue the #364 later.

Pre-Review Checklist for the PR Author

  1. [x] Add sensible notes for the reviewer
  2. [x] PR title is short, expressive and meaningful
  3. [x] Relevant issues are linked in the References section
  4. [x] Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  5. [x] Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  6. [x] Commits messages are according to this guideline
    • [x] Commit messages have the issue ID ([#123] Add posix ipc example)
    • [x] Commit author matches Eclipse Contributor Agreement (and ECA is signed)
  7. [x] Tests follow the best practice for testing
  8. [x] Changelog updated in the unreleased section including API breaking changes
  9. [x] Assign PR to reviewer
  10. [x] All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

Post-review Checklist for the PR Author

  1. [x] All open points are addressed and tracked via issues

References

Closes #361

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 82.71605% with 28 lines in your changes missing coverage. Please review.

Project coverage is 80.20%. Comparing base (6089d60) to head (4f6b3ba). Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
...yx2-cal/src/dynamic_storage/posix_shared_memory.rs 50.00% 8 Missing :warning:
iceoryx2/src/service/builder/mod.rs 73.33% 8 Missing :warning:
iceoryx2-cal/src/static_storage/file.rs 84.00% 4 Missing :warning:
iceoryx2-cal/src/static_storage/process_local.rs 85.71% 4 Missing :warning:
iceoryx2-cal/src/shared_memory/common.rs 90.90% 2 Missing :warning:
iceoryx2-cal/src/zero_copy_connection/common.rs 94.11% 2 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363/graphs/tree.svg?width=650&height=150&src=pr&token=FN3YFXTJCI&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx)](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx) ```diff @@ Coverage Diff @@ ## main #363 +/- ## ========================================== + Coverage 80.12% 80.20% +0.07% ========================================== Files 193 193 Lines 22702 22723 +21 ========================================== + Hits 18191 18224 +33 + Misses 4511 4499 -12 ``` | [Files with missing lines](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx) | Coverage Δ | | |---|---|---| | [iceoryx2-cal/src/static\_storage/mod.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2-cal%2Fsrc%2Fstatic_storage%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDItY2FsL3NyYy9zdGF0aWNfc3RvcmFnZS9tb2QucnM=) | `77.77% <ø> (ø)` | | | [iceoryx2-cal/src/zero\_copy\_connection/mod.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2-cal%2Fsrc%2Fzero_copy_connection%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDItY2FsL3NyYy96ZXJvX2NvcHlfY29ubmVjdGlvbi9tb2QucnM=) | `12.50% <ø> (ø)` | | | [iceoryx2/src/node/mod.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fnode%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL25vZGUvbW9kLnJz) | `70.92% <100.00%> (ø)` | | | [iceoryx2/src/port/details/publisher\_connections.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fport%2Fdetails%2Fpublisher_connections.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3BvcnQvZGV0YWlscy9wdWJsaXNoZXJfY29ubmVjdGlvbnMucnM=) | `100.00% <100.00%> (ø)` | | | [...ceoryx2/src/port/details/subscriber\_connections.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fport%2Fdetails%2Fsubscriber_connections.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3BvcnQvZGV0YWlscy9zdWJzY3JpYmVyX2Nvbm5lY3Rpb25zLnJz) | `94.80% <100.00%> (+0.06%)` | :arrow_up: | | [iceoryx2/src/service/builder/event.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fservice%2Fbuilder%2Fevent.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3NlcnZpY2UvYnVpbGRlci9ldmVudC5ycw==) | `81.27% <ø> (+0.57%)` | :arrow_up: | | [iceoryx2/src/service/builder/publish\_subscribe.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fservice%2Fbuilder%2Fpublish_subscribe.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3NlcnZpY2UvYnVpbGRlci9wdWJsaXNoX3N1YnNjcmliZS5ycw==) | `89.68% <ø> (+0.33%)` | :arrow_up: | | [iceoryx2/src/service/mod.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fservice%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3NlcnZpY2UvbW9kLnJz) | `79.00% <100.00%> (-1.53%)` | :arrow_down: | | [iceoryx2-cal/src/shared\_memory/common.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2-cal%2Fsrc%2Fshared_memory%2Fcommon.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDItY2FsL3NyYy9zaGFyZWRfbWVtb3J5L2NvbW1vbi5ycw==) | `86.38% <90.90%> (+1.10%)` | :arrow_up: | | [iceoryx2-cal/src/zero\_copy\_connection/common.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree&filepath=iceoryx2-cal%2Fsrc%2Fzero_copy_connection%2Fcommon.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDItY2FsL3NyYy96ZXJvX2NvcHlfY29ubmVjdGlvbi9jb21tb24ucnM=) | `92.01% <94.11%> (+0.40%)` | :arrow_up: | | ... and [4 more](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx) | | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/363/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx)