close clsed channel in the MPPTaskHandler
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```
make gotest_in_verify_ci
```
```
panic: close of closed channel
goroutine 685 [running]:
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.(*MPPTaskHandler).getAndActiveTunnel(0xc004865680?, 0x12f61e7?)
/home/ubuntu/tidb/store/mockstore/unistore/cophandler/mpp.go:569 +0xc5
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.(*MPPTaskHandler).HandleEstablishConn(0x43880f8?, {0xc00013c000?, 0xc004909f80?}, 0xc00494e120)
/home/ubuntu/tidb/store/mockstore/unistore/cophandler/mpp.go:543 +0x6a
github.com/pingcap/tidb/store/mockstore/unistore/tikv.(*Server).EstablishMPPConnectionWithStoreID(0x38695c0?, 0xc00494e120, {0x4396678, 0xc00437f110}, 0xc0048658e8?)
/home/ubuntu/tidb/store/mockstore/unistore/tikv/server.go:810 +0x16d
github.com/pingcap/tidb/store/mockstore/unistore.(*RPCClient).handleEstablishMPPConnection(0xc0006ff3b0, {0x43880c0, 0xc00470e880}, 0xc00494e120, 0x34630b8a000, 0x3c82c79?)
/home/ubuntu/tidb/store/mockstore/unistore/rpc.go:315 +0x8e
github.com/pingcap/tidb/store/mockstore/unistore.(*RPCClient).SendRequest(0xc0006ff3b0, {0x43880c0, 0xc00470e880}, {0xc0047bf5e8, 0x8}, 0xc004c4aa00, 0x3b75a60?)
/home/ubuntu/tidb/store/mockstore/unistore/rpc.go:258 +0x1fd0
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.(*exchRecvExec).EstablishConnAndReceiveData(0xc0045948c0, 0xc00470e8c0, 0xc004591d10)
/home/ubuntu/tidb/store/mockstore/unistore/cophandler/mpp_exec.go:581 +0x195
github.com/pingcap/tidb/store/mockstore/unistore/cophandler.(*exchRecvExec).runTunnelWorker(0xc0045948c0, 0xc00013c000?, 0x622a280?)
/home/ubuntu/tidb/store/mockstore/unistore/cophandler/mpp_exec.go:621 +0x7f
created by github.com/pingcap/tidb/store/mockstore/unistore/cophandler.(*exchRecvExec).init
/home/ubuntu/tidb/store/mockstore/unistore/cophandler/mpp_exec.go:557 +0x1ee
```
### 2. What did you expect to see? (Required)
### 3. What did you see instead (Required)
### 4. What is your TiDB version? (Required)
Contributor guide
Assessment
This issue has not been assessed yet.