Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Build facilitator with debuginfo #1279

Closed
tgeoghegan opened this issue Jan 12, 2022 · 1 comment
Closed

Build facilitator with debuginfo #1279

tgeoghegan opened this issue Jan 12, 2022 · 1 comment

Comments

@tgeoghegan
Copy link
Contributor

Currently, our release builds of facilitator are not stripped, which means that we can get symbolicated backtraces in gdb, but we don't get line numbers because we don't enable debug. The downside of enabling debug is slower build times (I think) and very big binaries: I gave it a shot locally and saw that the release binary with debug info is over 300 MB, versus 28 MB without. However getting line numbers when debugging cores is really nice. We should read up on Rust best practices and think about how to do better.

@tgeoghegan
Copy link
Contributor Author

The easiest thing would be to add debug = true to the release profile. The upside is that it's easy; the downside is 10x bigger containers.

We could also be clever and build with debug, then copy the debuginfo out of the resulting binary, strip the binary and finally store the debug info somewhere so that we can later debug stripped binaries. The upside is that it doesn't bloat containers; the downside is that we have to design, build and maintain the infra for storing symbols (though this could be as simple as a GCS bucket). Maybe there's an existing turnkey solution for this in the Rust community.

Here's a variety of interesting resources about Rust debugging I found while researching this:

https://bitshifter.github.io/rr+rust/index.html#1
https://doc.rust-lang.org/cargo/reference/profiles.html
https://doc.rust-lang.org/rustc/codegen-options/index.html#split-debuginfo
https://doc.rust-lang.org/rustc/codegen-options/index.html#debuginfo
https://rustc-dev-guide.rust-lang.org/debugging-support-in-rustc.html
rust-lang/rust#34651

@divergentdave divergentdave closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants