Tencent / TBase

TBase is an enterprise-level distributed HTAP database. Through a single database cluster to provide users with highly consistent distributed database services and high-performance data warehouse services, a set of integrated enterprise-level solutions is formed.
Other
1.38k stars 262 forks source link

Segfault on update --enable-regress #41

Open yazun opened 4 years ago

yazun commented 4 years ago

--enable-regress caused tha code fail that used to work before - trigger related on update. Is it expected?

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `postgres: dr3_dry_agis31f surveys 192.168.169.251(51186) UPDATE             '.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007fd2605ca337 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.26-23.el7.x86_64 glibc-2.17-292.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-37.el7_7.2.x86_64 libcom_err-1.42.9-16.el7.x86_64 libselinux-2.5-14.1.el7.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 nspr-4.21.0-1.el7.x86_64 nss-3.44.0-7.el7_7.x86_64 nss-softokn-freebl-3.44.0-8.el7_7.x86_64 nss-util-3.44.0-4.el7_7.x86_64 openldap-2.4.44-21.el7_6.x86_64 openssl-libs-1.0.2k-19.el7.x86_64 pcre-8.32-17.el7.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-18.el7.x86_64
(gdb) bt
#0  0x00007fd2605ca337 in raise () from /lib64/libc.so.6
#1  0x00007fd2605cba28 in abort () from /lib64/libc.so.6
#2  0x0000000000a61aff in ExceptionalCondition (conditionName=conditionName@entry=0xc49868 "!(((const void*)(fdw_trigtuple) != ((void *)0)) ^ ((bool) (((const void*)(tupleid) != ((void *)0)) && ((tupleid)->ip_posid != 0))))", errorType=errorType@entry=0xaf2109 "FailedAssertion", fileName=fileName@entry=0xc35fcd "trigger.c", lineNumber=lineNumber@entry=2878)
    at assert.c:54
#3  0x00000000006a62be in ExecBRUpdateTriggers (estate=estate@entry=0x1798690, epqstate=epqstate@entry=0x1798f28, relinfo=relinfo@entry=0x17988e0, tupleid=tupleid@entry=0x7ffde999bbd4, fdw_trigtuple=fdw_trigtuple@entry=0x7ffde999bc00, slot=slot@entry=0x1a139b8) at trigger.c:2878
#4  0x00000000006f6985 in ExecUpdate (mtstate=mtstate@entry=0x1798e60, tupleid=tupleid@entry=0x7ffde999bbd4, oldtuple=oldtuple@entry=0x7ffde999bc00, slot=slot@entry=0x1a139b8, planSlot=planSlot@entry=0x1799eb0, epqstate=epqstate@entry=0x1798f28, estate=0x1798690, canSetTag=1 '\001') at nodeModifyTable.c:1260
#5  0x00000000006f78a8 in ExecModifyTable (pstate=<optimized out>) at nodeModifyTable.c:2374
#6  0x00000000006cd1e2 in ExecProcNode (node=0x1798e60) at ../../../src/include/executor/executor.h:273
#7  ExecutePlan (execute_once=<optimized out>, dest=0x1021fc0 <donothingDR>, direction=<optimized out>, numberTuples=0, sendTuples=<optimized out>, operation=CMD_UPDATE, use_parallel_mode=<optimized out>, planstate=0x1798e60, estate=0x1798690) at execMain.c:1955
#8  standard_ExecutorRun (queryDesc=0x199d0b8, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:465
#9  0x000000000090d448 in ProcessQuery (plan=0x19e8590, sourceText=<optimized out>, params=<optimized out>, queryEnv=0x0, dest=0x1021fc0 <donothingDR>, completionTag=0x7ffde999c110 "") at pquery.c:209
#10 0x000000000090d8dc in PortalRunMulti (portal=portal@entry=0x19682f0, isTopLevel=isTopLevel@entry=1 '\001', setHoldSnapshot=setHoldSnapshot@entry=0 '\000', dest=0x1021fc0 <donothingDR>, dest@entry=0x187fe18, altdest=0x1021fc0 <donothingDR>, altdest@entry=0x187fe18, completionTag=completionTag@entry=0x7ffde999c110 "") at pquery.c:2050
#11 0x000000000090ffb6 in PortalRun (portal=portal@entry=0x19682f0, count=count@entry=1, isTopLevel=isTopLevel@entry=1 '\001', run_once=<optimized out>, dest=dest@entry=0x187fe18, altdest=altdest@entry=0x187fe18, completionTag=0x7ffde999c110 "") at pquery.c:1320
#12 0x000000000090ad91 in exec_execute_message (max_rows=1, portal_name=0x187fa00 "") at postgres.c:2951
#13 PostgresMain (argc=<optimized out>, argv=argv@entry=0x17b5248, dbname=<optimized out>, username=<optimized out>) at postgres.c:5498
#14 0x00000000008536ed in BackendRun (port=0x1786cd0) at postmaster.c:4979
#15 BackendStartup (port=0x1786cd0) at postmaster.c:4651
#16 ServerLoop () at postmaster.c:1956
#17 0x0000000000857a3c in PostmasterMain (argc=argc@entry=5, argv=argv@entry=0x175a7d0) at postmaster.c:1564
#18 0x0000000000498853 in main (argc=5, argv=0x175a7d0) at main.c:228
smallcookie086 commented 4 years ago

This is a bug, thanks for your feedback, it will be fixed in the next commit