Skip to content

feat: IPC binding for socom#86

Open
lurtz wants to merge 87 commits into
eclipse-score:mainfrom
elektrobit-contrib:mw-com-as-socom-bridge
Open

feat: IPC binding for socom#86
lurtz wants to merge 87 commits into
eclipse-score:mainfrom
elektrobit-contrib:mw-com-as-socom-bridge

Conversation

@lurtz

@lurtz lurtz commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Transport socom semantics over IPC to another process. It uses shared memory for payloads to avoid copying huge payloads.

TODO

  • transmit string "ipc identifier" at first connection
  • measure memory usage
  • fix flaky tests
  • check calls to MakeUnexpected(): seems to require static strings
  • reduce number of static casts

Transport socom semantics over IPC to another process. It uses shared memory for payloads to avoid copying huge payloads.
@github-actions

github-actions Bot commented Apr 15, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 1d58cae4-7702-4cab-bf46-79a14f48b469
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 3 packages loaded
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 4 packages loaded
Analyzing: target //:license-check (4 packages loaded, 0 targets configured)
Analyzing: target //:license-check (4 packages loaded, 0 targets configured)

Analyzing: target //:license-check (44 packages loaded, 10 targets configured)

Analyzing: target //:license-check (93 packages loaded, 10 targets configured)

Analyzing: target //:license-check (147 packages loaded, 1071 targets configured)

Analyzing: target //:license-check (161 packages loaded, 3211 targets configured)

Analyzing: target //:license-check (165 packages loaded, 9394 targets configured)

Analyzing: target //:license-check (165 packages loaded, 9407 targets configured)

Analyzing: target //:license-check (172 packages loaded, 9557 targets configured)

Analyzing: target //:license-check (172 packages loaded, 9557 targets configured)

Analyzing: target //:license-check (176 packages loaded, 11564 targets configured)

Analyzing: target //:license-check (176 packages loaded, 11564 targets configured)

INFO: Analyzed target //:license-check (177 packages loaded, 13143 targets configured).
[11 / 17] [Prepa] Expanding template external/score_tooling+/dash/tool/formatters/_dash_format_converter_stage2_bootstrap.py [for tool]
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 211.473s, Critical Path: 0.33s
INFO: 17 processes: 5 disk cache hit, 12 internal.
INFO: Build completed successfully, 17 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

Comment thread src/gateway_ipc_binding/memory_profile/README.md Outdated
Comment thread memory_profile/PROFILING_REPORT.md Outdated
### Overall Statistics
- **Total Heap Allocated**: 10,447,202 bytes (~10.0 MB)
- **Peak Heap Usage**: 195,318 bytes (~191 KB)
- **Peak Stack Usage**: 26,832 bytes (~26 KB)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This means that we allocate/de-allocate a lot, right? This we should look into and minimize. In a safety-critical system it would be favorable to allocate on startup and then don't have any heap operations until shutdown. That means total heap allocated should be more or less equal to peak heap usage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That has not been my interpretation of the data. I looked more at what I got in graphs. E.g. this

image

I interpreted this that after startup nothing is allocated anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I reworked the performance tests and memory profiling tests. There was a bug, which skipped an iteration if it failed to allocate shared memory, which can happen after all slots were consumed, but not freed. Now it looks more reasonable:

image

Towards your conclusion that there might be many small allocations and deallocations, I have now an idea where they come from. The socom::Payload is an interface class and shared_ptr is used for reference counting. Thus we see lots of shared_ptr<socom::Payload> constructions and destructions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

with latest changes allocations during event updates are gone. However due to the use of unordered_map and std::vector, there could still some happen after init and these have to be properly pre initialized

Comment thread memory_profile/PERFORMANCE_ANALYSIS.md Outdated
Comment thread third_party/score_communication-message_passing_public.patch Outdated
@lurtz

lurtz commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Test code when only one side provides a service, but not the other one. Currently tests are always configured to be symmetric and even the same service is possible to be offered on both sides.

UPDATE Dealt with in 1a52ead

@mariuswbr mariuswbr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stumbled on this while trying to use the IPC binding in someipd and gatewayd.

Comment thread src/gateway_ipc_binding/src/binding_base.cpp
Comment thread src/gateway_ipc_binding/src/binding_base.cpp Outdated
lurtz and others added 25 commits June 11, 2026 19:19
…t shared memory configuration for method calls and event updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants