pingcap / tiup

A component manager for TiDB
https://tiup.io
Apache License 2.0
427 stars 313 forks source link

TiUP Playground fails to stop with TiProxy #2317

Closed dveeden closed 1 year ago

dveeden commented 1 year ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
tiup playground --tiproxy 1 --tiflash 0 v7.1.2

Then press ^C

  1. What did you expect to see?

TiUP Playground to stop gracefully.

  1. What did you see instead?
$ tiup playground --tiproxy 1 --tiflash 0 v7.1.2
tiup is checking updates for component playground ...
Starting component `playground`: /home/dvaneeden/.tiup/components/playground/v1.13.1/tiup-playground --tiproxy 1 --tiflash 0 v7.1.2
Start pd instance:v7.1.2
Start tikv instance:v7.1.2
Start tidb instance:v7.1.2
Start tiproxy instance:nightly
Waiting for tidb and tiproxy instances ready
127.0.0.1:4000 ... Done
127.0.0.1:6000 ... Done

🎉 TiDB Playground Cluster is started, enjoy!

Connect TiDB:    mysql --comments --host 127.0.0.1 --port 4000 -u root
Connect TiProxy: mysql --comments --host 127.0.0.1 --port 6000 -u root
TiDB Dashboard:  http://127.0.0.1:2379/dashboard
Grafana:        http://127.0.0.1:3000
^CPlayground receive signal:  interrupt
Got signal interrupt (Component: playground ; PID: 476651)
Wait tidb(476697) to quit...
Wait grafana(476922) to quit...
Wait ng-monitoring(476892) to quit...
Wait prometheus(476891) to quit...
Grafana quit
prometheus quit
ng-monitoring quit
tidb quit
Wait tikv(476681) to quit...
tikv quit
Wait pd(476667) to quit...
pd quit

(and not getting my prompt back)

$ pstree -aTp 476638
tiup,476638 playground --tiproxy 1 --tiflash 0 v7.1.2
  └─tiup-playground,476651 --tiproxy 1 --tiflash 0 v7.1.2
      └─tiproxy,476708 --config=/home/dvaneeden/.tiup/data/TvZy32y/tiproxy-0/config/proxy.toml
  1. What version of TiUP are you using (tiup --version)?
1.13.1 tiup
Go Version: go1.21.1
Git Ref: v1.13.1
GitHash: 3653dc521afbd0da505cdbe4bcbc92c39fe66b74

Related #2202

dveeden commented 1 year ago

/component playground

dveeden commented 1 year ago

Sending a SIGTERM to the pid of tiproxy works. So it seems like playground doesn't do that.