Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Node.js STATUS_STACK_BUFFER_OVERRUN crash #302

Closed
aaronadamsCA opened this issue Oct 6, 2021 · 5 comments
Closed

Node.js STATUS_STACK_BUFFER_OVERRUN crash #302

aaronadamsCA opened this issue Oct 6, 2021 · 5 comments

Comments

@aaronadamsCA
Copy link

aaronadamsCA commented Oct 6, 2021

This is more of an FYI regarding an upstream bug, but it appears to be causing server-side crashes for us right now, so I wanted to be sure you and other potentially affected users know about it.

Specific error message: node exited with code -1073740791 - this apparently means STATUS_STACK_BUFFER_OVERRUN.

Apparently Node.js 16 is unaffected, but Azure Functions does not support it: https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-node?tabs=v2#node-version

For us, then, the only remaining workaround on the server side would be to remove analytics-node.

Given we don't want to do that, we plan to look at client-side workarounds that involve an auto-retry on failed requests. But I wanted to get you looped in as a stakeholder here at least, since it's ultimately our installation of your package that seems to be causing this.

If it's possible to use something other than HTTP Basic auth, that could apparently be another effective workaround here.

Let me know if I've got any of this wrong or if you have any ideas, thanks.

@felipe-najson-ntf
Copy link
Contributor

Good morning @aaronadamsCA, thank you for your contribution to the library.
I have been testing this problem in Node.js 14 (without Azure Functions) and everything seems to be working correctly there. Maybe it is some integration problem with Azure Functions?

Since it is a specific issue for certain use cases we will be evaluating the impact of making these changes in the authorization of axios, but for now in almost all use cases this works correctly and for now we will keep it that way.
We also save it in the backlog to do it in the future, but at the moment it is not a priority.

Regards, Segment team

@aaronadamsCA
Copy link
Author

To be clear, this crash has nothing to do with Azure Functions, you can see that from the Axios issues I linked. As long as that issue remains in Axios, Segment is going to intermittently crash Node.js 14.

But we were able to work around the issue with a client-side retry mechanism, and then resolve it permanently by upgrading to Node.js 16 as soon as Azure Functions added preview support. At that point the crashes stopped.

And we're moving away from Node on our backend anyway, so I don't need anything else for us here.

Thanks.

@nd4p90x
Copy link
Collaborator

nd4p90x commented Feb 9, 2022

Feel free to re-open if necessary. Thank you.

@nd4p90x nd4p90x closed this as completed Feb 9, 2022
@FlipABit
Copy link

FlipABit commented Jun 3, 2022

For the record, we’re still seeing this in our Azure Functions running on Node 16 (which is now supported)

@aaronadamsCA
Copy link
Author

@FlipABit If you are experiencing STATUS_STACK_BUFFER_OVERRUN errors with Node.js v16, that's almost certainly a different bug, so I'd suggest you file a new issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants