database/sql: possible deadlock on Rows.awaitDone()/Rows.Err()/Rows.Close() after RawBytes change #64498
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.21.4 linux/arm64
What operating system and processor architecture are you using (
go env
)?What did you do?
Note: whether or not this is legitimate bug or a usage error depends on the answer to the question: "after this change #60304 (comment), is it an error to call
Rows.Err()
after a context cancellation but before callingRows.Close()
? " Thanks in advance for taking a look and I apologize if I've made any mistkaes.Note: a full docker-compose setup for the below code and additional required components is available at https://github.com/martonw/go-sql-deadlock.
What did you expect to see?
No deadlocks (assuming this pattern
is legitimate - and I'll add here that this pattern is used by the gorm package - and so potentially affects a wide audience - and is not as hard to hit upon as it might seem at first glance).
What did you see instead?
The code above will sometimes (but not always) hang/deadlock.
The text was updated successfully, but these errors were encountered: