question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debug info seems to be lost when deployed to Lambda

See original GitHub issue

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:

  1. We organize our functions via workspaces, so we’ve defined the profile.release overload in the root Cargo.toml.
  2. We only use Sentry in our library project crate and then use this crate in the other functions; this shouldn’t be an issue as evidenced by the fact this works in virtually any environment aside from Lambda itself.
  3. Frustratingly things work as expected locally and during CircleCI builds and even from the build container; just not Lambda itself.
  4. As per Sentry’s request we’ve tried uploading debug symbols manually, but this hasn’t really helped.
  5. Sentry complains that 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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
softpropscommented, Oct 4, 2019

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

1reaction
maxcountrymancommented, Sep 25, 2019

This is likely related to building a release binary. I think in those cases debug info gets stripped by default.

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

You mentioned something worked in a build container. Was that the lambda-rust container or a different container?

This is in the lambda-rust container. Interestingly enough that was with a release build. Again I think that by specifying the debug = true configuration for the release profile the binary should be including debug info.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot deployment issues in Lambda
When you upload a function's deployment package from an Amazon S3 bucket, the bucket must be in the same Region as the function....
Read more >
Debugger not working invalid (or missing) template file #1395
Describe the bug Lambda debug does not works, when press to "Start Debugging" button an error appear: Invalid (or missing) template file ......
Read more >
Can't get AWS Lambda function to log (text output) to ...
In my case when using lambda for DynamoDB events, where lambda was given all needed permissions for both cloudwatch and DynamoDB. It took...
Read more >
Troubleshoot Serverless Monitoring - Datadog Docs
Understand the basics · Use the Datadog Lambda Extension instead of the Forwarder · Ensure the configurations are up-to-date and expected · Collect...
Read more >
Monitoring and Debugging Python Apps on AWS Lambda
Like with any modern, commonly used language, the functionality behind the application is only as good as the infrastructure that it is deployed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found