pingcap / pingcap/tidb

close clsed channel in the MPPTaskHandler

Open
#33,191 0 comments 0 reactions 0 assignees View on GitHub
affects-6.0 affects-6.1 component/tiflash may-affects-4.0 may-affects-5.0 may-affects-5.1 may-affects-5.2 may-affects-5.3 may-affects-5.4 severity/moderate sig/execution type/bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.