Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TiCDC panic when upgrade from 4.0.8 to 5.3.1 #5266

Closed
overvenus opened this issue Apr 25, 2022 · 2 comments
Closed

TiCDC panic when upgrade from 4.0.8 to 5.3.1 #5266

overvenus opened this issue Apr 25, 2022 · 2 comments
Assignees
Labels
affects-5.3 area/ticdc Issues or PRs related to TiCDC. severity/moderate This is a moderate bug. type/bug This is a bug.

Comments

@overvenus
Copy link
Member

What did you do?

Upgrade from 4.0.8 to 5.3.1.

goroutine 705 [running]:
github.com/pingcap/tiflow/cdc/model.(*ChangeFeedInfo).FixIncompatible(0x0)
        github.com/pingcap/tiflow/cdc/model/changefeed.go:247 +0x37
github.com/pingcap/tiflow/cdc/owner.fixChangefeedInfos.func1(0x0, 0x203000, 0x203000, 0x203000, 0x90)
        github.com/pingcap/tiflow/cdc/owner/owner.go:284 +0x2b
github.com/pingcap/tiflow/pkg/orchestrator.(*ChangefeedReactorState).PatchInfo.func1(0x0, 0x0, 0x413ec2, 0xc00296f038, 0x5a96dcf, 0x3109e12f2e3c4a4b, 0x30)
        github.com/pingcap/tiflow/pkg/orchestrator/reactor_state.go:297 +0xa2
github.com/pingcap/tiflow/pkg/orchestrator.(*ChangefeedReactorState).patchAny.func1(0x0, 0x0, 0x0, 0x3e, 0x6379680, 0x33386c0, 0x1, 0xc002a42b70, 0xc00296f088)
        github.com/pingcap/tiflow/pkg/orchestrator/reactor_state.go:390 +0x13a
github.com/pingcap/tiflow/pkg/orchestrator.(*SingleDataPatch).Patch(0xc000918588, 0xc002a42570, 0xc002a42b40, 0x53, 0xc002566088)
        github.com/pingcap/tiflow/pkg/orchestrator/interfaces.go:55 +0x82
github.com/pingcap/tiflow/pkg/orchestrator.getChangedState(0xc002a42570, 0xc000659560, 0x1, 0x1, 0xc00133dd98, 0x4b2, 0x0, 0x0)
        github.com/pingcap/tiflow/pkg/orchestrator/batch.go:77 +0xa5
github.com/pingcap/tiflow/pkg/orchestrator.getBatchChangedState(0xc002a42570, 0xc00032cf00, 0x1a, 0x1a, 0x4, 0x4, 0xc0007ad380, 0xc00296f2e0, 0x2a4e7d3)
        github.com/pingcap/tiflow/pkg/orchestrator/batch.go:41 +0x17e
github.com/pingcap/tiflow/pkg/orchestrator.(*EtcdWorker).applyPatchGroups(0xc0005f0380, 0x7fe95e4d4028, 0xc0008b6040, 0xc00032cf00, 0x1a, 0x1a, 0x1, 0x1, 0x0, 0x2, ...)
        github.com/pingcap/tiflow/pkg/orchestrator/etcd_worker.go:345 +0xc5
github.com/pingcap/tiflow/pkg/orchestrator.(*EtcdWorker).Run(0xc0005f0380, 0x7fe95e4d4028, 0xc0008b6040, 0xc0008be060, 0xbebc200, 0x7fff34a0de3a, 0x11, 0x34d23cb, 0x5, 0x0, ...)
        github.com/pingcap/tiflow/pkg/orchestrator/etcd_worker.go:205 +0xb87
github.com/pingcap/tiflow/cdc/capture.(*Capture).runEtcdWorker(0xc00065a320, 0x3b9af98, 0xc0008b6040, 0x3b16340, 0xc001660000, 0x3b4c0b8, 0xc00278e990, 0xbebc200, 0x34d23cb, 0x5, ...)
        github.com/pingcap/tiflow/cdc/capture/capture.go:299 +0x185
github.com/pingcap/tiflow/cdc/capture.(*Capture).campaignOwner(0xc00065a320, 0x3b9af98, 0xc0008b6040, 0xc000085000, 0xc0027b6e88)
        github.com/pingcap/tiflow/cdc/capture/capture.go:271 +0x6ee
github.com/pingcap/tiflow/cdc/capture.(*Capture).run.func2(0xc000b38030, 0xc00065a320, 0x3b9af98, 0xc0008b6040, 0xc000b3e010)
        github.com/pingcap/tiflow/cdc/capture/capture.go:192 +0xb5
created by github.com/pingcap/tiflow/cdc/capture.(*Capture).run
        github.com/pingcap/tiflow/cdc/capture/capture.go:186 +0x2c8
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x98 pc=0x178a057]

See more details https://asktug.com/t/topic/664446

What did you expect to see?

No panic.

What did you see instead?

Panic.

Versions of the cluster

See above.

@overvenus overvenus added type/bug This is a bug. area/ticdc Issues or PRs related to TiCDC. severity/moderate This is a moderate bug. labels Apr 25, 2022
@github-actions github-actions bot added this to Need Triage in Question and Bug Reports Apr 25, 2022
@hi-rustin
Copy link
Member

I can reproduce the issue.

  1. create multiple changefeeds in 4.0.8
  2. delete a changefeed
  3. upgrade
  4. painc

It should be fixed by #4183, but we missed part of the code.

@nongfushanquan
Copy link
Contributor

/lable 5.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.3 area/ticdc Issues or PRs related to TiCDC. severity/moderate This is a moderate bug. type/bug This is a bug.
Development

No branches or pull requests

3 participants