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

Panic in mylogical/conn.go; index out of bounds #858

Closed
bobvawter opened this issue May 10, 2024 · 0 comments · Fixed by #875
Closed

Panic in mylogical/conn.go; index out of bounds #858

bobvawter opened this issue May 10, 2024 · 0 comments · Fixed by #875
Assignees
Labels
bug Something isn't working

Comments

@bobvawter
Copy link
Member

https://github.com/cockroachdb/replicator/actions/runs/9024225261/job/24797705112#step:7:6052

=== RUN   TestMYLogical/consistent
time="2024-05-09T22:18:28Z" level=info msg="source connect string: postgresql://root@localhost:26257/defaultdb?sslmode=disable"
time="2024-05-09T22:18:28Z" level=info msg="source schema: \"src-13173-1\".\"public\""
time="2024-05-09T22:18:28Z" level=info msg="staging connect string: postgresql://root@localhost:26257/defaultdb?sslmode=disable"
time="2024-05-09T22:18:29Z" level=info msg="reusing SourcePool as TargetPool"
time="2024-05-09T22:18:29Z" level=info msg="target schema: \"tgt-13173-3\".\"public\""
time="2024-05-09T22:18:29Z" level=info msg="Pool: Setup 1 new connections (minimal pool size)..." mysql=true
time="2024-05-09T22:18:29Z" level=info msg="Version info: 5.7.44-log"
time="2024-05-09T22:18:29Z" level=warning msg="Detecting MySQL 5.X; forcing metadata fetch"
time="2024-05-09T22:18:29Z" level=info msg="Master status: ea865bc2-0e51-11ef-aced-0242ac120002:1-8"
time="2024-05-09T22:18:29Z" level=info msg="gtidSet: ea865bc2-0e51-11ef-aced-0242ac120002:1-8"
time="2024-05-09T22:18:30Z" level=info msg="Version info: 5.7.44-log"
time="2024-05-09T22:18:30Z" level=warning msg="Detecting MySQL 5.X; forcing metadata fetch"
[2024/05/09 22:18:30] [info] binlogsyncer.go:156 create BinlogSyncer with config {123456 mysql localhost 3306 root    false false <nil> false UTC false 0 0s 0s 0 false false 0 <nil> 0xc000488900}
[2024/05/09 22:18:30] [info] binlogsyncer.go:410 begin to sync binlog from GTID set ea865bc2-0e51-11ef-aced-0242ac120002:1-8
[2024/05/09 22:18:30] [info] binlogsyncer.go:808 rotate to (log-bin.000003, 4)
time="2024-05-09T22:18:30Z" level=info msg="connected to MySQL version 5.7.44-log"
[2024/05/09 22:18:32] [info] binlogsyncer.go:188 syncer is closing...
[2024/05/09 22:18:32] [info] binlogsyncer.go:881 kill last connection id 7
[2024/05/09 22:18:32] [info] binlogsyncer.go:218 syncer is closed
time="2024-05-09T22:18:32Z" level=info msg="finished my pool cleanup"
=== RUN   TestMYLogical/consistent-chaos
time="2024-05-09T22:18:32Z" level=info msg="source connect string: postgresql://root@localhost:26257/defaultdb?sslmode=disable"
time="2024-05-09T22:18:32Z" level=info msg="source schema: \"src-13173-4\".\"public\""
time="2024-05-09T22:18:32Z" level=info msg="staging connect string: postgresql://root@localhost:26257/defaultdb?sslmode=disable"
time="2024-05-09T22:18:32Z" level=info msg="reusing SourcePool as TargetPool"
time="2024-05-09T22:18:32Z" level=info msg="target schema: \"tgt-13173-6\".\"public\""
time="2024-05-09T22:18:33Z" level=info msg="Pool: Setup 1 new connections (minimal pool size)..." mysql=true
time="2024-05-09T22:18:33Z" level=info msg="Version info: 5.7.44-log"
time="2024-05-09T22:18:33Z" level=warning msg="Detecting MySQL 5.X; forcing metadata fetch"
time="2024-05-09T22:18:33Z" level=info msg="Master status: ea865bc2-0e51-11ef-aced-0242ac120002:1-14"
time="2024-05-09T22:18:33Z" level=info msg="gtidSet: ea865bc2-0e51-11ef-aced-0242ac120002:1-14"
time="2024-05-09T22:18:33Z" level=info msg="Version info: 5.7.44-log"
time="2024-05-09T22:18:33Z" level=warning msg="Detecting MySQL 5.X; forcing metadata fetch"
[2024/05/09 22:18:33] [info] binlogsyncer.go:156 create BinlogSyncer with config {123456 mysql localhost 3306 root    false false <nil> false UTC false 0 0s 0s 0 false false 0 <nil> 0xc000196420}
[2024/05/09 22:18:33] [info] binlogsyncer.go:410 begin to sync binlog from GTID set ea865bc2-0e51-11ef-aced-0242ac120002:1-14
[2024/05/09 22:18:33] [info] binlogsyncer.go:808 rotate to (log-bin.000003, 4)
time="2024-05-09T22:18:33Z" level=info msg="connected to MySQL version 5.7.44-log"
[2024/05/09 22:18:34] [info] binlogsyncer.go:188 syncer is closing...
[2024/05/09 22:18:34] [info] binlogsyncer.go:881 kill last connection id 15
[2024/05/09 22:18:34] [info] binlogsyncer.go:218 syncer is closed
time="2024-05-09T22:18:34Z" level=warning msg="error while copying messages; will retry" error=chaos
[2024/05/09 22:18:35] [info] binlogsyncer.go:156 create BinlogSyncer with config {123456 mysql localhost 3306 root    false false <nil> false UTC false 0 0s 0s 0 false false 0 <nil> 0xc000c68600}
[2024/05/09 22:18:35] [info] binlogsyncer.go:410 begin to sync binlog from GTID set ea865bc2-0e51-11ef-aced-0242ac120002:15
[2024/05/09 22:18:35] [info] binlogsyncer.go:808 rotate to (log-bin.000002, 4)
time="2024-05-09T22:18:35Z" level=info msg="connected to MySQL version 5.7.44-log"
[2024/05/09 22:18:35] [info] binlogsyncer.go:188 syncer is closing...
[2024/05/09 22:18:35] [info] binlogsyncer.go:881 kill last connection id 18
[2024/05/09 22:18:35] [info] binlogsyncer.go:218 syncer is closed
panic: runtime error: index out of range [2] with length 2

