Search code examples
amazon-web-servicesdockercontainersamazon-ecsaws-fargate

ECS Fargate fails randomly without logs, with container ExitCode 139


I am trying to deploy ETL pipeline on AWS, Pipeline architecture consist of step function to manage the whole pipeline, it consists of 10 parallel (independent) Fargate (pipeline) invoked using map in step function and a Lambda (Error Notifier),

I have used python 3.7 as base image to build my docker image, pipeline is successfully deployed, but it sometimes randomly fails with container exit code 139.

After further research, I found out that it is sigsegv error (same as error code 11 of linux kernel), related invalid memory access

I am not sure how to rectify this error


Solution

  • [UPDATE]

    Recently found out that problem was, image was built x86_84 mac machine, and was deployed on x86_84 ubuntu system, because of that we got SIGTERM error (error code:7 for linux, and error code: 139 for docker), just redeployed the images AWS codebuild, and everything worked perfectly fine from then on.