Azure/azure-sdk-for-js

memory leak using Azure JS SDK 1.1.0 abort-controller()

vadimpepp opened this issue · 6 comments

We see memory leak in our PODs using Javascript SDK 1.1.0
Package: '@azure/abort-controller': '1.1.0'
We tried a latest version too but the memory leak reproduced.

We've got a memory snapshot with many strings, almost all of them are linked to AbortController()

image

We found this related: #22899

@vadimpepp thanks for reporting this issue! Can you please share more details on how you are using our libraries? A simplified repro project would be great.

xirzec commented

@vadimpepp thanks for reporting this issue! Can you please share more details on how you are using our libraries? A simplified repro project would be great.

Yes, I'd love to understand which SDKs (and versions) you are depending on, presuming you are not directly using the abort-controller package?

Hi @vadimpepp. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Hi,
While the problematic SDK seems to be abort-controller (1.1.0) we are not using it directly in this service/POD.
We also tried to upgrade all the SDKs to latest versions , and still we got the same memory leaks with abort-controller

"@azure/arm-compute": "15.0.0",
"@azure/identity": "3.0.0",
"@azure/msal-node": "1.14.2",
"@azure/arm-network": "29.0.0",
"@azure/arm-resources": "5.1.0",
"@azure/arm-locks": "2.0.0",
"@azure/arm-authorization": "8.4.1",
"@azure/storage-blob": "12.7.0",
"@azure/abort-controller": "1.1.0",

Thanks, @vadimpepp.
Could you share a minimal repro of your code so that we can reproduce your issue on our end?

Our use is not something special, here is an example:
let iterable = this._networkClient.networkInterfaces.list(resourceGroupName);
for await (const element of iterable) {
  res.push(element);
}

We also use the following:

_networkClient.publicIPAddresses.list
_networkClient.publicIPAddresses.get
_computeClient.virtualMachines.list + listNext
_computeClient.virtualMachines.listAll + listAllNext
_computeClient.disks.listByResourceGroup + listByResourceGroupNext

_authorizationClient.roleAssigments.deleteById