Skip to content

Iss152/release profile debug#153

Open
jmcauley wants to merge 2 commits intoblacksky-algorithms:mainfrom
jmcauley:iss152/release-profile-debug
Open

Iss152/release profile debug#153
jmcauley wants to merge 2 commits intoblacksky-algorithms:mainfrom
jmcauley:iss152/release-profile-debug

Conversation

@jmcauley
Copy link
Copy Markdown
Contributor

Summary

Fixes OOM (out-of-memory) failures when building rsky-pds in containerized environments
(Docker/Podman). Full debug symbols in [profile.release] caused the linker to be killed
by the OS during the rsky-pds link step due to peak memory pressure from combining
opt-level=3 and debuginfo=2 across ~50 transitive dependencies.

Also fixes a pre-existing bug in rsky-pds/Dockerfile where COPY source paths were
incorrect for the build context, causing the second build stage to always fail.

Related Issues

Closes #152

Changes

  • Feature implementation
  • Bug fix
  • Documentation update
  • Other (please specify):

Checklist

  • I have tested the changes (including writing unit tests).
    • Verified docker build . completes successfully from rsky-pds/ with 8 GB container
      memory after both fixes. Previously failed with SIGKILL (OOM) at the rsky-pds link
      step.
  • I confirm that my implementation aligns with the canonical Typescript implementation and/or atproto spec
    • N/A — build configuration change only, no protocol behavior affected.
  • I have updated relevant documentation.
    • N/A
  • I have formatted my code correctly
  • I have provided examples for how this code works or will be used
    • Developers needing symbolized builds for profiling (samply, perf, Instruments) can use:
      cargo build --profile profiling -p rsky-pds

jmcauley and others added 2 commits February 22, 2026 21:33
debug = 2 in [profile.release] causes OOM failures in containerized
builds (Docker/Podman) due to peak memory pressure at link time when
combining full optimization and full DWARF debug info across ~50
transitive dependencies.

Introduces a [profile.profiling] profile for developers who need
symbolized release builds (e.g. for use with samply, perf, Instruments).
Release builds used in CI and Docker are now lean by default.

Fixes blacksky-algorithms#152

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When running docker build from rsky-pds/, the build context is the
rsky-pds/ directory. The COPY instructions were using paths prefixed
with rsky-pds/ (e.g. COPY rsky-pds/src) which resolved incorrectly
against the build context and caused the build to fail at the source
overlay step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@afbase
Copy link
Copy Markdown
Collaborator

afbase commented Apr 12, 2026

@jmcauley

Would it be possible to revise this PR so that either all dockerfiles have conformity with copying dataand the CI will build the dockerfiles + a second PR for the optimization parameters?

@afbase afbase self-requested a review April 12, 2026 21:06
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.

DevOps: [profile.release] debug = 2 causes excessive memory usage and OOM failures in containerized builds

2 participants