yugabyte-db icon indicating copy to clipboard operation
yugabyte-db copied to clipboard

[CDCSDK] SIGSEGV in YBCGetReplicaIdentityForRelation: with Dynamic addition of table with alter publication, along with cdcsdk_publication_list_refresh_interval_secs=300

Open shamanthchandra-yb opened this issue 9 months ago • 0 comments

Jira Link: DB-11189

Description

Please refer slack thread in JIRA

create a table table1
create 20 tables
deploy a connector, "filtered", table1

Create 20 tables
ALTER PUBLICATION run 20 + 20 times, add a table each time
Deploy sink connector

Run workload on all 40 tables
Verify sink

Failed with a postgres crash:

* thread #1, name = 'postgres', stop reason = signal SIGSEGV
  * frame #0: 0x000055c691aa5ac4 postgres`YBCGetReplicaIdentityForRelation [inlined] hash_search_with_hash_value(hashp=<unavailable>, keyPtr=0x00007ffc06c98bb4, hashvalue=677552470, action=HASH_FIND, foundPtr=<unavailable>) at dynahash.c:986:29
    frame #1: 0x000055c691aa5a6d postgres`YBCGetReplicaIdentityForRelation [inlined] hash_search(hashp=<unavailable>, keyPtr=0x00007ffc06c98bb4, action=HASH_FIND, foundPtr=<unavailable>) at dynahash.c:911:9
    frame #2: 0x000055c691aa5a5f postgres`YBCGetReplicaIdentityForRelation(relid=16670) at slot.c:1739:3
    frame #3: 0x000055c691a8add3 postgres`YBGetHeapTuplesForRecord(yb_record=0x000014807efd8e78, change_type=REORDER_BUFFER_CHANGE_INSERT) at yb_decode.c:394:3
    frame #4: 0x000055c691a8a9ac postgres`YBLogicalDecodingProcessRecord [inlined] YBDecodeInsert(ctx=0x000014807f632118, record=<unavailable>) at yb_decode.c:163:10
    frame #5: 0x000055c691a8a955 postgres`YBLogicalDecodingProcessRecord(ctx=0x000014807f632118, record=0x000014807f6323f0) at yb_decode.c:102:4
    frame #6: 0x000055c691a92127 postgres`XLogSendLogical at walsender.c:3016:3
    frame #7: 0x000055c691a91af2 postgres`WalSndLoop(send_data=(postgres`XLogSendLogical at walsender.c:2968)) at walsender.c:2360:4
    frame #8: 0x000055c691a8f411 postgres`exec_replication_command [inlined] StartLogicalReplication(cmd=0x000014807f91d7c8) at walsender.c:1279:2
    frame #9: 0x000055c691a8f17e postgres`exec_replication_command(cmd_string="START_REPLICATION SLOT \"901cb464f3751db1bf42a47bfefd176a_from_con\" LOGICAL 0/2 (\"proto_version\" '1', \"publication_names\" 'pn_ybconnector_regex')") at walsender.c:1752:6
    frame #10: 0x000055c691b15cf1 postgres`PostgresMain(argc=<unavailable>, argv=<unavailable>, dbname=<unavailable>, username=<unavailable>) at postgres.c:5401:28
    frame #11: 0x000055c691a50f40 postgres`BackendRun(port=0x000014807fc09680) at postmaster.c:4741:2
    frame #12: 0x000055c691a5005d postgres`ServerLoop [inlined] BackendStartup(port=0x000014807fc09680) at postmaster.c:4400:3
    frame #13: 0x000055c691a4ffbe postgres`ServerLoop at postmaster.c:1778:7
    frame #14: 0x000055c691a4b166 postgres`PostmasterMain(argc=25, argv=0x000014807fd101a0) at postmaster.c:1434:11
    frame #15: 0x000055c691949ffa postgres`PostgresServerProcessMain(argc=25, argv=0x000014807fd101a0) at main.c:234:3
    frame #16: 0x000055c6915fc4d2 postgres`main + 34
    frame #17: 0x00007f9024325d85 libc.so.6`__libc_start_main + 229
    frame #18: 0x000055c6915fc3ee postgres`_start + 46

I also don't see records as per expectation for dynamic addition of tables

Source connector version

fourpointfour/ybdb-debezium:0.6

Connector configuration

 add connector connector_name='ybconnector_regex' stream_id='901cb464f3751db1bf42a47bfefd176a' db_name='cdc_21e678' connector_host='172.151.27.174' table_list=['test_cdc_68b169'] {'name': 'ybconnector_regex', 'config': {'database.master.addresses': '172.151.29.228:7100,172.151.26.3:7100,172.151.17.58:7100', 'database.hostname': '172.151.29.228:5433,172.151.26.3:5433,172.151.17.58:5433', 'database.port': 5433, 'database.masterhost': '172.151.29.228', 'database.masterport': '7100', 'database.user': 'yugabyte', 'database.password': 'yugabyte', 'database.dbname': 'cdc_21e678', 'snapshot.mode': 'never', 'admin.operation.timeout.ms': 600000, 'socket.read.timeout.ms': 300000, 'max.connector.retries': '10', 'operation.timeout.ms': 600000, 'topic.creation.default.compression.type': 'lz4', 'topic.creation.default.cleanup.policy': 'delete', 'topic.creation.default.partitions': 2, 'topic.creation.default.replication.factor': '1', 'tasks.max': '10', 'connector.class': 'io.debezium.connector.postgresql.PostgresConnector', 'topic.prefix': 'db_cdc', 'plugin.name': 'pgoutput', 'slot.name': '901cb464f3751db1bf42a47bfefd176a_from_con', 'publication.autocreate.mode': 'filtered', 'publication.name': 'pn_ybconnector_regex', 'table.include.list': 'public.test_cdc_68b169'}}

YugabyteDB version

2024.1.0.0-b123

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • [X] I confirm this issue does not contain any sensitive information.

shamanthchandra-yb avatar May 06 '24 08:05 shamanthchandra-yb