pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Yura Sokolov <y.sokolov@postgrespro.ru>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Reducing the chunk header sizes on all memory context types
Date: Mon, 29 Aug 2022 10:55:42 -0400
Message-ID: <3201943.1661784942@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1LGx6WW4UPn5-h4KhRCP_NLbNih+si1vpA6KU8TvHgung@mail.gmail.com>
References: <CAApHDvpjauCRXcgcaL6+e3eqecEHoeRm9D-kcbuvBitgPnW=vw@mail.gmail.com>
	<9dec1bd42fed3e263de294116380e5b51c427267.camel@postgrespro.ru>
	<20220712174404.polbc5it7j6mzmql@awork3.anarazel.de>
	<CAApHDvo+R56uR7Hd9d7f6+EKEeXs8azsshrAgL9HOsnj7K4-YA@mail.gmail.com>
	<CAApHDvrrYfcCXfuc_bZ0xsqBP8U62Y0i27agr9Qt-2geE_rv0Q@mail.gmail.com>
	<CA+TgmoZcHxSZRN1HhHKT-g=FBk2THH60zy1sK3YwB6cB4EQqtQ@mail.gmail.com>
	<20220809184410.g6yzu6pvttuphag5@awork3.anarazel.de>
	<CAApHDvq8Mn8EiK_giG3TQ_=bgzSBvsWTi0KkY0Zv4RrA1kjRQQ@mail.gmail.com>
	<CAApHDvrVppH=3NKzhD0v1XkHyWiT+DkdfOdnQPo=BgauVcL7fw@mail.gmail.com>
	<CAApHDvpuhcPWCzkXZuQQgB8YjPNQSvnncbzZ6pwpHFr2QMMD2w@mail.gmail.com>
	<CAApHDvrCkmvdcnyGBtxq6D8FfM50UiunN3qJquTBwOdUqoKYvg@mail.gmail.com>
	<CAApHDvo3ZaWQNO2AKYiH8y3oGKxWfa2EAkZz9peGBnXvZe2hvA@mail.gmail.com>
	<CAApHDvrbd3y4QxRANd7oFZBXVJ7ZmwUjxSYDLFEMOZY8uyQzRg@mail.gmail.com>
	<CAApHDvrvWMqB6kR-=6qz7n+Jb4Et8VkfnOufwKKLDz5kOm=AEA@mail.gmail.com>
	<CAApHDvociYOk=OTxw0XmO9BR38Covk13M_wg8nt8N7aySW! KbLw@mail.gmail.com>
	<3137572.1661780863@sss.pgh.pa.us>
	<CAA4eK1LGx6WW4UPn5-h4KhRCP_NLbNih+si1vpA6KU8TvHgung@mail.gmail.com>

Amit Kapila <amit.kapila16@gmail.com> 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=conditionName@entry=0x745110 "pointer == (void *) MAXALIGN(pointer)", errorType=errorType@entry=0x5d18d0 "FailedAssertion", 
    fileName=fileName@entry=0x7450dc "../../../../src/include/utils/memutils_internal.h", lineNumber=lineNumber@entry=120) at assert.c:69
No locals.
#3  0x005a0d90 in GetMemoryChunkMethodID (pointer=<optimized out>)
    at ../../../../src/include/utils/memutils_internal.h:120
        header = <optimized out>
#4  0x005a231c in GetMemoryChunkMethodID (pointer=<optimized out>)
    at ../../../../src/include/utils/memutils_internal.h:119
        header = <optimized out>
        header = <optimized out>
#5  pfree (pointer=<optimized out>) at mcxt.c:1242
No locals.
#6  0x003c8fdc in ReorderBufferCleanupTXN (rb=0x7450dc, rb@entry=0x1f, 
    txn=0x745110, txn@entry=0xe1f800) at reorderbuffer.c:1493
        change = <optimized out>
        found = false
        iter = {cur = <optimized out>, next = 0xddcb18, end = 0xde4e64}
