fix(ipc)!: gracefully handle SHM errors instead of unwrapping - #2408
fix(ipc)!: gracefully handle SHM errors instead of unwrapping#2408bwoebi wants to merge 3 commits into
Conversation
Clippy Allow Annotation ReportTracked Clippy
By file and crateBy file
By crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. Panic-inducing macros in particular should be avoided. In the future, this report may become a PR-blocking quality gate. |
📚 Documentation Check Results📦
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 17bac25 | Docs | View more details | Give us feedback! |
🔒 Cargo Deny Results📦
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bb94b4645
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
BenchmarksComparisonBenchmark execution time: 2026-09-04 14:07:46 Comparing candidate commit 17bac25 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2 metrics, 0 unstable metrics.
|
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz | 17bac25 | 1788530467 | bob/shm-error |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| write only interface | execution_time | 2.085µs | 2.097µs ± 0.003µs | 2.097µs ± 0.001µs | 2.098µs | 2.102µs | 2.105µs | 2.108µs | 0.55% | -0.561 | 3.307 | 0.16% | 0.000µs | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| write only interface | execution_time | [2.096µs; 2.097µs] or [-0.022%; +0.022%] | None | None | None |
Group 2
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz | 17bac25 | 1788530467 | bob/shm-error |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| two way interface | execution_time | 21.200µs | 21.840µs ± 0.318µs | 21.833µs ± 0.175µs | 21.982µs | 22.367µs | 22.736µs | 23.622µs | 8.20% | 1.326 | 5.086 | 1.45% | 0.023µs | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| two way interface | execution_time | [21.796µs; 21.885µs] or [-0.202%; +0.202%] | None | None | None |
Baseline
Baseline benchmark details
Group 1
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz | 48e990d | 1788519182 | main |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| write only interface | execution_time | 2.082µs | 2.094µs ± 0.006µs | 2.093µs ± 0.003µs | 2.096µs | 2.100µs | 2.114µs | 2.133µs | 1.91% | 2.472 | 13.232 | 0.30% | 0.000µs | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| write only interface | execution_time | [2.093µs; 2.094µs] or [-0.041%; +0.041%] | None | None | None |
Group 2
| cpu_model | git_commit_sha | git_commit_date | git_branch |
|---|---|---|---|
| Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz | 48e990d | 1788519182 | main |
| scenario | metric | min | mean ± sd | median ± mad | p75 | p95 | p99 | max | peak_to_median_ratio | skewness | kurtosis | cv | sem | runs | sample_size |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| two way interface | execution_time | 21.378µs | 21.882µs ± 0.331µs | 21.815µs ± 0.162µs | 22.018µs | 22.515µs | 22.798µs | 23.642µs | 8.37% | 1.858 | 5.513 | 1.51% | 0.023µs | 1 | 200 |
| scenario | metric | 95% CI mean | Shapiro-Wilk pvalue | Ljung-Box pvalue (lag=1) | Dip test pvalue |
|---|---|---|---|---|---|
| two way interface | execution_time | [21.836µs; 21.928µs] or [-0.209%; +0.209%] | None | None | None |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
- Restore fmt on telemetry.rs and one_way_shared_memory.rs warn! calls - Handle the now-fallible OneWayShmWriter::write in ddog_agent_remote_config_write instead of discarding the Result - Restore the previous local mapping size on macOS when publishing the new size fails, so a subsequent write retries instead of silently assuming success - Retry allocating the live-debugging rate limiter slot on later updates of an existing config file, not just on first store - Do not advance the agent-info state hash until the new payload is actually published to shared memory, so a failed write is retried instead of being silently skipped forever
d4e91b4 to
17bac25
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
It will be processed automatically as soon as GitHub reports it as mergeable. View in MergeQueue UI.
devflow unqueued this merge request: It did not become mergeable within the expected time |
This prevents errors especially around ENOSPC on customers environments from stopping the sidecar alltogether.
BREAKING CHANGE:
OneWayShmWriter::write,MappedMem::ensure_space,ShmLimiterMemory::alloc, andShmLimiterMemory::alloc_with_granularityinlibdd-ipcnow returnio::Resultinstead of panicking on failure.