-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Abort leak file descriptor #4021
Comments
Thank you for opening this issue! We are routing it to the appropriate team for follow up. |
/cc @XiaoningLiu |
Thanks for help debugging! What the Aborter.abort() does is to trigger aborter signal into under layer axios HTTP client, which should handle the aborted connection. (readableStreamBody is a readable stream for HTTP response body download stream, based on the connection) It's surprised to me there will be a fd leak. Also interesting whether what will happen when we wait for longer time to see the fd drops. Still needs investigation. |
Thank for looking into that. If I can do anything to help you, don't hesitate. |
Thanks! Aborter instance is passed to under layer That's my first thoughts, but didn't have time for confirmation yet. You can take a look if have time. |
Okay, I will check that when I got time ! |
Looks like the question has been addressed here. @BertholetDamien, thanks for reaching out. If you have further questions, please open another issue and we'll get right on it. |
Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment. |
The problem is not solved and I don't have personnal time to check that deeper. |
recently released 12.0.0-preview.3 or 10.5.0 deprecates axios and switches to node-fetch, worth a try. |
Nice to hear ! I will check (one of these day) if this update will fix the issue and report it here. |
Hi team, We try the "@azure/storage-blob": "^12.0.1" and the issue is still there. And my Workaround doesn't work anymore with these version so we had rollback to 10.4.1 with the work around. Can you tell me if you will be able to investigate ? Thanks a lot for your time |
Hi @BertholetDamien I'll try to take a look when I get time. Besides that, if possible, try to disable keep alive options and see if it works in latest version.
|
Thanks ! I will check this option when I will have time. Keep me posted if you look further. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. |
Maybe. I don't remember whether v10 dependency is still using axios or not. Either way there might be similar code. |
@jeremymeng yes, v10 was using axios. @ljian3377 You're seem right, theses related issues look to be the same problem. For now on, I can't update my sdk version because of that issue. So I'm still in the v10 version. |
@BertholetDamien we fixed the issue recently in latest versions of @azure/storage-blob v12 and @azure/core-http. Could you please give it a try? |
It's a really good new! I'm curious, can I have the related commit about that? I'll be very happy to test, but can you let me somes days? I will give you feedback as soon as I had one. |
@BertholetDamien @azure/core-http fix: #12038 |
Nice! Thank you very much for taking the time to fix this problem. |
Similar fix has been ported to Azure/ms-rest-js#425. It should fix memory leak issue caused by the abort event handlers for storage v10. |
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
I try the new version last week, and my kubernetes node has just get a lot of issues. So I rollback to the version 10 with my work around for the leak descriptor issue. Honestly, I don't have time right now to give you a minimal reproductible setup or investigate in any way. I plan to stay on the v 10 as long as I can and if I need to update one day, I will reopen an issue if the problem occur again with more information. Thanks a lot for your work team! |
@BertholetDamien I am sorry to hear that you hit issues with the new version. Hopefully you could find some time to provide us more details in the future. |
@BertholetDamien import { BlobClient } from "@azure/storage-blob";
import { AbortController } from "@azure/abort-controller";
async function main() {
const aborter = new AbortController();
const res = await blobClient.download(undefined, undefined, {
abortSignal: aborter.signal,
});
aborter.abort();
} See #11850 (comment) |
@ljian3377 Did you plan to deprecated old versions at some point? |
Yes. So we strongly encourage you to migrate to V12. |
@ljian3377 Thanks for the warning. I will plan that in the futur. |
Describe the bug
When we abort the connection of a download on a blockBlobURL, there is a leak of file descriptor because the readable stream body source should be destroy.
To Reproduce
Steps to reproduce the behavior:
Start a simple server.
Check the file descriptor count of your node process with something like :
lsof | grep socket | grep node | wc -l
Do a ab test on this serveur that will start a download and abort the connection
Check the file descriptor count after.
Some code to help :
Of course, the downloadBlockBlobResponse.readableStreamBody need to be consume.
My actual work around is too destroy the readable stream body source myself :
Expected behavior
The readable stream body source should be destroy if the connection is abort.
I hope this can help !
The text was updated successfully, but these errors were encountered: