Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault on using Node:8-alpine docker image #957

Closed
vivinjoy opened this issue Dec 18, 2018 · 1 comment
Closed

Segmentation Fault on using Node:8-alpine docker image #957

vivinjoy opened this issue Dec 18, 2018 · 1 comment

Comments

@vivinjoy
Copy link

Hi
In our application, we are flushing the logs using the node webworker threads(https://github.com/audreyt/node-webworker-threads). We use this because we run our logs over some regexes to mask any personal information. We didnt want these regex operations to affect the main Node js thread, so we use a parallel thread using the webworker threads.

Recently we moved to Node 8: Alpine version and we are getting Segmentation Fault when we try to log huge JSON(>500 kB). We are not able to get the stack trace for these crashes. We tried using the Node-Report and segfault-handler packages but in vain. We suspect the limited stack size associated with the Alpine image or the incompatability with the Node webworker-thread package.

Have you guys faced this issue before? Can you help us in getting around this segmentation fault crashes.

@vivinjoy
Copy link
Author

vivinjoy commented Apr 9, 2019

Seems the issue was due to the following existing Node js issue for version >= 8.5. nodejs/node#16658
It was happening for me when we log huge json because the huge json strings were triggering a full GC. So when my web worker thread(separate isolate) was triggering a full GC, the node js was crashing. I fixed it by downgrading my Node js version to 8.4.
I can hopefully upgrade to Node js v11.0 and start using the in-built support for Node js worker threads.

@vivinjoy vivinjoy closed this as completed Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant