Skip to content

Function crash details not reported #323

Open
@DCVortexxx

Description

@DCVortexxx

Expected behavior

When a function crashes for an unexpected reason (fatalError, memory corruption...), the stack trace and details of the error are not stored/logged/reported to CloudWatch.

I'm fairly new to server-side Swift and AWS in general, so if I'm missing something, feel free to point it out. 🙏

Actual behavior

I would like to have some more informations about the crash, in order to debug and fix crashes in my lambda.

The only details I can see in CloudWatch when my function crashes are:

RequestId: xyz Error: Runtime exited with error: signal: illegal instruction
Runtime.ExitError

Steps to reproduce

  1. Create a new lambda function
  2. Make your function crash on purpose (using fatalError for instance)
  3. Deploy the function
  4. Execute it

If possible, minimal yet complete reproducer code (or URL to code)

You can simply use the ErrorHandling example from this repository.

Send a .fatal request, causing a crash.

What version of this project (swift-aws-lambda-runtime) are you using?

1.0.0-alpha

Swift version

The lambda is archived in a docker container using the image swift:5.9.0-amazonlinux2, on the ubuntu-latest runner (x86_64 architecture).

Amazon Linux 2 docker image version

swift:5.9.0-amazonlinux2

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementImprovements to existing feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions