[CSHARP-3840] Unresponsive/deadlocked cluster.Dispose() Created: 08/Sep/21  Updated: 22/Jun/22

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

Type: Bug Priority: Unknown
Reporter: Boris Dogadov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CSHARP-2490 Reimplement SDAM to follow the spec m... Backlog

 Description   

For example:
https://evergreen.mongodb.com/task/dot_net_driver_secure_tests_linux__version~5.0_os~ubuntu_1804_topology~replicaset_auth~auth_ssl~ssl_test_netstandard21_patch_b961b81cb7dc1ffe7262c55a227afad0aab5a994_6138ff3a9ccd4e2b269ec32e_21_09_08_18_22_08
https://evergreen.mongodb.com/task/dot_net_driver_secure_tests_macOS__version~5.0_os~macos_1014_topology~standalone_auth~auth_ssl~ssl_test_netstandard21_patch_b961b81cb7dc1ffe7262c55a227afad0aab5a994_6139469732f4171b6671f7b2_21_09_08_23_26_33

Leads to timeouts due to hanging DisposableMongoClient.Dispose(). Was not able to reproduce locally.
From brief investigation two flavors where observed:

  • Execution blocked at monitorCancellationTokenSource.Cancel(); in ServerMonitor.Dispose()
  • Execution blocked at _cancellationTokenSource.Cancel(); in RoundTripTimeMonitor.Dispose()

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