-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Debug info seems to be lost when deployed to Lambda #49
Comments
This is likely related to building a You mentioned something worked in a build container. Was that the lambda-rust container or a different container? |
I think this is right. However my understanding was that you could workaround this by specifying something like this in your Cargo.toml: [profile.release]
debug = true
This is in the |
Post a link here for my own reference and testing |
Debug information is stripped explicitly in the build script in the docker container: While this makes sense to reduce the size of the final binary, it might make sense to put debug information in a companion file instead so that it can be used for debugging later, like so: objcopy --only-keep-debug "$file" "$file.debug"
objcopy --strip-debug --strip-unneeded "$file"
objcopy --add-gnu-debuglink="$file.debug" "$file" |
Also, it is a little strange that debug information is stripped even for debug builds. There, it should probably even be retained in the original file so that the builtin |
Thanks so much for spotting this, @jan-auer--I ran out of bandwidth on my end but this is pretty clearly the source of my issue. |
I'll try to publish an update soon but I've updated the underlying container image to add support for this. I just haven't wired it into the serverless plugin |
Fantastic! Looking forward to the update. |
Hi folks. It's been a while but I wanted to post and update on the latest release which now has experimental support for local builds which takes a slightly more hands off approach when it comes to stripping anything https://github.com/softprops/serverless-rust#-experimental-local-builds |
Hi there,
I've been back and forth with Sentry trying to figure out why debug information seems to be completely lost when in the deployed Lambda environment--very strangely, the same project compiled directly in the underlying Docker container built for release happily passes along its debug info. The trouble only starts when deployed.
Some interesting things about the project:
profile.release
overload in the root Cargo.toml.libc.6.so
is not included in the aforementioned uploaded debug files, but despite this things work in e.g. CircleCI, just again not in Lambda.I'm wondering if this could be partly to do with the fact that the Lambda executable is packaged and renamed to "bootstrap"? If there's any light you can shed on that piece of things and how it might affect something like this, I'd really appreciate it! :)
serverless version: ^1.51.0
rust-plugin version: ^0.3.6
The text was updated successfully, but these errors were encountered: