Skip to content

chore(build): cut debug info to fix link OOM#33

Closed
LKSNDRTMLKV wants to merge 1 commit into
mainfrom
chore/link-oom-on-main
Closed

chore(build): cut debug info to fix link OOM#33
LKSNDRTMLKV wants to merge 1 commit into
mainfrom
chore/link-oom-on-main

Conversation

@LKSNDRTMLKV

Copy link
Copy Markdown
Member

Cherry-picks a9fddde from feat/continuity-snapshots onto main.

The fix is entirely general — it sets profile.dev debug = "line-tables-only"
for the workspace — but it currently exists only on a feature branch. main
therefore cannot link its binaries on Windows, and the failure does not look
like a build-configuration problem.

Before

On main, cargo build --workspace dies linking the binaries:

LINK : fatal error LNK1102: out of memory
error: could not compile `dpp-resolver` (bin "dpp-resolver")

process didn't exit successfully: rustc ... dpp_node
(exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
error: could not compile `dpp-node` (bin "dpp-node")
error: could not compile `dpp-vault` (bin "dpp-vault")

Both signatures read as code failures. Neither is one.

After

Same command, same machine, no environment overrides:

   Compiling dpp-resolver v0.7.0
   Compiling dpp-vault v0.7.0
   Compiling dpp-node v0.7.0
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 25s

All six binaries link: dpp-node, dpp-vault, dpp-resolver, dpp-identity,
dpp-integrator, odal.

Why it belongs on main separately

It is a build-infrastructure fix with nothing to do with continuity snapshots.
Leaving it stranded means anyone building main on Windows hits a failure that
looks like broken code, and the natural response — debugging the crate that
"failed" — leads nowhere. It should land independently of the feature work that
happened to discover it.

Duplicate content with feat/continuity-snapshots is expected; git will resolve
the overlap when that branch merges.

Linking dpp-node integration binaries with full DWARF exhausts memory on a 16 GB machine, failing the last CI stage as LNK1102 or a bare rustc abort that both read as code failures.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adjusts the Cargo development profile to use line-tables-only for debug information. This is a targeted fix to resolve LNK1102 out of memory errors and stack buffer overruns encountered on Windows environments with limited RAM during the linking phase of the workspace binaries. Codacy analysis indicates the PR is up to standards with no new issues or complexity increases. The primary trade-off is the loss of variable-level DWARF information in the dev profile, though basic backtraces (file and line numbers) are expected to remain intact.

Test suggestions

  • Verify workspace binaries (dpp-node, dpp-vault, etc.) link successfully on a 16 GB Windows environment without OOM errors.
  • Verify that backtraces produced from a dev build panic still contain file and line number information.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify workspace binaries (dpp-node, dpp-vault, etc.) link successfully on a 16 GB Windows environment without OOM errors.
2. Verify that backtraces produced from a dev build panic still contain file and line number information.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

@LKSNDRTMLKV

Copy link
Copy Markdown
Member Author

Duplicate of #26, which has carried the same one-line profile.dev debug = "line-tables-only" change since 18 July. I opened this without checking for an existing PR — #26 is the original and should be the one merged. The before/after verification I posted here still stands for that change: cargo build --workspace with no environment override links all six binaries in ~85s, where main without it dies with LNK1102 / STATUS_STACK_BUFFER_OVERRUN.

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.

1 participant