goroutine 2704 [running]:
github.com/cockroachdb/replicator/internal/source/mylogical.(*conn).onDataTuple(0xc0001a6180, {0xc0000cc540?, 0x1d83771?}, 0xc000c80d60, 0xc0005a15f0, 0x1)
	/home/runner/work/replicator/replicator/internal/source/mylogical/conn.go:365 +0x17ed
github.com/cockroachdb/replicator/internal/source/mylogical.(*conn).accumulateBatch(0xc0001a6180, 0xc000348900, 0xc000ad71d0, 0xc000c80d60)
	/home/runner/work/replicator/replicator/internal/source/mylogical/conn.go:247 +0x1213
github.com/cockroachdb/replicator/internal/source/mylogical.(*conn).copyMessages(0xc0001a6180, 0xc000348900)
	/home/runner/work/replicator/replicator/internal/source/mylogical/conn.go:303 +0xc05
github.com/cockroachdb/replicator/internal/source/mylogical.(*conn).Start.func1()
	/home/runner/work/replicator/replicator/internal/source/mylogical/conn.go:121 +0x7c
github.com/cockroachdb/replicator/internal/util/stopper.(*Context).Go.func1()
	/home/runner/work/replicator/replicator/internal/util/stopper/stopper.go:187 +0xbe
created by github.com/cockroachdb/replicator/internal/util/stopper.(*Context).Go in goroutine 2590
	/home/runner/work/replicator/replicator/internal/util/stopper/stopper.go:185 +0x14d
FAIL	github.com/cockroachdb/replicator/internal/source/mylogical	7.255s
time="2024-05-09T22:18:32Z" level=info msg="skipping postgresql integration tests: CDC_INTEGRATION=\"mysql-v5.7\""
ok  	github.com/cockroachdb/replicator/internal/source/pglogical	1.070s
	github.com/cockroachdb/replicator/internal/util/stdserver		coverage: 0.0% of statements
	github.com/cockroachdb/replicator/internal/util/stmtcache		coverage: 0.0% of statements
	github.com/cockroachdb/replicator/internal/util/subfs		coverage: 0.0% of statements
@bobvawter bobvawter added the bug Something isn't working label May 10, 2024
sravotto added a commit that referenced this issue May 16, 2024
This change fixes a panic that could be cause by rows in a stream not conforming
to the schema provided in TableMapEvents.

It also adds test cases to verify the functionality of onDataTuple function.

Fixes #858.
sravotto added a commit that referenced this issue May 16, 2024
This change fixes a panic that could be cause by rows in a stream not conforming
to the schema provided in TableMapEvents.

It also adds test cases to verify the functionality of onDataTuple function.

Fixes #858.
sravotto added a commit that referenced this issue May 16, 2024
This change fixes a panic that could be cause by rows in a stream not conforming
to the schema provided in TableMapEvents.

It also adds test cases to verify the functionality of onDataTuple function.

Fixes #858.
sravotto added a commit that referenced this issue May 16, 2024
This change fixes a panic that could be caused by rows in a stream not conforming
to the schema provided in TableMapEvents.

It also adds test cases to verify the functionality of onDataTuple function.

Fixes #858.
sravotto added a commit that referenced this issue May 17, 2024
This change fixes a panic that could be caused by rows in a stream not conforming
to the schema provided in TableMapEvents.

It also adds test cases to verify the functionality of onDataTuple function.

Fixes #858.
github-merge-queue bot pushed a commit that referenced this issue May 17, 2024
This change fixes a panic that could be caused by rows in a stream not conforming
to the schema provided in TableMapEvents.

It also adds test cases to verify the functionality of onDataTuple function.

Fixes #858.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants