Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gKZUc-0004JU-5e for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Nov 2018 01:52:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gKZUa-0000LJ-1d for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Nov 2018 01:52:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gKZUZ-0000L6-Km for pgsql-hackers@lists.postgresql.org; Thu, 08 Nov 2018 01:52:19 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gKZUW-0006xz-Cr for pgsql-hackers@postgresql.org; Thu, 08 Nov 2018 01:52:19 +0000 Received: by mail-wm1-x331.google.com with SMTP id r11-v6so3180153wmb.2 for ; Wed, 07 Nov 2018 17:52:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=aghY4MyqF9rZcget0g7LbA2jmeO+DsQCSpNAhMoECPc=; b=A6fzom+FhG1793ETQdjH0TSqA7fo8YJiZRm5Gc2hai+2tQ2Hw1dN0tYkqXNUZatZLZ 7uVi6oe0tjB98RhVLhqbSEVwY4HOJmvCiErkwhIdJeTh226NFNLa1htfrHFaqnuLHKxU 836QaIglEEw5PEWCsojhfC+6sk5+mz+u+LhAqWcosfeZe4jAl93PvpB4v3vW1MxV8UxW EeGaTgPtzzrV9/oJ+N6bVQQs6vJTBUaQ/19FpWiQoOBYWkaQ0WYaVu0u2+trykCmPYZz 76mFDfW6hLZlb5LOeXQ8gyzb7AY0M4JYlt6mxg4naO4/gV3garlOSCIx7JvzdRM7ezbK xPpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=aghY4MyqF9rZcget0g7LbA2jmeO+DsQCSpNAhMoECPc=; b=aFXg/x+RUYu9ovKQRleXv9C4dGQYDUDWP1LlSorykJGIhhFB8ZAEDHlfnd1hhrmdRE i8vrN9ry5koH4KECXxvscv9cdsjM4UMryO+Ok/vng65X4RcmcvX2PPsIVX93uQRnaLF4 QLgF0Nker741+2KkEdxoTYw3KjxkmLcNq3po+hQbTvYpCSqOTkVVmLK0d7o3WYEyXuyG f+q8SNFtgmuxj33Wj6h+W6w8YyMsxL94Bqg9t95kXahkhdrFJTI4H16OAFlkGQBdQZ0M j6onDI1cvxgWLNODDVfPjgsZIl1H+FJj0bn0DzAr8K6Ohwkc+ZDZ/tC7ug/QwM1ZzJP0 w38g== X-Gm-Message-State: AGRZ1gIkdEpJusXhAqrc58mwTvaDmQqpigiJbkiULnSzdzMOKgkqhPYK Qk3oOs32MwkhUyvqbZrum+eP8g== X-Google-Smtp-Source: AJdET5fpbA99axxioQ/HmiMrUH+6T6LlWrW9xNTHVZudgqkUMpGJt978VPYfrBL3aOPUpDLsu97huA== X-Received: by 2002:a1c:7dd7:: with SMTP id y206-v6mr2102500wmc.78.1541641934596; Wed, 07 Nov 2018 17:52:14 -0800 (PST) Received: from [10.137.2.19] (ip-86-49-251-50.net.upcbroadband.cz. [86.49.251.50]) by smtp.gmail.com with ESMTPSA id g5-v6sm2376847wrw.97.2018.11.07.17.52.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 17:52:13 -0800 (PST) Subject: Re: jsonpath From: Tomas Vondra To: Nikita Glukhov Cc: Michael Paquier , Stas Kelvich , PostgreSQL-development , Thomas Munro , David Steele , Tom Lane , Andrew Dunstan , Alexander Korotkov , Robert Haas , Oleg Bartunov , Pavel Stehule References: <19506.1521524178@sss.pgh.pa.us> <880bcbc6-1dba-cf82-7945-c10528f602c4@postgrespro.ru> <892ae4c4-e549-ab21-c57c-37c5fd47fda0@pgmasters.net> <8dd1cd76-cd4e-9be7-9515-ef0b8b21cb67@postgrespro.ru> <3bc15ece-5219-e4ca-0b5c-fcd2b276aa26@postgrespro.ru> <4e2aaa88-3bbf-6af3-8dad-d5687fbec89f@postgrespro.ru> <42272F2B-16D1-43D6-B22F-273AE1DA6D6B@postgrespro.ru> <715c1c44-9bb9-6b9f-7c59-61b66578f107@postgrespro.ru> <20181002023317.GI11712@paquier.xyz> <063560d8-bc0b-945b-8796-5ba998d79dc6@2ndquadrant.com> <9a175c2d-b0a9-475f-078b-febc185282ff@postgrespro.ru> <86a0e7df-443b-3f20-70b0-655a1f5dcbb2@2ndquadrant.com> Message-ID: <2265b7fe-3b0e-c437-fe15-ac1807319b73@2ndquadrant.com> Date: Thu, 8 Nov 2018 02:52:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <86a0e7df-443b-3f20-70b0-655a1f5dcbb2@2ndquadrant.com> Content-Type: multipart/mixed; boundary="------------441A49DA6E5A0FF05A51E50F" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------441A49DA6E5A0FF05A51E50F Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit On 11/6/18 4:48 PM, Tomas Vondra wrote: > On 11/6/18 3:31 PM, Nikita Glukhov wrote: >> On 29.10.2018 2:20, Tomas Vondra wrote:> >> >> ... >>> >>> 9) It's generally a good idea to make the individual pieces committable >>> separately, but that means e.g. the regression tests have to pass after >>> each patch. At the moment that does not seem to be the case for 0002, >>> see the attached file. I'm running with -DRANDOMIZE_ALLOCATED_MEMORY, >>> not sure if that's related. >> >> This should definitely be a bug in json support, but I can't reproduce >> it simply by defining -DRANDOMIZE_ALLOCATED_MEMORY.  Could you provide >> a stack trace at least? >> > I'll try. > Not sure why you can't reproduce the failures, it's perfectly reproducible for me. For the record, I'm doing this: ./configure --prefix=/home/user/pg-jsonpath --enable-debug --enable-cassert CFLAGS="-O0 -DRANDOMIZE_ALLOCATED_MEMORY" && make -s clean && make -s -j4 && make check After sticking Assert(false) to JsonEncodeJsonbValue (to the default case), I get a failure like this: select json '{}' @* 'lax $[0]'; ! WARNING: unknown jsonb value type: 20938064 ! server closed the connection unexpectedly ! This probably means the server terminated abnormally ! before or while processing the request. ! connection to server was lost The backtrace is attached. My guess is JsonValueListGetList in jsonb_jsonpath_query only does shallow copy instead of copying the pieces into funcctx->multi_call_memory_ctx, so it gets corrupted on subsequent calls. I also attach valgrind report, but I suppose the reported issues are a consequence of the same bug. regard -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --------------441A49DA6E5A0FF05A51E50F Content-Type: text/plain; charset=UTF-8; name="jsonpath-bt.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="jsonpath-bt.txt" (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 --------------441A49DA6E5A0FF05A51E50F Content-Type: text/plain; charset=UTF-8; name="jsonpath-valgrind.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="jsonpath-valgrind.txt" ==4829== Conditional jump or move depends on uninitialised value(s) ==4829== at 0x941E53: JsonbValueToJson (json.c:3063) ==4829== by 0x9678BA: jsonb_jsonpath_query (jsonpath_exec.c:2735) ==4829== by 0x9678F9: json_jsonpath_query2 (jsonpath_exec.c:2741) ==4829== by 0x6E1F4E: ExecMakeFunctionResultSet (execSRF.c:604) ==4829== by 0x70DB8E: ExecProjectSRF (nodeProjectSet.c:175) ==4829== by 0x70DA4B: ExecProjectSet (nodeProjectSet.c:105) ==4829== by 0x6DF1AE: ExecProcNodeFirst (execProcnode.c:445) ==4829== by 0x6D418C: ExecProcNode (executor.h:237) ==4829== by 0x6D6A30: ExecutePlan (execMain.c:1707) ==4829== by 0x6D47B3: standard_ExecutorRun (execMain.c:364) ==4829== by 0x6D45E1: ExecutorRun (execMain.c:307) ==4829== by 0x8BEE3D: PortalRunSelect (pquery.c:932) ==4829== by 0x8BEAE2: PortalRun (pquery.c:773) ==4829== by 0x8B8AAF: exec_simple_query (postgres.c:1215) ==4829== by 0x8BCDBE: PostgresMain (postgres.c:4243) ==4829== by 0x81A2B0: BackendRun (postmaster.c:4377) ==4829== by 0x819A7E: BackendStartup (postmaster.c:4068) ==4829== by 0x815F96: ServerLoop (postmaster.c:1700) ==4829== by 0x815842: PostmasterMain (postmaster.c:1373) ==4829== by 0x73EEF0: main (main.c:228) ==4829== Uninitialised value was created by a stack allocation ==4829== at 0x941E46: JsonbValueToJson (json.c:3059) ==4829== { Memcheck:Cond fun:JsonbValueToJson fun:jsonb_jsonpath_query fun:json_jsonpath_query2 fun:ExecMakeFunctionResultSet fun:ExecProjectSRF fun:ExecProjectSet fun:ExecProcNodeFirst fun:ExecProcNode fun:ExecutePlan fun:standard_ExecutorRun fun:ExecutorRun fun:PortalRunSelect fun:PortalRun fun:exec_simple_query fun:PostgresMain fun:BackendRun fun:BackendStartup fun:ServerLoop fun:PostmasterMain fun:main } ==4829== Conditional jump or move depends on uninitialised value(s) ==4829== at 0x941A7C: JsonEncodeJsonbValue (json.c:2951) ==4829== by 0x941EE2: JsonbValueToJson (json.c:3077) ==4829== by 0x9678BA: jsonb_jsonpath_query (jsonpath_exec.c:2735) ==4829== by 0x9678F9: json_jsonpath_query2 (jsonpath_exec.c:2741) ==4829== by 0x6E1F4E: ExecMakeFunctionResultSet (execSRF.c:604) ==4829== by 0x70DB8E: ExecProjectSRF (nodeProjectSet.c:175) ==4829== by 0x70DA4B: ExecProjectSet (nodeProjectSet.c:105) ==4829== by 0x6DF1AE: ExecProcNodeFirst (execProcnode.c:445) ==4829== by 0x6D418C: ExecProcNode (executor.h:237) ==4829== by 0x6D6A30: ExecutePlan (execMain.c:1707) ==4829== by 0x6D47B3: standard_ExecutorRun (execMain.c:364) ==4829== by 0x6D45E1: ExecutorRun (execMain.c:307) ==4829== by 0x8BEE3D: PortalRunSelect (pquery.c:932) ==4829== by 0x8BEAE2: PortalRun (pquery.c:773) ==4829== by 0x8B8AAF: exec_simple_query (postgres.c:1215) ==4829== by 0x8BCDBE: PostgresMain (postgres.c:4243) ==4829== by 0x81A2B0: BackendRun (postmaster.c:4377) ==4829== by 0x819A7E: BackendStartup (postmaster.c:4068) ==4829== by 0x815F96: ServerLoop (postmaster.c:1700) ==4829== by 0x815842: PostmasterMain (postmaster.c:1373) ==4829== Uninitialised value was created by a stack allocation ==4829== at 0x941A52: JsonEncodeJsonbValue (json.c:2948) ==4829== { Memcheck:Cond fun:JsonEncodeJsonbValue fun:JsonbValueToJson fun:jsonb_jsonpath_query fun:json_jsonpath_query2 fun:ExecMakeFunctionResultSet fun:ExecProjectSRF fun:ExecProjectSet fun:ExecProcNodeFirst fun:ExecProcNode fun:ExecutePlan fun:standard_ExecutorRun fun:ExecutorRun fun:PortalRunSelect fun:PortalRun fun:exec_simple_query fun:PostgresMain fun:BackendRun fun:BackendStartup fun:ServerLoop fun:PostmasterMain } ==4829== Conditional jump or move depends on uninitialised value(s) ==4829== at 0xA9BEF7: adjust_sign (snprintf.c:1436) ==4829== by 0xA9B533: fmtint (snprintf.c:1050) ==4829== by 0xA9A70C: dopr (snprintf.c:614) ==4829== by 0xA99C28: pg_vsnprintf (snprintf.c:195) ==4829== by 0xAA0C48: pvsnprintf (psprintf.c:110) ==4829== by 0x72ACBB: appendStringInfoVA (stringinfo.c:136) ==4829== by 0xA379E0: elog_finish (elog.c:1359) ==4829== by 0x941E0C: JsonEncodeJsonbValue (json.c:3046) ==4829== by 0x941EE2: JsonbValueToJson (json.c:3077) ==4829== by 0x9678BA: jsonb_jsonpath_query (jsonpath_exec.c:2735) ==4829== by 0x9678F9: json_jsonpath_query2 (jsonpath_exec.c:2741) ==4829== by 0x6E1F4E: ExecMakeFunctionResultSet (execSRF.c:604) ==4829== by 0x70DB8E: ExecProjectSRF (nodeProjectSet.c:175) ==4829== by 0x70DA4B: ExecProjectSet (nodeProjectSet.c:105) ==4829== by 0x6DF1AE: ExecProcNodeFirst (execProcnode.c:445) ==4829== by 0x6D418C: ExecProcNode (executor.h:237) ==4829== by 0x6D6A30: ExecutePlan (execMain.c:1707) ==4829== by 0x6D47B3: standard_ExecutorRun (execMain.c:364) ==4829== by 0x6D45E1: ExecutorRun (execMain.c:307) ==4829== by 0x8BEE3D: PortalRunSelect (pquery.c:932) ==4829== Uninitialised value was created by a stack allocation ==4829== at 0x941A52: JsonEncodeJsonbValue (json.c:2948) ==4829== { Memcheck:Cond fun:adjust_sign fun:fmtint fun:dopr fun:pg_vsnprintf fun:pvsnprintf fun:appendStringInfoVA fun:elog_finish fun:JsonEncodeJsonbValue fun:JsonbValueToJson fun:jsonb_jsonpath_query fun:json_jsonpath_query2 fun:ExecMakeFunctionResultSet fun:ExecProjectSRF fun:ExecProjectSet fun:ExecProcNodeFirst fun:ExecProcNode fun:ExecutePlan fun:standard_ExecutorRun fun:ExecutorRun fun:PortalRunSelect } ==4829== Conditional jump or move depends on uninitialised value(s) ==4829== at 0xA9B55B: fmtint (snprintf.c:1059) ==4829== by 0xA9A70C: dopr (snprintf.c:614) ==4829== by 0xA99C28: pg_vsnprintf (snprintf.c:195) ==4829== by 0xAA0C48: pvsnprintf (psprintf.c:110) ==4829== by 0x72ACBB: appendStringInfoVA (stringinfo.c:136) ==4829== by 0xA379E0: elog_finish (elog.c:1359) ==4829== by 0x941E0C: JsonEncodeJsonbValue (json.c:3046) ==4829== by 0x941EE2: JsonbValueToJson (json.c:3077) ==4829== by 0x9678BA: jsonb_jsonpath_query (jsonpath_exec.c:2735) ==4829== by 0x9678F9: json_jsonpath_query2 (jsonpath_exec.c:2741) ==4829== by 0x6E1F4E: ExecMakeFunctionResultSet (execSRF.c:604) ==4829== by 0x70DB8E: ExecProjectSRF (nodeProjectSet.c:175) ==4829== by 0x70DA4B: ExecProjectSet (nodeProjectSet.c:105) ==4829== by 0x6DF1AE: ExecProcNodeFirst (execProcnode.c:445) ==4829== by 0x6D418C: ExecProcNode (executor.h:237) ==4829== by 0x6D6A30: ExecutePlan (execMain.c:1707) ==4829== by 0x6D47B3: standard_ExecutorRun (execMain.c:364) ==4829== by 0x6D45E1: ExecutorRun (execMain.c:307) ==4829== by 0x8BEE3D: PortalRunSelect (pquery.c:932) ==4829== by 0x8BEAE2: PortalRun (pquery.c:773) ==4829== Uninitialised value was created by a stack allocation ==4829== at 0x941A52: JsonEncodeJsonbValue (json.c:2948) ==4829== { Memcheck:Cond fun:fmtint fun:dopr fun:pg_vsnprintf fun:pvsnprintf fun:appendStringInfoVA fun:elog_finish fun:JsonEncodeJsonbValue fun:JsonbValueToJson fun:jsonb_jsonpath_query fun:json_jsonpath_query2 fun:ExecMakeFunctionResultSet fun:ExecProjectSRF fun:ExecProjectSet fun:ExecProcNodeFirst fun:ExecProcNode fun:ExecutePlan fun:standard_ExecutorRun fun:ExecutorRun fun:PortalRunSelect fun:PortalRun } ==4829== Use of uninitialised value of size 8 ==4829== at 0xA9B59B: fmtint (snprintf.c:1066) ==4829== by 0xA9A70C: dopr (snprintf.c:614) ==4829== by 0xA99C28: pg_vsnprintf (snprintf.c:195) ==4829== by 0xAA0C48: pvsnprintf (psprintf.c:110) ==4829== by 0x72ACBB: appendStringInfoVA (stringinfo.c:136) ==4829== by 0xA379E0: elog_finish (elog.c:1359) ==4829== by 0x941E0C: JsonEncodeJsonbValue (json.c:3046) ==4829== by 0x941EE2: JsonbValueToJson (json.c:3077) ==4829== by 0x9678BA: jsonb_jsonpath_query (jsonpath_exec.c:2735) ==4829== by 0x9678F9: json_jsonpath_query2 (jsonpath_exec.c:2741) ==4829== by 0x6E1F4E: ExecMakeFunctionResultSet (execSRF.c:604) ==4829== by 0x70DB8E: ExecProjectSRF (nodeProjectSet.c:175) ==4829== by 0x70DA4B: ExecProjectSet (nodeProjectSet.c:105) ==4829== by 0x6DF1AE: ExecProcNodeFirst (execProcnode.c:445) ==4829== by 0x6D418C: ExecProcNode (executor.h:237) ==4829== by 0x6D6A30: ExecutePlan (execMain.c:1707) ==4829== by 0x6D47B3: standard_ExecutorRun (execMain.c:364) ==4829== by 0x6D45E1: ExecutorRun (execMain.c:307) ==4829== by 0x8BEE3D: PortalRunSelect (pquery.c:932) ==4829== by 0x8BEAE2: PortalRun (pquery.c:773) ==4829== Uninitialised value was created by a stack allocation ==4829== at 0x941A52: JsonEncodeJsonbValue (json.c:2948) ==4829== { Memcheck:Value8 fun:fmtint fun:dopr fun:pg_vsnprintf fun:pvsnprintf fun:appendStringInfoVA fun:elog_finish fun:JsonEncodeJsonbValue fun:JsonbValueToJson fun:jsonb_jsonpath_query fun:json_jsonpath_query2 fun:ExecMakeFunctionResultSet fun:ExecProjectSRF fun:ExecProjectSet fun:ExecProcNodeFirst fun:ExecProcNode fun:ExecutePlan fun:standard_ExecutorRun fun:ExecutorRun fun:PortalRunSelect fun:PortalRun } ==4829== Conditional jump or move depends on uninitialised value(s) ==4829== at 0xA9B5B8: fmtint (snprintf.c:1068) ==4829== by 0xA9A70C: dopr (snprintf.c:614) ==4829== by 0xA99C28: pg_vsnprintf (snprintf.c:195) ==4829== by 0xAA0C48: pvsnprintf (psprintf.c:110) ==4829== by 0x72ACBB: appendStringInfoVA (stringinfo.c:136) ==4829== by 0xA379E0: elog_finish (elog.c:1359) ==4829== by 0x941E0C: JsonEncodeJsonbValue (json.c:3046) ==4829== by 0x941EE2: JsonbValueToJson (json.c:3077) ==4829== by 0x9678BA: jsonb_jsonpath_query (jsonpath_exec.c:2735) ==4829== by 0x9678F9: json_jsonpath_query2 (jsonpath_exec.c:2741) ==4829== by 0x6E1F4E: ExecMakeFunctionResultSet (execSRF.c:604) ==4829== by 0x70DB8E: ExecProjectSRF (nodeProjectSet.c:175) ==4829== by 0x70DA4B: ExecProjectSet (nodeProjectSet.c:105) ==4829== by 0x6DF1AE: ExecProcNodeFirst (execProcnode.c:445) ==4829== by 0x6D418C: ExecProcNode (executor.h:237) ==4829== by 0x6D6A30: ExecutePlan (execMain.c:1707) ==4829== by 0x6D47B3: standard_ExecutorRun (execMain.c:364) ==4829== by 0x6D45E1: ExecutorRun (execMain.c:307) ==4829== by 0x8BEE3D: PortalRunSelect (pquery.c:932) ==4829== by 0x8BEAE2: PortalRun (pquery.c:773) ==4829== Uninitialised value was created by a stack allocation ==4829== at 0x941A52: JsonEncodeJsonbValue (json.c:2948) ==4829== { Memcheck:Cond fun:fmtint fun:dopr fun:pg_vsnprintf fun:pvsnprintf fun:appendStringInfoVA fun:elog_finish fun:JsonEncodeJsonbValue fun:JsonbValueToJson fun:jsonb_jsonpath_query fun:json_jsonpath_query2 fun:ExecMakeFunctionResultSet fun:ExecProjectSRF fun:ExecProjectSet fun:ExecProcNodeFirst fun:ExecProcNode fun:ExecutePlan fun:standard_ExecutorRun fun:ExecutorRun fun:PortalRunSelect fun:PortalRun } --------------441A49DA6E5A0FF05A51E50F--