[CSHARP-4299] Mongodb Csharp Driver 2.13 -Service Monitor memory leak -holding up the execution context leading to huge amount of System.security.claim objects in memory even after GC collection -They finally lands up to gen 2 . Created: 16/Aug/22  Updated: 27/Oct/23  Resolved: 08/Sep/22

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: bhagwan das Gupta Assignee: James Kovacs
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File mongo-1.png     PNG File mongodb-1.png    
Issue Links:
Duplicate
duplicates CSHARP-3906 Switch ConnectionPool background task... Closed
duplicates CSHARP-3761 Reimplement SDAM to use a dedicated t... Closed
duplicates CSHARP-3813 Suppress execution context flow when ... Closed

 Description   

Summary

Driver ver 2.13 -DotMemory profiler shows memory leak -large number of system.security.claim object .

How to Reproduce

Servicemonitor holds up to the executionContext and it internally refers the security claims object .After the garbage collection , the claims object lives in to the memory heap -gen2 .

Application does not create mongo client in signleton mode , instead per request mode.

Additional Background

Attached 



 Comments   
Comment by PM Bot [ 08/Sep/22 ]

There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to comment on this if you're able to provide more information.

Comment by Bhagwan Das Gupta [ 25/Aug/22 ]

Ok thanks

Comment by James Kovacs [ 25/Aug/22 ]

Hi, engr.bhagwandas@gmail.com,

In 2.15.0, we changed our SDAM and background workers to use dedicated threads rather than tasks. This was to resolve CSHARP-3813, which appears to be the same issue. Please upgrade to 2.15.0 or newer driver (2.17.1 is latest as I write this) to verify that this issue is fixed.

Sincerely,
James

Comment by Boris Dogadov [ 16/Aug/22 ]

Thanks engr.bhagwandas@gmail.com for your report.
Please follow this ticket for further updates.

Generated at Wed Feb 07 21:47:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.