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

Unexpected connection close when executing kill query on idle connection #57840

Open
pcqz opened this issue Nov 29, 2024 · 0 comments
Open

Unexpected connection close when executing kill query on idle connection #57840

pcqz opened this issue Nov 29, 2024 · 0 comments
Labels
type/bug The issue is confirmed as a bug.

Comments

@pcqz
Copy link

pcqz commented Nov 29, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

session 1:
mysql> show processlist;
+-----------+------+----------------+------+---------+------+------------+------------------+
| Id        | User | Host           | db   | Command | Time | State      | Info             |
+-----------+------+----------------+------+---------+------+------------+------------------+
| 346030088 | root | 10.2.8.3:48768 | NULL | Query   |    0 | autocommit | show processlist |
| 346030086 | root | 10.2.8.3:48696 | NULL | Sleep   |    7 | autocommit | NULL             |
+-----------+------+----------------+------+---------+------+------------+------------------+
2 rows in set (0.00 sec)

mysql> kill tidb query 346030086;
Query OK, 0 rows affected (0.00 sec)

session 2:
mysql> show processlist;
ERROR 2013 (HY000): Lost connection to MySQL server during query

2. What did you expect to see? (Required)

The connection for session 2 shouldn't be closed.

3. What did you see instead (Required)

The connection is closed and the i/o timeout error is reporterd in TiDB log like the following:

[2024/11/29 18:22:02.430 +08:00] [INFO] [server.go:897] [kill] [conn=346030086] [query=true] [maxExecutionTime=false] [runawayExceed=false]
[2024/11/29 18:22:02.431 +08:00] [WARN] [sqlkiller.go:61] ["kill initiated"] ["connection ID"=346030086] [reason="[executor:1317]Query execution was interrupted"]
[2024/11/29 18:22:02.431 +08:00] [INFO] [conn.go:1106] ["read packet timeout, close this connection"] [conn=346030086] [session_alias=] [idle=18.588288003s] [waitTimeout=28800] [error="read tcp 10.2.8.3:26333->10.2.8.3:48696: i/o timeout"]

4. What is your TiDB version? (Required)

v8.3.0

@pcqz pcqz added the type/bug The issue is confirmed as a bug. label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

1 participant