This repository was archived by the owner on Jan 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
KILL fails with err message "closed network connection" #635
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Testing with v0.19.0-rc2.
$ go run cmd/srcd/main.go sql "SHOW PROCESSLIST"
+-----+------+---------------------+---------+---------+------+--------------------------------+--------------------------------+
| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
+-----+------+---------------------+---------+---------+------+--------------------------------+--------------------------------+
| 49 | root | 192.168.160.2:43598 | gitbase | query | 440 | SquashedTable(refs, | /* Files named main.go in HEAD |
| | | | | | | commit_files, files)(635/696) | */ |
| | | | | | | | |
| | | | | | | | SELECT f.repository_id, |
| | | | | | | | f.file_path, |
| | | | | | | | |
| | | | | | | | LANGUAGE(f.file_path, |
| | | | | | | | f.blob_content) AS lang, |
| | | | | | | | f.blob_content, |
| | | | | | | | |
| | | | | | | | UAST(f.blob_content, |
| | | | | | | | LANGUAGE(f.file_path, |
| | | | | | | | f.blob_content)) AS uast |
| | | | | | | | |
| | | | | | | | FROM refs AS r |
| | | | | | | | |
| | | | | | | | NATURAL JOIN |
| | | | | | | | commit_files |
| | | | | | | | |
| | | | | | | | NATURAL JOIN files AS f |
| | | | | | | | |
| | | | | | | | WHERE r.ref_name = 'HEAD' |
| | | | | | | | |
| | | | | | | | AND f.file_path |
| | | | | | | | REGEXP('.*main.go') |
| 87 | root | 192.168.160.2:43598 | gitbase | query | 383 | SquashedTable(refs, | /* Files named main.go in HEAD |
| | | | | | | commit_files, files)(659/696) | */ |
| | | | | | | | |
| | | | | | | | SELECT f.repository_id, |
| | | | | | | | f.file_path, |
| | | | | | | | |
| | | | | | | | LANGUAGE(f.file_path, |
| | | | | | | | f.blob_content) AS lang, |
| | | | | | | | f.blob_content, |
| | | | | | | | |
| | | | | | | | UAST(f.blob_content, |
| | | | | | | | LANGUAGE(f.file_path, |
| | | | | | | | f.blob_content)) AS uast |
| | | | | | | | |
| | | | | | | | FROM refs AS r |
| | | | | | | | |
| | | | | | | | NATURAL JOIN |
| | | | | | | | commit_files |
| | | | | | | | |
| | | | | | | | NATURAL JOIN files AS f |
| | | | | | | | |
| | | | | | | | WHERE r.ref_name = 'HEAD' |
| | | | | | | | |
| | | | | | | | AND f.file_path |
| | | | | | | | REGEXP('.*main.go') |
| 268 | root | 192.168.160.2:43598 | gitbase | query | 0 | running | SHOW PROCESSLIST |
+-----+------+---------------------+---------+---------+------+--------------------------------+--------------------------------+
If I try to kill any of the queries it fails, and the queries keep running.
gitbase> KILL 49;
rpc error: code = Unknown desc = SQL query failed: invalid connection
gitbase> kill 87;
rpc error: code = Unknown desc = SQL query failed: invalid connection
gitbase> kill 123456;
rpc error: code = Unknown desc = SQL query failed: invalid connection
The logs are the same for existing and non-existing PID
time="2019-03-05T18:27:15Z" level=info msg="NewConnection: client 248"
time="2019-03-05T18:27:15Z" level=info msg="audit trail" action=authentication address="192.168.160.2:43606" success=true system=audit user=root
time="2019-03-05T18:27:15Z" level=info msg="kill connection: id 248, pid: 87"
time="2019-03-05T18:27:15Z" level=error msg="Conn 248: Flush() failed: write tcp 192.168.160.4:3306->192.168.160.2:43606: use of closed network connection"
time="2019-03-05T18:27:15Z" level=info msg="ConnectionClosed: client 248"
time="2019-03-05T18:27:24Z" level=info msg="NewConnection: client 249"
time="2019-03-05T18:27:24Z" level=info msg="audit trail" action=authentication address="192.168.160.2:43608" success=true system=audit user=root
time="2019-03-05T18:27:24Z" level=info msg="kill connection: id 249, pid: 123456"
time="2019-03-05T18:27:24Z" level=error msg="Conn 249: Flush() failed: write tcp 192.168.160.4:3306->192.168.160.2:43608: use of closed network connection"
time="2019-03-05T18:27:24Z" level=info msg="ConnectionClosed: client 249"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working