Random core dumps on AWS Lambda 10.x
See original GitHub issueHi,
I’m running node-libcurl on AWS Lambda Node.js 10.x and I’m getting random core dumps. So, one request completes completely normal once and then the next time it fails with a dump.
There errors come in two parts:
- Some illegal pointer exception.
llpropertylink-mainview\":free(): invalid pointer
or
free(): invalid pointer
- The default core dump message
Runtime exited with error: signal: aborted (core dumped)
Runtime.ExitError
I compile node_libcurl.node
using a Docker container called lambci/lambda:build-nodejs10.x
and just copy the resulting binary to the zip used to deploy to Lambda.
Using some debug statements, I can see that the end
or error
event are not emitted when there is a dump. The last thing in the logs is the curl.perform()
method being called.
The weird thing is, outside of these core dumps, it works perfectly for 90%-95% of all requests.
Issue Analytics
- State:
- Created 4 years ago
- Comments:24 (9 by maintainers)
Top Results From Across the Web
Reducing Java cold starts on AWS Lambda functions with ...
The following chart reflects invoking the sample application Lambda function 100 times per second for 10 minutes. This test is based on this ......
Read more >Solved - AWS Lambda, Segmentation Fault (Core Dumped)
I recently discovered that a couple lambda functions were not failing properly. These lambda functions were configured to send messages to a ...
Read more >aws lambda php runtime sporatically core dumps
To me, a core dump indicates a PHP run-time failure due any number of issues like a double free or memory out of...
Read more >Serverless Distributed Decision Forests with AWS Lambda
handler(): the function that will be called by AWS Lambda. In the handler, we're passing down a random seed. This seed will be...
Read more >Resolving Segmentation Fault (“Core dumped”) in Ubuntu - Blog
You may do backtracking or debugging to resolve it but the solution is to repair the broken packages and we can do it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tnolet I have taken a closer look into this issue today, and the main problem is that the prebuilt addon is not compatible with Amazon Linux. I had no time to investigate further why that happens. The solution is to rebuild the addon directly.
The good news is that I’ve made some adjustments to the build script that is used to create the prebuilt binaries so you can use it more easily. Here are the steps you need to take to build it yourself (those steps are based on the repository you posted above, https://github.com/JCMais/node-libcurl/issues/176#issuecomment-502446705):
./run.sh https
It worked here, I’ve run it 100 times and it succeeds on all of them.
This seems to be fixed when building a dedicated binary using the dev branch or commit 4a1bde612318d3374c19c56883965fe8d43e5e77