Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: Panic in Rollback of a transaction after MySQL crash #11921

Closed
GuptaManan100 opened this issue Dec 9, 2022 · 0 comments · Fixed by #11920
Closed

Bug Report: Panic in Rollback of a transaction after MySQL crash #11921

GuptaManan100 opened this issue Dec 9, 2022 · 0 comments · Fixed by #11920

Comments

@GuptaManan100
Copy link
Member

Overview of the Issue

Vttablet runs into a panic while running Rollback on a transaction after MySQL crashes. Because the go-routine panics, we don't call endRequest and this causes the request to wait in CheckMySQL to block.

The panic looks like this -

E1128 15:11:07.099516       1 tabletserver.go:1361] Uncaught panic for Sql: "rollback", BindVars: {}:
startEphemeralPacketWithHeader cannot be used while a packet is already started.
vitess.io/vitess/go/mysql/conn.go:637 (0xde7fbc)
vitess.io/vitess/go/mysql/query.go:45 (0xdfea99)
vitess.io/vitess/go/mysql/query.go:320 (0xe01373)
vitess.io/vitess/go/mysql/query.go:303 (0x1202d08)
vitess.io/vitess/go/vt/dbconnpool/connection.go:47 (0x1202cfe)
vitess.io/vitess/go/vt/vttablet/tabletserver/connpool/dbconn.go:160 (0x134a804)
vitess.io/vitess/go/vt/vttablet/tabletserver/connpool/dbconn.go:188 (0x1483824)
vitess.io/vitess/go/vt/vttablet/tabletserver/stateful_connection.go:98 (0x1483816)
vitess.io/vitess/go/vt/vttablet/tabletserver/tx_pool.go:222 (0x14a5844)
...

Reproduction Steps

  1. Setup a cluster
  2. Run transactions via vtgate
  3. Stop MySQL
  4. Repeat until the panic is observed. This is inherently a timing issue and doesn't repeat easily

Binary Version

main and all previous versions

Operating System and Environment details

all

Log Fragments

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant