Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSgB5-0002T8-GM for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Aug 2022 14:55:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oSgB4-0002IR-CS for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Aug 2022 14:55:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSgB4-0002II-1l for pgsql-hackers@lists.postgresql.org; Mon, 29 Aug 2022 14:55:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSgB1-0005TT-MA for pgsql-hackers@lists.postgresql.org; Mon, 29 Aug 2022 14:55:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 27TEtg0R3201944; Mon, 29 Aug 2022 10:55:42 -0400 From: Tom Lane To: Amit Kapila cc: David Rowley , Andres Freund , Robert Haas , Yura Sokolov , PostgreSQL Developers Subject: Re: Reducing the chunk header sizes on all memory context types In-reply-to: References: <9dec1bd42fed3e263de294116380e5b51c427267.camel@postgrespro.ru> <20220712174404.polbc5it7j6mzmql@awork3.anarazel.de> <20220809184410.g6yzu6pvttuphag5@awork3.anarazel.de> <3137572.1661780863@sss.pgh.pa.us> Comments: In-reply-to Amit Kapila message dated "Mon, 29 Aug 2022 19:32:22 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3201942.1661784942.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 29 Aug 2022 10:55:42 -0400 Message-ID: <3201943.1661784942@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Amit Kapila writes: > Yeah, I also thought that way but couldn't find a reason. I think if > David is able to reproduce it on one of his systems then he can try > locally reverting both the commits one by one. It seems to repro easily on any 32-bit platform. Aside from the buildfarm results, I've now duplicated it on 32-bit ARM (which eliminates the possibility that it's big-endian specific). "bt full" from the first crash gives #0 0xb6d7126c in raise () from /lib/libc.so.6 No symbol table info available. #1 0xb6d5c360 in abort () from /lib/libc.so.6 No symbol table info available. #2 0x00572430 in ExceptionalCondition ( conditionName=3DconditionName@entry=3D0x745110 "pointer =3D=3D (void *= ) MAXALIGN(pointer)", errorType=3DerrorType@entry=3D0x5d18d0 "FailedAssert= ion", = fileName=3DfileName@entry=3D0x7450dc "../../../../src/include/utils/me= mutils_internal.h", lineNumber=3DlineNumber@entry=3D120) at assert.c:69 No locals. #3 0x005a0d90 in GetMemoryChunkMethodID (pointer=3D) at ../../../../src/include/utils/memutils_internal.h:120 header =3D #4 0x005a231c in GetMemoryChunkMethodID (pointer=3D) at ../../../../src/include/utils/memutils_internal.h:119 header =3D header =3D #5 pfree (pointer=3D) at mcxt.c:1242 No locals. #6 0x003c8fdc in ReorderBufferCleanupTXN (rb=3D0x7450dc, rb@entry=3D0x1f,= = txn=3D0x745110, txn@entry=3D0xe1f800) at reorderbuffer.c:1493 change =3D found =3D false iter =3D {cur =3D , next =3D 0xddcb18, end =3D 0xde= 4e64} #7 0x003ca968 in ReorderBufferProcessTXN (rb=3D0x1f, rb@entry=3D0xe1f800,= = txn=3D0xe1f800, commit_lsn=3D, snapshot_now=3D, = command_id=3D, streaming=3Dfalse) at reorderbuffer.c:25= 14 change =3D 0x0 _save_exception_stack =3D 0x0 _save_context_stack =3D 0x1 _local_sigjmp_buf =3D {{__jmpbuf =3D {-552117431, 1640676937, -109= 2521468, = 14569068, 14569068, 14568932, 729, 0, 228514434, 166497, 0, = 8195960, 8196088, 7, 0 , 13847224, 0, 1966= 28, = 0, 1844909312, 5178548, -1092520644, 13979392, 13979388, = 14801472, 0, 8195960, 8196088, 7, 0, 8108342, 8108468, 1, = 715827883, -1030792151, 0, 8195960, 729, 7, 0, 14809088, = 14809088, 14542436, 0, 26303888, 0, 14568932, 3978796, 156, = 0, = 1, 0}, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D {= 64, = 7242472, 14740696, 7244624, 14809088, 14741512, 5, 1474069= 6, = 7244624, 7245864, 3982844, 14542436, 0, 14809092, 0, 26303= 888, = 729, 14569112, 14809092, 7242472, 729, 14741512, 32, 14809= 088, = 0, 228514434, 166497, 0, 0, 26303888, 3980968, 0}}}} _do_rethrow =3D using_subtxn =3D 228 ccxt =3D 0x7aae68 iterstate =3D 0x0 prev_lsn =3D 26303888 specinsert =3D 0x0 stream_started =3D false curtxn =3D 0x0 __func__ =3D "ReorderBufferProcessTXN" #8 0x003cb460 in ReorderBufferReplay (txn=3D, = rb=3Drb@entry=3D0xe1f800, commit_lsn=3D, end_lsn=3D, = commit_time=3D715099169882112, origin_id=3D0, origin_lsn=3D0, xid=3D72= 9) at reorderbuffer.c:2641 snapshot_now =3D #9 0x003cbedc in ReorderBufferCommit (rb=3Drb@entry=3D0xe1f800, = xid=3Dxid@entry=3D729, commit_lsn=3D, end_lsn=3D, = commit_time=3D, commit_time@entry=3D715099398396546, = origin_id=3D, origin_id@entry=3D0, origin_lsn=3D0, = origin_lsn@entry=3D5906902891454464) at reorderbuffer.c:2665 txn =3D #10 0x003bb19c in DecodeCommit (two_phase=3Dfalse, xid=3D729, parsed=3D0xb= ee17478, = buf=3D, ctx=3D0xe1d7f8) at decode.c:682 origin_lsn =3D commit_time =3D origin_id =3D 0 i =3D origin_lsn =3D commit_time =3D origin_id =3D i =3D #11 xact_decode (ctx=3D0xe1d7f8, buf=3D) at decode.c:216 xlrec =3D parsed =3D {xact_time =3D 715099398396546, xinfo =3D 73, dbId =3D = 16384, = tsId =3D 1663, nsubxacts =3D 0, subxacts =3D 0x0, nrels =3D 0, = xlocators =3D 0x0, nstats =3D 0, stats =3D 0x0, nmsgs =3D 70, = msgs =3D 0xe2b828, twophase_xid =3D 0, = twophase_gid =3D '\000' , nabortrels =3D 0, = abortlocators =3D 0x0, nabortstats =3D 0, abortstats =3D 0x0, = origin_lsn =3D 0, origin_timestamp =3D 0} xid =3D two_phase =3D false builder =3D reorder =3D r =3D info =3D __func__ =3D "xact_decode" #12 0x003babf0 in LogicalDecodingProcessRecord (ctx=3Dctx@entry=3D0xe1d7f8= , = record=3D0xe1dad0) at decode.c:119 buf =3D {origptr =3D 26303888, endptr =3D 26305088, record =3D 0xe= 1dad0} txid =3D rmgr =3D #13 0x003c0390 in pg_logical_slot_get_changes_guts (fcinfo=3D0x0, = confirm=3D, binary=3D) at logicalfuncs.c= :271 record =3D errm =3D 0x0 _save_exception_stack =3D 0xd60380 _save_context_stack =3D 0x1 _local_sigjmp_buf =3D {{__jmpbuf =3D {-552117223, 1640638557, 4, 1= 4770368, = -1092519792, -1, 14770320, 8, 1, 14691520, 0, 8195960, 81960= 88, = 7, 0 , 3398864, 0, 13849464, 13848680, = 14650600, 3399100, 4, 3125412, 0, 144, 0, 0, 8192, 7616300, = 0, = 1576, 7616452, 14585296, 8192, 7616300, 14651128, 0, 0, = 14651128, -1092519880, 3398864, 0, 13849464, 13848680, 33991= 00, = 0, 5904972, 8112272, -1, 14591624, -1375937000, -1375937248,= = 14591376}, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D= { 14530312, 14528852, 2348328335, 14527224, 5699140, 3202447= 388, = 4, 14527080, 5699156, 14530312, 5769228, 2918792552, 0, 0,= 0, = 14767888, 3067834868, 14591600, 13824008, 1023, 3068719720= , 1, = 184, 14589688, 14586024, 14587400, 14691504, 14586024, = 14585752, 14586200, 2615480, 8112268}}}} _do_rethrow =3D name =3D 0xe16090 upto_lsn =3D 3933972 upto_nchanges =3D 14707744 rsinfo =3D per_query_ctx =3D oldcontext =3D 0xe06cc0 end_of_wal =3D 0 ctx =3D 0xe1d7f8 old_resowner =3D 0xd35568 arr =3D ndim =3D options =3D 0x0 p =3D 0xe02cb0 __func__ =3D "pg_logical_slot_get_changes_guts" #14 0x00292864 in ExecMakeTableFunctionResult (setexpr=3D0xdea9b0, = econtext=3D0xde90a8, argContext=3D, expectedDesc=3D0x1,= = randomAccess=3Dfalse) at execSRF.c:234 result =3D 2590380 tupstore =3D 0x0 tupdesc =3D 0x0 funcrettype =3D 8040208 returnsTuple =3D returnsSet =3D 32 fcinfo =3D 0xe02cb0 fcusage =3D {fs =3D 0x0, save_f_total_time =3D {tv_sec =3D 1459243= 2, = tv_nsec =3D 7093408}, save_total =3D {tv_sec =3D 0, tv_nsec =3D= 0}, = f_start =3D {tv_sec =3D 14767936, tv_nsec =3D 14767940}} rsinfo =3D {type =3D T_ReturnSetInfo, econtext =3D 0xde90a8, = expectedDesc =3D 0xdea7a0, allowedModes =3D 11, = returnMode =3D SFRM_Materialize, isDone =3D ExprSingleResult, = setResult =3D 0xe16548, setDesc =3D 0xe16338} tmptup =3D {t_len =3D 3, t_self =3D {ip_blkid =3D {bi_hi =3D 0, bi= _lo =3D 0}, = ip_posid =3D 0}, t_tableOid =3D 0, t_data =3D 0x3} callerContext =3D 0xdea7a0 first_time =3D true __func__ =3D "ExecMakeTableFunctionResult" ... etc ... Anything ring a bell? regards, tom lane