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

iox-#1361 Use shared memory for process alive detection #2056

Merged

Conversation

elBoberido
Copy link
Member

@elBoberido elBoberido commented Oct 23, 2023

Pre-Review Checklist for the PR Author

  1. Code follows the coding style of CONTRIBUTING.md
  2. Tests follow the best practice for testing
  3. Changelog updated in the unreleased section including API breaking changes
  4. Branch follows the naming format (iox-123-this-is-a-branch)
  5. Commits messages are according to this guideline
  6. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  7. Relevant issues are linked
  8. Add sensible notes for the reviewer
  9. All checks have passed (except task-list-completed)
  10. All touched (C/C++) source code files from iceoryx_hoofs are added to ./clang-tidy-diff-scans.txt
  11. Assign PR to reviewer

Notes for Reviewer

This PR refactors the process alive detection by moving it from an IPC message to a timestamp in the shared memory. It is still not optimal but helps with #2040 and should prevent #1374.

Ideally the process alive detection should not depend on a free running thread to update a value but either on the frequency of the actual sent messages or actual crash detection to prevent RouDi from killing applications which are stopped in a debugger.

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • All touched (C/C++) source code files from iceoryx_hoofs have been added to ./clang-tidy-diff-scans.txt
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

@elBoberido elBoberido added the refactoring Refactor code without adding features label Oct 23, 2023
@elBoberido elBoberido self-assigned this Oct 23, 2023
@elBoberido
Copy link
Member Author

@FerdinandSpitzschnueffler @mossmaurice @dkroenke @MatthiasKillat @elfenpiff @budrus feel free to add yourself as reviewer

@elBoberido elBoberido changed the base branch from master to iox-2044-use-new-fixed-position-container October 24, 2023 00:17
@elBoberido elBoberido changed the base branch from iox-2044-use-new-fixed-position-container to iox-66-remove-object-pool October 24, 2023 00:18
@elBoberido elBoberido force-pushed the iox-66-remove-object-pool branch from aae1632 to d43405d Compare October 24, 2023 15:07
@elBoberido elBoberido changed the base branch from iox-66-remove-object-pool to master October 24, 2023 15:37
@elBoberido elBoberido force-pushed the iox-1361-use-shared-memory-for-process-alive-detection branch from 6724ceb to 785714a Compare October 24, 2023 15:37
@elBoberido elBoberido changed the base branch from master to iox-66-remove-object-pool October 24, 2023 15:38
@elBoberido elBoberido force-pushed the iox-1361-use-shared-memory-for-process-alive-detection branch from 785714a to 9cdf381 Compare October 24, 2023 15:44
@elBoberido elBoberido changed the base branch from iox-66-remove-object-pool to master October 24, 2023 15:45
@elBoberido elBoberido force-pushed the iox-1361-use-shared-memory-for-process-alive-detection branch from c34ca20 to 9cdf381 Compare October 24, 2023 15:46
@elBoberido elBoberido changed the base branch from master to iox-66-remove-object-pool October 24, 2023 15:46
@elBoberido elBoberido force-pushed the iox-66-remove-object-pool branch from d43405d to 2fdbb96 Compare October 24, 2023 21:26
@elBoberido elBoberido force-pushed the iox-1361-use-shared-memory-for-process-alive-detection branch from 9cdf381 to d725812 Compare October 24, 2023 21:27
@elBoberido elBoberido force-pushed the iox-66-remove-object-pool branch from 2fdbb96 to f20df53 Compare October 25, 2023 21:47
@elBoberido elBoberido force-pushed the iox-1361-use-shared-memory-for-process-alive-detection branch from d725812 to c5bd28b Compare October 25, 2023 21:48
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #2056 (dda2e7f) into master (775c7ac) will increase coverage by 0.02%.
Report is 2 commits behind head on master.
The diff coverage is 69.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2056      +/-   ##
==========================================
+ Coverage   80.10%   80.12%   +0.02%     
==========================================
  Files         416      417       +1     
  Lines       16026    16059      +33     
  Branches     2250     2255       +5     
==========================================
+ Hits        12837    12867      +30     
- Misses       2384     2385       +1     
- Partials      805      807       +2     
Flag Coverage Δ
unittests 79.91% <69.41%> (+0.02%) ⬆️
unittests_timing 15.29% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...nternal/roudi/introspection/port_introspection.hpp 100.00% <ø> (ø)
...sh/include/iceoryx_posh/internal/roudi/process.hpp 100.00% <ø> (ø)
...de/iceoryx_posh/internal/roudi/process_manager.hpp 100.00% <ø> (ø)
...eoryx_posh/internal/runtime/ipc_interface_base.hpp 100.00% <ø> (ø)
...yx_posh/internal/runtime/ipc_runtime_interface.hpp 100.00% <ø> (ø)
...iceoryx_posh/roudi/memory/default_roudi_memory.hpp 100.00% <ø> (ø)
...posh/roudi/memory/iceoryx_roudi_memory_manager.hpp 22.22% <ø> (ø)
...eoryx_posh/roudi/memory/roudi_memory_interface.hpp 100.00% <ø> (ø)
...urce/roudi/memory/iceoryx_roudi_memory_manager.cpp 83.87% <100.00%> (+1.72%) ⬆️
iceoryx_posh/source/roudi/process.cpp 100.00% <100.00%> (ø)
... and 6 more

... and 3 files with indirect coverage changes

@elBoberido elBoberido force-pushed the iox-66-remove-object-pool branch from f20df53 to a7f4165 Compare October 25, 2023 23:22
@elBoberido elBoberido force-pushed the iox-1361-use-shared-memory-for-process-alive-detection branch from c5bd28b to 2f92bb0 Compare October 25, 2023 23:26
@elBoberido elBoberido changed the base branch from iox-66-remove-object-pool to iox-2044-use-new-fixed-position-container October 25, 2023 23:27
@elBoberido elBoberido changed the title [Stacked on #2054] iox-#1361 Use shared memory for process alive detection [Stacked on #2053] iox-#1361 Use shared memory for process alive detection Oct 25, 2023
Copy link
Contributor

@elfenpiff elfenpiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just minor things.

Base automatically changed from iox-2044-use-new-fixed-position-container to master October 30, 2023 20:10
@elBoberido elBoberido changed the title [Stacked on #2053] iox-#1361 Use shared memory for process alive detection iox-#1361 Use shared memory for process alive detection Oct 30, 2023
elfenpiff
elfenpiff previously approved these changes Oct 30, 2023
@elBoberido elBoberido force-pushed the iox-1361-use-shared-memory-for-process-alive-detection branch from b1c74a1 to dda2e7f Compare October 30, 2023 20:35
@elBoberido elBoberido merged commit 6b43343 into master Nov 1, 2023
@elBoberido elBoberido deleted the iox-1361-use-shared-memory-for-process-alive-detection branch November 1, 2023 11:34
@elBoberido elBoberido linked an issue Nov 1, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactor code without adding features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve process is alive detection
3 participants