Skip to content

cdc met nil pointer panic in owner scheduler #2980

Closed
@amyangfei

Description

What did you do?

Run cdc with some truncate table DDLs

What did you expect to see?

No response

What did you see instead?

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x2587b97]

goroutine 377 [running]:
github.com/pingcap/ticdc/cdc/owner.(*scheduler).cleanUpFinishedOperations.func1(0x0, 0x400, 0xc0118fa000, 0xc0109b1480, 0xc03b224000)
        github.com/pingcap/ticdc/cdc/owner/scheduler.go:304 +0x37
github.com/pingcap/ticdc/cdc/model.(*ChangefeedReactorState).PatchTaskStatus.func1(0x0, 0x0, 0x413ec2, 0xc01194d000, 0xf4f630f9, 0xe63b43a8a5dda94e, 0x3e)
        github.com/pingcap/ticdc/cdc/model/reactor_state.go:343 +0xa2
github.com/pingcap/ticdc/cdc/model.(*ChangefeedReactorState).patchAny.func1(0x0, 0x0, 0x0, 0x5f, 0x4c68200, 0x400, 0x1, 0x0, 0x0)
        github.com/pingcap/ticdc/cdc/model/reactor_state.go:389 +0x13a
github.com/pingcap/ticdc/pkg/orchestrator.(*SingleDataPatch).Patch(0xc00cf1e000, 0xc03b0c8390, 0xc03b0c83c0, 0x0, 0x0)
        github.com/pingcap/ticdc/pkg/orchestrator/interfaces.go:55 +0x82
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).applyPatches(0xc0001eec40, 0x7ff7f404bab8, 0xc0006220e0, 0xc04e0d8900, 0x9, 0x10, 0x0, 0x0)
        github.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:248 +0xcc
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).applyPatchGroups(0xc0001eec40, 0x7ff7f404bab8, 0xc0006220e0, 0xc0317f7a00, 0x15, 0x15, 0x0, 0x1, 0x21, 0x31b5a60, ...)
        github.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:235 +0xb4
github.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).Run(0xc0001eec40, 0x7ff7f404bab8, 0xc0006220e0, 0xc000718240, 0xbebc200, 0x0, 0x0)
        github.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:146 +0x885
github.com/pingcap/ticdc/cdc/capture.(*Capture).runEtcdWorker(0xc0006d8400, 0x3222d78, 0xc0006220e0, 0x31b5e20, 0xc0006c1bc0, 0x31de9d0, 0xc000ca9e30, 0xbebc200, 0x0, 0x0)
        github.com/pingcap/ticdc/cdc/capture/capture.go:261 +0x135
github.com/pingcap/ticdc/cdc/capture.(*Capture).campaignOwner(0xc0006d8400, 0x3222d78, 0xc0006220e0, 0x40dc00, 0x31b73a0)
        github.com/pingcap/ticdc/cdc/capture/capture.go:240 +0x6b5
github.com/pingcap/ticdc/cdc/capture.(*Capture).run.func2(0xc000cb2060, 0xc0006d8400, 0x3222d78, 0xc0006220e0, 0xc000d60040)
        github.com/pingcap/ticdc/cdc/capture/capture.go:169 +0xb5
created by github.com/pingcap/ticdc/cdc/capture.(*Capture).run
        github.com/pingcap/ticdc/cdc/capture/capture.go:163 +0x29e

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

v5.1.1

TiCDC version (execute cdc version):

v5.1.1

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions