Skip to content

[YSQL][SQLsmith] Segmentation fault in YBCPgFlushBufferedOperations() #11365

@def-

Description

@def-

Jira Link: DB-1100

Description

Found with SQLsmith, crashes in Postgres binary with this=nullpointer:

Core was generated by `postgres: yugabyte yugabyte 127.0.0.1(55890) ROLLBACK '. Program terminated with signal 11, Segmentation fault. #0 operator-> (this=0x360) at ../../src/yb/gutil/ref_counted.h:363 363 ScopedRefPtrCheck(ptr_ != nullptr); (gdb) bt #0 operator-> (this=0x360) at ../../src/yb/gutil/ref_counted.h:363 #1 FlushBufferedOperations (this=0x0) at ../../src/yb/yql/pggate/pggate.cc:1024 #2 YBCPgFlushBufferedOperations () at ../../src/yb/yql/pggate/ybc_pggate.cc:634 #3 0x000000000093b3c2 in YBFlushBufferedOperations () at /nfusr/dev-server/dfelsing/code/yugabyte-db/src/postgres/src/backend/utils/misc/../../../../../../../src/postgres/src/backend/utils/misc/pg_yb_utils.c:1420 #4 PortalRun (portal=0x283e118, count=9223372036854775807, isTopLevel=<optimized out>, run_once=<optimized out>, dest=0x266f498, altdest=0x266f498, completionTag=0x7ffdc28fef30 "ROLLBACK") at ../../../../../../src/postgres/src/backend/tcop/pquery.c:833 #5 0x00000000009376e6 in yb_exec_simple_query_impl (query_string=0x266e118) at ../../../../../../src/postgres/src/backend/tcop/postgres.c:1161 #6 0x0000000000937dbe in yb_exec_query_wrapper (exec_context=0x266e000, restart_data=<optimized out>, functor=0x936e40 <yb_exec_simple_query_impl>, functor_context=0x266e118) at ../../../../../../src/postgres/src/backend/tcop/postgres.c:4445 #7 0x000000000093469d in PostgresMain (argc=1, argv=<optimized out>, dbname=<optimized out>, username=0x2743fe8 "yugabyte") at ../../../../../../src/postgres/src/backend/tcop/postgres.c:4479 #8 0x00000000008900ab in BackendRun (port=0x24ea1e0) at ../../../../../../src/postgres/src/backend/postmaster/postmaster.c:4470 #9 0x000000000088f7e2 in ServerLoop () at ../../../../../../src/postgres/src/backend/postmaster/postmaster.c:4136 #10 0x000000000088c021 in PostmasterMain (argc=<optimized out>, argv=0x25006c0) at ../../../../../../src/postgres/src/backend/postmaster/postmaster.c:1417 #11 0x00000000007ac843 in PostgresServerProcessMain (argc=23, argv=0x25006c0) at ../../../../../../src/postgres/src/backend/main/main.c:234 #12 0x00000000004de432 in main () 

Happened on execution of ROLLBACK;, can't reproduce.

Code state: 24ec10d (Release build)
Coredump: core.24374.zip

Metadata

Metadata

Assignees

Labels

area/ysqlYugabyte SQL (YSQL)kind/bugThis issue is a bugkind/failing-testTests and testing infrapriority/mediumMedium priority issueqa_automationBugs identified via itest-system, LST, Stress automation or causing automation failures

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions