-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[BUG] PerCallTimeoutCall causing OOM #42871
Copy link
Copy link
Closed
Labels
Azure.Coreazure-coreazure-coreClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.Workflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Metadata
Metadata
Assignees
Labels
Azure.Coreazure-coreazure-coreClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.Workflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Type
Fields
No fields configured for issues without a type.
Projects
StatusShow more project fields
Done
Describe the bug
The PR 40017 introduced the class PerCallTimeoutCall.
This class holds a static Timer with strong references to every call it processes.
When uploading a blob in blocks, each block is a call that gets added to the Timer, not released quickly enough and causing the Timer to hold all calls in memory without the garbage collector being able to free them. This causes the system to deplete its memory.
See BlobClient
Exception or Stack Trace

To Reproduce
Set up any project using the Azure Java SDK and upload binaries at moderate pace using the method BlobClient.uploadWithResponse
Code Snippet
See PerCallTimeoutCall
Expected behavior
The system shouldn't run out of memory.
Screenshots

Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError,NoSuchMethodErroror similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:mvn dependency:tree -Dverbose)Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report