SqliteConnectionFactory.cs is not thread-safe #26612
Labels
area-adonet-sqlite
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
Servicing-approved
type-bug
Milestone
Reads on the
Dictionary
are not locked with the write operations, which is not supported.Suggestion is to use a
ConcurrentDictionary
and remove some of the locks, or use aReaderWriterLockSlim
.https://github.com/dotnet/efcore/blob/main/src/Microsoft.Data.Sqlite.Core/SqliteConnectionFactory.cs#L53
c.f. Dictionary source that is can throw an exception if the collection was changed while reads occur.
https://source.dot.net/#System.Private.CoreLib/Dictionary.cs,398
The text was updated successfully, but these errors were encountered: