Improve E3 logging: errno on failure + configurable, uid-namespaced log path#33
Merged
Conversation
Add E3Config::log_path (and log_path to the C e3_config_t) so callers can redirect the shared log file explicitly. When left empty, derive a default of the form /tmp/e3_<role>[_<sanitized-id>]_<euid>.log. The trailing effective-uid keeps the file owned by whoever opens it, which avoids fs.protected_regular=2 blocking an O_CREAT re-open of a /tmp file owned by a different user (e.g. a root gNB unable to reopen a log left by a prior non-sudo run). The sanitized role identifier (ran_identifier for RAN, dapp_name for DAPP) disambiguates multiple instances on one host.
Contributor
⏱️ Full-loop Latency Benchmark (commit
|
| Phase | mean | p50 | p99 | max |
|---|---|---|---|---|
| 1. Collect indication data | 0 | 0 | 0 | 1 |
| 2. Create & encode indication | 0 | 0 | 1 | 8 |
| 3. Deliver indication (RAN -> dApp) | 94 | 90 | 171 | 725 |
| 4. Decode indication | 0 | 0 | 1 | 42 |
| 5. Process data | 0 | 0 | 0 | 0 |
| 6. Create & encode control | 0 | 0 | 0 | 9 |
| 7. Deliver control (dApp -> RAN) | 111 | 113 | 180 | 997 |
| 8. Decode & handle control | 0 | 0 | 1 | 17 |
| Total round-trip | 207 | 195 | 331 | 1522 |
Benchmarked on
ubuntu-latest, Release build, ZMQ + IPC, ASN.1 APER.
Contributor
🔀 E2E Topologies — multi-dApp / multi-RAN (commit
|
Contributor
🔄 E2E dApp Integration Results (commit
|
LIBE3_ENABLE_ASN1 and LIBE3_ENABLE_JSON are independent compile-time inclusion flags; both can be ON simultaneously. The active encoding is selected at runtime via e3_config_t.encoding. Fix line 123 which incorrectly described JSON as mutually exclusive with ASN.1.
…cture Add --link, --transport, --encoding CLI flags to bench_full_loop_latency so the paper's run_baseline.sh can sweep the full (link x transport x encoding) parameter matrix without upstream changes. Transport-aware endpoint setup: IPC uses a private tmpdir; TCP/SCTP uses default localhost ports (both sides run in the same process). Temporary IPC socket files are cleaned up after the run. Update README: redesign architecture section with a dual-role deployment topology diagram showing both RAN and dApp sides and the E3AP link between them. Fix API-reference description from 'for RAN vendors' to role-neutral. Remove references to private repository names. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two logging improvements, motivated by a real failure: a root gNB could not open
/tmp/e3_agent.logand the logger gave no reason. Root cause wasfs.protected_regular=2— in sticky world-writable/tmp, anO_CREATopen of a regular file is denied (even for root) unless the file is owned by the opener or by/tmp's owner. The log had been left owned by a prior non-sudorun, so the root gNB'sfopen(..., "a")gotEACCES.Changes
add better error logging— the logger now reportsstrerror(errno)+errnoon a failed open, instead of a bare "Failed to open log file".feat: make log file path configurable with uid-namespaced defaultE3Config::log_path(andlog_pathto the Ce3_config_t) so callers can redirect the shared log file explicitly. Empty /NULL= auto./tmp/e3_<role>[_<sanitized-id>]_<euid>.log. The trailing effective uid keeps the file owned by whoever opens it, so thefs.protected_regularwedge cannot recur regardless of running as root or as a user. The<id>(ran_identifierfor RAN,dapp_namefor DAPP, sanitized to[A-Za-z0-9._-], omitted when empty) disambiguates multiple instances on one host.Examples
ran_identifier="DU-1"→/tmp/e3_agent_DU-1_0.log/tmp/e3_dapp_libe3-dapp_1000.logNotes / follow-ups
log_pathjust get the new auto path instead of the fixed/tmp/e3_agent.log//tmp/e3_dapp.log.liblibe3).log_pathfrom the gNB conf and pass it through toE3Config.