-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Node exits with code 0 when uploading a zero byte file to AWS S3 #46182
Comments
Do you have a test case that doesn't depend on third-party dependencies? I read through your PoC and the linked issue but I'm not convinced yet it's a node issue (and I don't plan on going over AWS's SDK unless they pay me to.) |
@bnoordhuis Thanks, I understand and sympathize. In the meanwhile I will try to see if I can create a POC without AWS SDK. |
I can have a look, in the meantime if you could add a repro without aws-sdk and in js would be great 😁 |
In my first attempt debugging this, I found out:
Lines 516 to 524 in 91ca2d4
might be a handler from the |
Hi, I think it's worth mentioning that #22088 might be related, and has examples of reproducing without the aws dependency. Thanks, |
If your issue is #22088 then that's something you need to fix in your SDK. It's not a node bug. |
I think this issue is related to #22088, the execution stops with exit code 0 and
even if it's weird, as stated by @bnoordhuis, it might not be a bug, I think the issue has to be searched inside |
As there is no reason to believe this is a bug inside node itself, I'm going to go ahead and close out the issue. |
I'm still investigating on this with @ShogunPanda. |
Could anyone please suggest a workaround? It's been more than a year and I see no fix. It causes Electron to crash and we can't ship a product like that. aws-sdk v3 is useless for us due to this error, and v2 uses old version of libs that we don't want to risk security. It is nice that at least we have a workaround. |
PR are welcome if you want to look into this. |
As suspected this is a problem related to |
Thanks for the update, @marco-ippolito. Closing again then. |
Sorry couldn't reproduce outside of AWS SDK v3. It is fine on v2. I still think that Node.js should have a way to handle such issues and don't let 3rd party libs to cause a crash. I understand that it may not be trivial to do it. |
it is not a crash, it exits with code 0 as I stated here #46182 (comment), this is related to incorrect use of promises |
Version
v19.4.0
Platform
Darwin hasu.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64 x86_64
Subsystem
http
What steps will reproduce the bug?
POC with instructions https://github.com/bes/aws-sdk-js-v3-s3-exit-0
Previous discussion aws/aws-sdk-js-v3#4332
How often does it reproduce? Is there a required condition?
On my 16" 2019 MacBook Pro with 2,6 GHz 6-Core Intel Core i7 I am able to reproduce this issue with 100% reproducibility within a few seconds of starting the script.
What is the expected behavior?
The script should run forever, or until Ctrl+C is issued.
As long as the script is running, it prints
START
before a call to the AWS S3 SDK'ss3.send
method, andEND
immediately after.What do you see instead?
After a few seconds, meaning 1 to 30 http calls, node exits with exit code 0
As you can see, it prints
START
and then exits without printingDONE
.Additional information
No response
The text was updated successfully, but these errors were encountered: