Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split debuginfo out in release builds and upload to polarsignals #2403

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

jackkleeman
Copy link
Contributor

@jackkleeman jackkleeman commented Dec 10, 2024

We will benefit both when uploading heaps/profiles to polar signals, but we also have our own debuginfod endpoint so tools like perf will be able to magically find the debug symbols for a given binary

@jackkleeman jackkleeman changed the title Split debuginfo Split debuginfo out in release builds and upload to polarsignals Dec 10, 2024
Copy link

github-actions bot commented Dec 10, 2024

Test Results

  7 files  ±0    7 suites  ±0   4m 23s ⏱️ +4s
 47 tests ±0   46 ✅ ±0  1 💤 ±0  0 ❌ ±0 
182 runs  ±0  179 ✅ ±0  3 💤 ±0  0 ❌ ±0 

Results for commit 24202db. ± Comparison against base commit a4bdf37.

♻️ This comment has been updated with latest results.

Comment on lines +52 to +53
RUN $(just --set arch $TARGETARCH --evaluate _arch)-linux-gnu-objcopy --only-keep-debug target/restate-server target/restate-server.debug
RUN $(just --set arch $TARGETARCH --evaluate _arch)-linux-gnu-objcopy --strip-debug target/restate-server
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should make stripping optional, or keep an option to copy debug symbols into the final container?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

imo there is no benefit to uploading the debug symbols if we aren't going to strip them. otherwise you can just run your tool against the binary directly? hence i treated the request to upload as a request to strip. nb we have a separate mechanism in the ci to keep debug symbols but not upload

FROM builder AS upload-true
RUN $(just --set arch $TARGETARCH --evaluate _arch)-linux-gnu-objcopy --only-keep-debug target/restate-server target/restate-server.debug
RUN $(just --set arch $TARGETARCH --evaluate _arch)-linux-gnu-objcopy --strip-debug target/restate-server
RUN --mount=type=secret,id=parca parca-debuginfo upload --store-address=grpc.polarsignals.com:443 --bearer-token-file=/run/secrets/parca target/restate-server.debug
Copy link
Contributor

Choose a reason for hiding this comment

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

Does that mean that we'll only keep a single/latest debuginfo file there or is there a way to attach this to the sha/version somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its indexed against the elf build id (which is also how debuginfod works)

@jackkleeman jackkleeman merged commit 5dcd922 into main Dec 11, 2024
13 checks passed
@jackkleeman jackkleeman deleted the split-debuginfo branch December 11, 2024 12:07
jackkleeman added a commit that referenced this pull request Dec 11, 2024
* Update Dockerfile to support creating and uploading debuginfos

* Use targetarch objcopy

* Upload to parca on release builds

* Reorder dockerfile
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.

2 participants