Home > OS >  Can I inspect coredump on Cloud Run?
Can I inspect coredump on Cloud Run?

Time:08-28

I'm thinking about migrating some of my services from GCE VMs to Cloud Run. And I want to see how it would be like when I have to troubleshoot, especially in (hopefully rare) case that my C/C program segfaults.

When segfault occurs, I usually detach the VM from production and take a look at coredump, using sudo coredumpctl gdb.

My question is: can I do similar on Cloud Run? Can I collect coredump files and get them from somewhere like Cloud Storage?

CodePudding user response:

In cloud run you can use Error Reporting and Cloud Logging to view an error

Error Reporting aggregates and displays errors produced in your running Cloud Run services. Cloud Run is automatically integrated with Error Reporting with no setup or configuration required.

The following errors are automatically visible:

  1. All exceptions that include a stack trace in Error Reporting-supported languages, and that are sent to stdout, stderr, or to other logs.

  2. "Memory limit exceeded" and "No instances available" service errors.

You can refer this document for viewing errors in cloud run

CodePudding user response:

Can I collect coredump files and get them from somewhere like Cloud Storage?

No. Cloud Run runs container-hosted applications. If your application throws an exception, your container will be killed.

Capturing a core dump for an application in a container requires the host operating system to be configured to enable that feature. Cloud Run does not provide access to the host platform.

Note: Cloud Run runs containers via Knative.

  • Related