(gdb) bt #0 0x00007aa8bd7ddeab in raise () from /lib64/libc.so.6 #1 0x00007aa8bd7c85b9 in abort () from /lib64/libc.so.6 #2 0x0000000000a34154 in ExceptionalCondition (conditionName=0xc6d888 "!(0)", errorType=0xc6ce18 "FailedAssertion", fileName=0xc6caa0 "json.c", lineNumber=3047) at assert.c:54 #3 0x00000000009415e7 in JsonEncodeJsonbValue (buf=0x7ffca408b870, jbv=0x7ffca408b830) at json.c:3047 #4 0x00000000009416a4 in JsonbValueToJson (jbv=0x7ffca408b830) at json.c:3077 #5 0x000000000096707c in jsonb_jsonpath_query (fcinfo=0x13f4cf0) at jsonpath_exec.c:2735 #6 0x00000000009670bb in json_jsonpath_query2 (fcinfo=0x13f4cf0) at jsonpath_exec.c:2741 #7 0x00000000006e1c18 in ExecMakeFunctionResultSet (fcache=0x13f4c80, econtext=0x13f41b8, argContext=0x13f5d40, isNull=0x13f4be0, isDone=0x13f4c60) at execSRF.c:604 #8 0x000000000070d858 in ExecProjectSRF (node=0x13f40a0, continuing=false) at nodeProjectSet.c:175 #9 0x000000000070d715 in ExecProjectSet (pstate=0x13f40a0) at nodeProjectSet.c:105 #10 0x00000000006dee78 in ExecProcNodeFirst (node=0x13f40a0) at execProcnode.c:445 #11 0x00000000006d3e56 in ExecProcNode (node=0x13f40a0) at ../../../src/include/executor/executor.h:237 #12 0x00000000006d66fa in ExecutePlan (estate=0x13f3e48, planstate=0x13f40a0, use_parallel_mode=false, operation=CMD_SELECT, sendTuples=true, numberTuples=0, direction=ForwardScanDirection, dest=0x13fa1b0, execute_once=true) at execMain.c:1707 #13 0x00000000006d447d in standard_ExecutorRun (queryDesc=0x1353768, direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:364 #14 0x00000000006d42ab in ExecutorRun (queryDesc=0x1353768, direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:307 #15 0x00000000008be5ff in PortalRunSelect (portal=0x1397348, forward=true, count=0, dest=0x13fa1b0) at pquery.c:932 #16 0x00000000008be2a4 in PortalRun (portal=0x1397348, count=9223372036854775807, isTopLevel=true, run_once=true, dest=0x13fa1b0, altdest=0x13fa1b0, completionTag=0x7ffca408be70 "") at pquery.c:773 #17 0x00000000008b8271 in exec_simple_query (query_string=0x1330738 "select json '{}' @* 'lax $[0]';") at postgres.c:1215 #18 0x00000000008bc580 in PostgresMain (argc=1, argv=0x135bab0, dbname=0x135b820 "regression", username=0x132d028 "user") at postgres.c:4243 #19 0x0000000000819f7a in BackendRun (port=0x1354940) at postmaster.c:4377 #20 0x0000000000819748 in BackendStartup (port=0x1354940) at postmaster.c:4068 #21 0x0000000000815c60 in ServerLoop () at postmaster.c:1700 #22 0x000000000081550c in PostmasterMain (argc=8, argv=0x132aeb0) at postmaster.c:1373 #23 0x000000000073ebba in main (argc=8, argv=0x132aeb0) at main.c:228 (gdb) up #4 0x00000000009416a4 in JsonbValueToJson (jbv=0x7ffca408b830) at json.c:3077 3077 JsonEncodeJsonbValue(&buf, jbv); (gdb) print *jbv $1 = {type = 20938064, val = {numeric = 0x7ffca408b870, boolean = 112, string = {len = -1542932368, val = 0x0}, array = {nElems = -1542932368, elems = 0x0, rawScalar = 16}, object = {nPairs = -1542932368, uniquified = 252, pairs = 0x0}, binary = {len = -1542932368, data = 0x0}, datetime = { value = 140723060521072, typid = 0, typmod = 0, tz = 4684816}}} (gdb) up #5 0x000000000096707c in jsonb_jsonpath_query (fcinfo=0x13f4cf0) at jsonpath_exec.c:2735 2735 SRF_RETURN_NEXT(funcctx, JsonbPGetDatum(JsonbValueToJsonb(v))); (gdb) print *v $2 = {type = 20938064, val = {numeric = 0x7ffca408b870, boolean = 112, string = {len = -1542932368, val = 0x0}, array = {nElems = -1542932368, elems = 0x0, rawScalar = 16}, object = {nPairs = -1542932368, uniquified = 252, pairs = 0x0}, binary = {len = -1542932368, data = 0x0}, datetime = { value = 140723060521072, typid = 0, typmod = 0, tz = 4684816}}} (gdb) bt full #0 0x00007aa8bd7ddeab in raise () from /lib64/libc.so.6 No symbol table info available. #1 0x00007aa8bd7c85b9 in abort () from /lib64/libc.so.6 No symbol table info available. #2 0x0000000000a34154 in ExceptionalCondition (conditionName=0xc6d888 "!(0)", errorType=0xc6ce18 "FailedAssertion", fileName=0xc6caa0 "json.c", lineNumber=3047) at assert.c:54 No locals. #3 0x00000000009415e7 in JsonEncodeJsonbValue (buf=0x7ffca408b870, jbv=0x7ffca408b830) at json.c:3047 __func__ = "JsonEncodeJsonbValue" #4 0x00000000009416a4 in JsonbValueToJson (jbv=0x7ffca408b830) at json.c:3077 buf = {data = 0x13f7e90 "", len = 0, maxlen = 1024, cursor = 0} json = 0x13f7e68 type = 0 size = 7634563 #5 0x000000000096707c in jsonb_jsonpath_query (fcinfo=0x13f4cf0) at jsonpath_exec.c:2735 rsi = 0x7ffca408b9c0 funcctx = 0x1352708 found = 0x13528e0 v = 0x7ffca408b830 c = 0x13528b8 #6 0x00000000009670bb in json_jsonpath_query2 (fcinfo=0x13f4cf0) at jsonpath_exec.c:2741 No locals. #7 0x00000000006e1c18 in ExecMakeFunctionResultSet (fcache=0x13f4c80, econtext=0x13f41b8, argContext=0x13f5d40, isNull=0x13f4be0, isDone=0x13f4c60) at execSRF.c:604 arguments = 0x13f5970 result = 20938064 fcinfo = 0x13f4cf0 fcusage = {fs = 0x0, save_f_total_time = {tv_sec = 20923840, tv_nsec = 0}, save_total = {tv_sec = 20921648, tv_nsec = 140723060521568}, f_start = {tv_sec = 7398875, tv_nsec = 114}} rsinfo = {type = T_ReturnSetInfo, econtext = 0x13f41b8, expectedDesc = 0x13fe1f0, allowedModes = 3, returnMode = SFRM_ValuePerCall, isDone = ExprMultipleResult, setResult = 0x0, setDesc = 0x0} callit = true i = 2 __func__ = "ExecMakeFunctionResultSet" #8 0x000000000070d858 in ExecProjectSRF (node=0x13f40a0, continuing=false) at nodeProjectSet.c:175 elem = 0x13f4c80 isdone = 0x13f4c60 result = 0x13f4bd8 isnull = 0x13f4be0 resultSlot = 0x13f4b80 econtext = 0x13f41b8 oldcontext = 0x13f3d30 hassrf = false hasresult = false argno = 0 #9 0x000000000070d715 in ExecProjectSet (pstate=0x13f40a0) at nodeProjectSet.c:105 node = 0x13f40a0 outerTupleSlot = 0x13f44c0 resultSlot = 0x8bb308 outerPlan = 0x13f42b0 econtext = 0x13f41b8 #10 0x00000000006dee78 in ExecProcNodeFirst (node=0x13f40a0) at execProcnode.c:445 No locals. #11 0x00000000006d3e56 in ExecProcNode (node=0x13f40a0) at ../../../src/include/executor/executor.h:237 No locals. #12 0x00000000006d66fa in ExecutePlan (estate=0x13f3e48, planstate=0x13f40a0, use_parallel_mode=false, operation=CMD_SELECT, sendTuples=true, numberTuples=0, direction=ForwardScanDirection, dest=0x13fa1b0, execute_once=true) at execMain.c:1707 slot = 0x1397348 current_tuple_count = 0 #13 0x00000000006d447d in standard_ExecutorRun (queryDesc=0x1353768, direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:364 estate = 0x13f3e48 operation = CMD_SELECT dest = 0x13fa1b0 sendTuples = true oldcontext = 0x1353650 __func__ = "standard_ExecutorRun" #14 0x00000000006d42ab in ExecutorRun (queryDesc=0x1353768, direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:307 No locals. #15 0x00000000008be5ff in PortalRunSelect (portal=0x1397348, forward=true, count=0, dest=0x13fa1b0) at pquery.c:932 queryDesc = 0x1353768 direction = ForwardScanDirection nprocessed = 140723060522208 __func__ = "PortalRunSelect" #16 0x00000000008be2a4 in PortalRun (portal=0x1397348, count=9223372036854775807, isTopLevel=true, run_once=true, dest=0x13fa1b0, altdest=0x13fa1b0, completionTag=0x7ffca408be70 "") at pquery.c:773 save_exception_stack = 0x7ffca408bfb0 save_context_stack = 0x0 local_sigjmp_buf = {{__jmpbuf = {0, 3529150028062792428, 4684816, 140723060524240, 0, 0, 3529150027981003500, -3529900415750235412}, __mask_was_saved = 0, __saved_mask = {__val = {128, 20121120, 64, 20264936, 15304, 20264528, 20946272, 140723060522496, 10934220, 20553864, 112, ---Type to continue, or q to quit--- 20947488, 112, 2, 20947376, 20121120}}}} result = false nprocessed = 0 saveTopTransactionResourceOwner = 0x1362738 saveTopTransactionContext = 0x13b43c0 saveActivePortal = 0x0 saveResourceOwner = 0x1362738 savePortalContext = 0x0 saveMemoryContext = 0x13b43c0 __func__ = "PortalRun" #17 0x00000000008b8271 in exec_simple_query (query_string=0x1330738 "select json '{}' @* 'lax $[0]';") at postgres.c:1215 parsetree = 0x1331610 portal = 0x1397348 snapshot_set = true commandTag = 0xc5a975 "SELECT" completionTag = "\000\000\000\000\002\000\000\000\b\342\244", '\000' , "P\v3\001\037\000\000\000\300\276\b\244\374\177\000\000\070\351\244\000\000\000\000\000B", '\000' querytree_list = 0x13f24c8 plantree_list = 0x13fa178 receiver = 0x13fa1b0 format = 0 dest = DestRemote oldcontext = 0x13b43c0 parsetree_list = 0x1331670 parsetree_item = 0x1331648 save_log_statement_stats = false was_logged = false use_implicit_block = false msec_str = "\000\277\b\244\374\177\000\000\022\270\244\000\000\000\000\000\006\000\000\000\037\000\000\000\070\a3\001\000\000\000" __func__ = "exec_simple_query" #18 0x00000000008bc580 in PostgresMain (argc=1, argv=0x135bab0, dbname=0x135b820 "regression", username=0x132d028 "user") at postgres.c:4243 query_string = 0x1330738 "select json '{}' @* 'lax $[0]';" firstchar = 81 input_message = {data = 0x1330738 "select json '{}' @* 'lax $[0]';", len = 32, maxlen = 1024, cursor = 32} local_sigjmp_buf = {{__jmpbuf = {0, 3529150027347663596, 4684816, 140723060524240, 0, 0, 3529150028098444012, -3529900414674527508}, __mask_was_saved = 1, __saved_mask = {__val = {0, 20126752, 1024, 20121120, 0, 0, 10888111, 1024, 20126776, 140723060523136, 10892266, 20126776, 20121120, 30084897848, 20126776, 20126752}}}} send_ready_for_query = false disable_idle_in_transaction_timeout = false __func__ = "PostgresMain" #19 0x0000000000819f7a in BackendRun (port=0x1354940) at postmaster.c:4377 av = 0x135bab0 maxac = 2 ac = 1 i = 1 __func__ = "BackendRun" #20 0x0000000000819748 in BackendStartup (port=0x1354940) at postmaster.c:4068 bn = 0x1354590 pid = 0 __func__ = "BackendStartup" #21 0x0000000000815c60 in ServerLoop () at postmaster.c:1700 port = 0x1354940 i = 0 rmask = {fds_bits = {16, 0 }} selres = 1 now = 1541640685 readmask = {fds_bits = {16, 0 }} nSockets = 5 last_lockfile_recheck_time = 1541640684 last_touch_time = 1541640684 __func__ = "ServerLoop" #22 0x000000000081550c in PostmasterMain (argc=8, argv=0x132aeb0) at postmaster.c:1373 opt = -1 status = 0 userDoption = 0x134d120 "/home/user/work/postgres/src/test/regress/./tmp_check/data" listen_addr_saved = false i = 64 output_config_variable = 0x0 __func__ = "PostmasterMain" #23 0x000000000073ebba in main (argc=8, argv=0x132aeb0) at main.c:228 do_check_root = true