Bug #111759 | 8.0.33 Removes Important Locks | ||
---|---|---|---|
Submitted: | 14 Jul 2023 14:11 | Modified: | 23 Oct 2023 12:04 |
Reporter: | Stuart Lang (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 8.0.33 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Contribution |
[14 Jul 2023 14:11]
Stuart Lang
[17 Jul 2023 23:29]
Bradley Grainger
This problem was initially noted in bug #110717; the suggested fix was "Change GetPoolAsync to use a shared static SemaphoreSlim object (and wait on that), instead of creating a local variable." However, the issue of the fundamentally incorrect use of SemaphoreSlim (in multiple locations) was not explicitly called out in that bug report.
[18 Jul 2023 13:29]
Stuart Lang
I've pushed a PR, I don't necessarily think it's the right solution, but should highlight the various areas that need to be looked at: https://github.com/mysql/mysql-connector-net/pull/56
[27 Jul 2023 18:17]
OCA Admin
Contribution submitted via Github - Try to re-add some synchronization (*) Contribution by Stuart Lang (Github slang25, mysql-connector-net/pull/56#issuecomment-1653718120): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: git_patch_1439232418.txt (text/plain), 51.55 KiB.
[12 Aug 2023 9:33]
Life Cool
This bug is also in version 8.1.0. We can reproduce by create connection in multiple threads. Will the PR release recentlly? Thanks.
[5 Oct 2023 7:44]
Julien LEFEVRE
Hi :) Eventually simply replace the Dictionary by ConcurrentDictionary: private static readonly ConcurrentDictionary<string, SslProtocols> tlsConnectionRef = new(); private static readonly ConcurrentDictionary<string, int> tlsRetry = new(); and fix the "Remove" calls by "TryRemove" Kind regards
[12 Oct 2023 15:16]
Life Cool
Will this issue fix in https://bugs.mysql.com/bug.php?id=110717? Thanks
[23 Oct 2023 12:04]
MySQL Verification Team
Hello Stuart Lang, Thank you for the bug report and contribution. Regards, Ashwini Patil