#7  0x003ca968 in ReorderBufferProcessTXN (rb=0x1f, rb@entry=0xe1f800, 
    txn=0xe1f800, commit_lsn=<optimized out>, snapshot_now=<optimized out>, 
    command_id=<optimized out>, streaming=false) at reorderbuffer.c:2514
        change = 0x0
        _save_exception_stack = 0x0
        _save_context_stack = 0x1
        _local_sigjmp_buf = {{__jmpbuf = {-552117431, 1640676937, -1092521468, 
              14569068, 14569068, 14568932, 729, 0, 228514434, 166497, 0, 
              8195960, 8196088, 7, 0 <repeats 13 times>, 13847224, 0, 196628, 
              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 = 0, __saved_mask = {__val = {64, 
                7242472, 14740696, 7244624, 14809088, 14741512, 5, 14740696, 
                7244624, 7245864, 3982844, 14542436, 0, 14809092, 0, 26303888, 
                729, 14569112, 14809092, 7242472, 729, 14741512, 32, 14809088, 
                0, 228514434, 166497, 0, 0, 26303888, 3980968, 0}}}}
        _do_rethrow = <optimized out>
        using_subtxn = 228
        ccxt = 0x7aae68 <my_wait_event_info>
        iterstate = 0x0
        prev_lsn = 26303888
        specinsert = 0x0
        stream_started = false
        curtxn = 0x0
        __func__ = "ReorderBufferProcessTXN"
#8  0x003cb460 in ReorderBufferReplay (txn=<optimized out>, 
    rb=rb@entry=0xe1f800, commit_lsn=<optimized out>, end_lsn=<optimized out>, 
    commit_time=715099169882112, origin_id=0, origin_lsn=0, xid=729)
    at reorderbuffer.c:2641
        snapshot_now = <optimized out>
#9  0x003cbedc in ReorderBufferCommit (rb=rb@entry=0xe1f800, 
    xid=xid@entry=729, commit_lsn=<optimized out>, end_lsn=<optimized out>, 
    commit_time=<optimized out>, commit_time@entry=715099398396546, 
    origin_id=<optimized out>, origin_id@entry=0, origin_lsn=0, 
    origin_lsn@entry=5906902891454464) at reorderbuffer.c:2665
        txn = <optimized out>
#10 0x003bb19c in DecodeCommit (two_phase=false, xid=729, parsed=0xbee17478, 
    buf=<optimized out>, ctx=0xe1d7f8) at decode.c:682
        origin_lsn = <optimized out>
        commit_time = <optimized out>
        origin_id = 0
        i = <optimized out>
        origin_lsn = <optimized out>
        commit_time = <optimized out>
        origin_id = <optimized out>
        i = <optimized out>
#11 xact_decode (ctx=0xe1d7f8, buf=<optimized out>) at decode.c:216
        xlrec = <optimized out>
        parsed = {xact_time = 715099398396546, xinfo = 73, dbId = 16384, 
          tsId = 1663, nsubxacts = 0, subxacts = 0x0, nrels = 0, 
          xlocators = 0x0, nstats = 0, stats = 0x0, nmsgs = 70, 
          msgs = 0xe2b828, twophase_xid = 0, 
          twophase_gid = '\000' <repeats 199 times>, nabortrels = 0, 
          abortlocators = 0x0, nabortstats = 0, abortstats = 0x0, 
          origin_lsn = 0, origin_timestamp = 0}
        xid = <optimized out>
        two_phase = false
        builder = <optimized out>
        reorder = <optimized out>
        r = <optimized out>
        info = <optimized out>
        __func__ = "xact_decode"
#12 0x003babf0 in LogicalDecodingProcessRecord (ctx=ctx@entry=0xe1d7f8, 
    record=0xe1dad0) at decode.c:119
        buf = {origptr = 26303888, endptr = 26305088, record = 0xe1dad0}
        txid = <optimized out>
        rmgr = <optimized out>
