Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YzFVu-0004xV-CQ for pgsql-committers@arkaria.postgresql.org; Mon, 01 Jun 2015 02:31:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YzFVs-0004IE-MB for pgsql-committers@arkaria.postgresql.org; Mon, 01 Jun 2015 02:31:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YzFVs-0004I7-16 for pgsql-committers@postgresql.org; Mon, 01 Jun 2015 02:31:40 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YzFVj-0005Yc-S8 for pgsql-committers@postgresql.org; Mon, 01 Jun 2015 02:31:38 +0000 Received: from mfilter4-d.gandi.net (mfilter4-d.gandi.net [217.70.178.134]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 42B84FB87E; Mon, 1 Jun 2015 04:31:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter4-d.gandi.net Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by mfilter4-d.gandi.net (mfilter4-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id J-wWWXWyFP8G; Mon, 1 Jun 2015 04:31:28 +0200 (CEST) X-Originating-IP: 98.122.164.227 Received: from [192.168.10.146] (unknown [98.122.164.227]) (Authenticated sender: adsend@dunslane.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 05745FB86F; Mon, 1 Jun 2015 04:31:27 +0200 (CEST) Message-ID: <556BC3FE.2020105@dunslane.net> Date: Sun, 31 May 2015 22:31:26 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-committers@postgresql.org Subject: Re: pgsql: Rename jsonb_replace to jsonb_set and allow it to add new values References: <4442.1433122849@sss.pgh.pa.us> <556BBA3C.4020406@dunslane.net> <5085.1433124399@sss.pgh.pa.us> <14012.1433125059@sss.pgh.pa.us> In-Reply-To: <14012.1433125059@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 05/31/2015 10:17 PM, Tom Lane wrote: > I wrote: >> Some of the other machines are showing crashes, not just minor output >> diffs. > I tried HEAD on two different machines, and they are both showing Assert > failures here: > > (gdb) bt > #0 0x000000341ce32625 in raise () from /lib64/libc.so.6 > #1 0x000000341ce33e05 in abort () from /lib64/libc.so.6 > #2 0x00000000007b18f9 in ExceptionalCondition ( > conditionName=, errorType=, > fileName=, lineNumber=) > at assert.c:54 > #3 0x000000000072bd2b in pushJsonbValueScalar (pstate=0x7fff149ec388, > seq=, scalarVal=0x7fff149ec280) at jsonb_util.c:584 > #4 0x000000000072c0f7 in pushJsonbValue (pstate=0x7fff149ec388, > seq=, jbval=) at jsonb_util.c:528 > #5 0x000000000072e1a3 in setPathObject (it=0x7fff149ec390, > path_elems=0x201f9c8, path_nulls=0x201f9e8 "", path_len=1, > st=0x7fff149ec388, level=0, newval=0x1fe9628, create=1 '\001') > at jsonfuncs.c:3724 > #6 setPath (it=0x7fff149ec390, path_elems=0x201f9c8, path_nulls=0x201f9e8 "", > path_len=1, st=0x7fff149ec388, level=0, newval=0x1fe9628, create=1 '\001') > at jsonfuncs.c:3682 > #7 0x000000000072e912 in jsonb_set (fcinfo=) > at jsonfuncs.c:3486 > #8 0x00000000005d0769 in ExecMakeFunctionResultNoSets (fcache=0x1feacc0, > econtext=0x1feb690, isNull=0x7fff149ec4bf "", isDone=) > at execQual.c:2018 > #9 0x00000000005d12cf in ExecEvalFunc (fcache=0x1feacc0, econtext=0x1feb690, > > (gdb) p debug_query_string > $2 = 0x1fa6698 "select jsonb_set('{}','{x}','{\"foo\":123}');" > > (gdb) f 3 > #3 0x000000000072bd2b in pushJsonbValueScalar (pstate=0x7fff149ec388, > seq=, scalarVal=0x7fff149ec280) at jsonb_util.c:584 > 584 Assert(scalarVal->type == jbvString); > (gdb) p *scalarVal > $1 = {type = 33460272, val = {numeric = 0x3400000001, boolean = 1 '\001', > string = {len = 1, val = 0x1fe904c "x"}, array = {nElems = 1, > elems = 0x1fe904c, rawScalar = 0 '\000'}, object = {nPairs = 1, > pairs = 0x1fe904c}, binary = {len = 1, data = 0x1fe904c}}} > > Looks like something is forgetting to initialize the type field. Aha! I fixed a bug regarding that recently, and now I can't find the fix. But that gives me enough clues to be able to fix it, thanks. cheers andrew -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers