Description
Description
Using Npgsql with EfCore locks up application, with pretty much all active threads held by System.Security.Cryptography.Rfc2898DeriveBytes.Pbkdf2
, with the remaining active threads working on logging timeouts.
Reproduction Steps
This is something that is intermittent, and I'm unsure of the reproduction steps precisely, but i'll have a go:
- Build dotnet application with EfCore
DbContextPool
, using Postgres Data Provider. - Run application anywhere from 1 to 10 hours witnessing 3% CPU usage on average and around 1,400 queries p/second
- Experience application lock up, with 6400% CPU usage (Dual CPU server with 64 cores in total).
Sorry i cannot be more specific on this.
Expected behavior
Application to perform whatever task is in Rfc2898DeriveBytes.Pbkdf2
at a reasonable time.
Actual behavior
Rfc2898DeriveBytes.Pbkdf2
either does not return or returns after it has read the newspaper and had its coffee.
Regression?
We have had this issue for a long time (couple of months) and only just now cracking down the source of it to here.
Known Workarounds
None Known. Currently moved to a different authentication scheme which does not utilize Rfc2898DeriveBytes.Pbkdf2
at all.
Configuration
Docker configuration: Swarm
Runtime Docker image: mcr.microsoft.com/dotnet/runtime:9.0-alpine
Build Docker image: mcr.microsoft.com/dotnet/sdk:9.0-alpine
Docker Image additional packages (apk add): openssl icu-libs icu-data-full tzdata fontconfig ttf-dejavu mtr
Architecture: linux-musl-x64
Other information
Original issue created in Npgsql repo npgsql/npgsql#6029