#13 0x003c0390 in pg_logical_slot_get_changes_guts (fcinfo=0x0, 
    confirm=<optimized out>, binary=<optimized out>) at logicalfuncs.c:271
        record = <optimized out>
        errm = 0x0
        _save_exception_stack = 0xd60380
        _save_context_stack = 0x1
        _local_sigjmp_buf = {{__jmpbuf = {-552117223, 1640638557, 4, 14770368, 
              -1092519792, -1, 14770320, 8, 1, 14691520, 0, 8195960, 8196088, 
              7, 0 <repeats 12 times>, 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, 3399100, 
              0, 5904972, 8112272, -1, 14591624, -1375937000, -1375937248, 
              14591376}, __mask_was_saved = 0, __saved_mask = {__val = {
                14530312, 14528852, 2348328335, 14527224, 5699140, 3202447388, 
                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 = <optimized out>
        name = 0xe16090
        upto_lsn = 3933972
        upto_nchanges = 14707744
        rsinfo = <optimized out>
        per_query_ctx = <optimized out>
        oldcontext = 0xe06cc0
        end_of_wal = 0
        ctx = 0xe1d7f8
        old_resowner = 0xd35568
        arr = <optimized out>
        ndim = <optimized out>
        options = 0x0
        p = 0xe02cb0
        __func__ = "pg_logical_slot_get_changes_guts"
#14 0x00292864 in ExecMakeTableFunctionResult (setexpr=0xdea9b0, 
    econtext=0xde90a8, argContext=<optimized out>, expectedDesc=0x1, 
    randomAccess=false) at execSRF.c:234
        result = 2590380
        tupstore = 0x0
        tupdesc = 0x0
        funcrettype = 8040208
        returnsTuple = <optimized out>
        returnsSet = 32
        fcinfo = 0xe02cb0
        fcusage = {fs = 0x0, save_f_total_time = {tv_sec = 14592432, 
            tv_nsec = 7093408}, save_total = {tv_sec = 0, tv_nsec = 0}, 
          f_start = {tv_sec = 14767936, tv_nsec = 14767940}}
        rsinfo = {type = T_ReturnSetInfo, econtext = 0xde90a8, 
          expectedDesc = 0xdea7a0, allowedModes = 11, 
          returnMode = SFRM_Materialize, isDone = ExprSingleResult, 
          setResult = 0xe16548, setDesc = 0xe16338}
        tmptup = {t_len = 3, t_self = {ip_blkid = {bi_hi = 0, bi_lo = 0}, 
            ip_posid = 0}, t_tableOid = 0, t_data = 0x3}
        callerContext = 0xdea7a0
        first_time = true
        __func__ = "ExecMakeTableFunctionResult"
... etc ...

Anything ring a bell?

			regards, tom lane





view thread (152+ messages)  latest in thread

Message-ID: <3201943.1661784942@sss.pgh.pa.us>
Permalink:  ../3201943.1661784942@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3201943.1661784942@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, dgrowleyml@gmail.com, andres@anarazel.de, robertmhaas@gmail.com, y.sokolov@postgrespro.ru
  Subject: Re: Reducing the chunk header sizes on all memory context types
  In-Reply-To: <3201943.1661784942@sss.pgh.pa.us>
  References: <CAApHDvpjauCRXcgcaL6+e3eqecEHoeRm9D-kcbuvBitgPnW=vw@mail.gmail.com> <CAApHDvo+R56uR7Hd9d7f6+EKEeXs8azsshrAgL9HOsnj7K4-YA@mail.gmail.com> <CAApHDvrrYfcCXfuc_bZ0xsqBP8U62Y0i27agr9Qt-2geE_rv0Q@mail.gmail.com> <CA+TgmoZcHxSZRN1HhHKT-g=FBk2THH60zy1sK3YwB6cB4EQqtQ@mail.gmail.com> <20220809184410.g6yzu6pvttuphag5@awork3.anarazel.de> <CAApHDvq8Mn8EiK_giG3TQ_=bgzSBvsWTi0KkY0Zv4RrA1kjRQQ@mail.gmail.com> <CAApHDvrVppH=3NKzhD0v1XkHyWiT+DkdfOdnQPo=BgauVcL7fw@mail.gmail.com> <CAApHDvpuhcPWCzkXZuQQgB8YjPNQSvnncbzZ6pwpHFr2QMMD2w@mail.gmail.com> <CAApHDvrCkmvdcnyGBtxq6D8FfM50UiunN3qJquTBwOdUqoKYvg@mail.gmail.com> <CAApHDvo3ZaWQNO2AKYiH8y3oGKxWfa2EAkZz9peGBnXvZe2hvA@mail.gmail.com> <CAApHDvrbd3y4QxRANd7oFZBXVJ7ZmwUjxSYDLFEMOZY8uyQzRg@mail.gmail.com> <CAApHDvrvWMqB6kR-=6qz7n+Jb4Et8VkfnOufwKKLDz5kOm=AEA@mail.gmail.com> <3137572.1661780863@sss.pgh.pa.us> <CAA4eK1LGx6WW4UPn5-h4KhRCP_NLbNih+si1vpA6KU8TvHgung@mail.gmail.com> <3201943.1661784942@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox