dotnet / dotnet/SqlClient

Some sort of infinite loop in SqlDataReader.ReadAsync() ?

Open
#1,058 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
989
Forks
340
Avg merge
4d 18h
Merged PRs (30d)
69

Description

A customer reported that reading a single row from the database caused the process to consume 5 GB of memory and crash.

1. The row beeing read has very few columns
2. One of the columns is an xml-column
3. The problem only occurs when the XML-column has large contents (the customer can reproduce with 7MB xml)
4. Apparently Read() works fine, the problem only occurs with ReadAsync()

Attaching screenshot made by customer. I watched this over teams, and this is not the production error, but reproducing using a console app. The call hangs, and memory keeps building.

![ReadAsync-Issue](https://user-images.githubusercontent.com/62177308/116881106-259fe200-ac23-11eb-923e-be39a7098638.jpg)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.