Hi Tomas,

Just noted that this query crash the server. Execute it in the
regression database:

"""
update brintest_multi set inetcol = '192.168.204.50/0'::inet;
"""

Attached is the backtrace. Let me know if you need something else to
track it.

-- 
Jaime Casanova
Director de Servicios Profesionales
SystemGuards - Consultores de PostgreSQL
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        set = {__val = {4194304, 140730302333136, 2, 6, 6666435, 
94894241509376, 
            4611686018427388799, 140219046775462, 0, 281470681751456, 0, 0, 0, 
0, 0, 0}}
        pid = <optimized out>
        tid = <optimized out>
        ret = <optimized out>
#1  0x00007f874a40f535 in __GI_abort () at abort.c:79
        save_stage = 1
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, 
sa_mask = {__val = {
              0, 0, 0, 0, 0, 140219044532213, 2, 7292513299284754848, 
7003713384994060596, 
              94894241509376, 7003719963994494672, 0, 3387215930523559936, 
140730302333376, 0, 
              140730302334240}}, sa_flags = 1234071552, sa_restorer = 0x0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x0000564e49f91849 in ExceptionalCondition (
    conditionName=0x564e4a00f6e4 "(delta >= 0) && (delta <= 1)", 
    errorType=0x564e4a00ef74 "FailedAssertion", fileName=0x564e4a00ef60 
"brin_minmax_multi.c", 
    lineNumber=2368) at assert.c:69
No locals.
#3  0x0000564e498f16db in brin_minmax_multi_distance_inet 
(fcinfo=0x7ffe53ae05c0)
    at brin_minmax_multi.c:2368
        delta = -1.1641532182693481e-08
        i = -1
        len = 4
        addra = 0x564e4b6ee950 ""
        addrb = 0x564e4b6ee970 ""
        ipa = 0x564e4b6c8828
        ipb = 0x564e4b6c5a78
        lena = 0
        lenb = 0
#4  0x0000564e49f9bcc4 in FunctionCall2Coll (flinfo=0x564e4b60c640, 
collation=0, 
    arg1=94894272841768, arg2=94894272830072) at fmgr.c:1160
        fcinfodata = {fcinfo = {flinfo = 0x564e4b60c640, context = 0x0, 
resultinfo = 0x0, 
            fncollation = 0, isnull = false, nargs = 2, args = 0x7ffe53ae05e0}, 
          fcinfo_data = "@\306`KNV", '\000' <repeats 24 times>, 
"\002\000(\210lKNV\000\000\000\000\000\000\000\000\000\000xZlKNV\000\000\000\350nKNV\000"}
        fcinfo = 0x7ffe53ae05c0
        result = 94894272996608
        __func__ = "FunctionCall2Coll"
#5  0x0000564e498ef621 in build_distances (distanceFn=0x564e4b60c640, 
colloid=0, 
    eranges=0x564e4b6ee620, neranges=11) at brin_minmax_multi.c:1352
        a1 = 94894272841768
        a2 = 94894272830072
        r = 94894241543955
        i = 0
        ndistances = 10
        distances = 0x564e4b6ee838
#6  0x0000564e498f0199 in compactify_ranges (bdesc=0x564e4b60ca58, 
ranges=0x564e4b6da6c0, 
    max_values=32) at brin_minmax_multi.c:1822
        cmpFn = 0x564e4b60c678
        distanceFn = 0x564e4b60c640
        eranges = 0x564e4b6ee620
        neranges = 11
        distances = 0x564e00000008
        ctx = 0x564e4b6ee500
        oldctx = 0x564e4b6c4b80
#7  0x0000564e498f1735 in brin_minmax_multi_serialize (bdesc=0x564e4b60ca58, 
src=94894272915136, 
    dst=0x564e4b6c5030) at brin_minmax_multi.c:2386
        ranges = 0x564e4b6da6c0
        s = 0x564e4b6c6110
#8  0x0000564e498f795b in brin_form_tuple (brdesc=0x564e4b60ca58, blkno=0, 
tuple=0x564e4b6c4ca0, 
    size=0x7ffe53ae0858) at brin_tuple.c:165
        datumno = 1
        values = 0x564e4b6c5298
        nulls = 0x564e4b6c5ad0
        anynulls = true
        rettuple = 0x741231600
        keyno = 9
        idxattno = 9
        phony_infomask = 0
        phony_nullbitmap = 0x564e4b6c5b28 "\177\177\177~\177\177\177\177"
        len = 94894241579157
        hoff = 1024
        data_len = 94894272830256
        i = 32766
        untoasted_values = 0x564e4b6c53b0
        nuntoasted = 0
#9  0x0000564e498e79d1 in brininsert (idxRel=0x7f87412316b0, 
values=0x7ffe53ae09b0, 
    nulls=0x7ffe53ae0990, heaptid=0x564e4b6b49d0, heapRel=0x7f874122f288, 
    checkUnique=UNIQUE_CHECK_NO, indexUnchanged=false, 
indexInfo=0x564e4b6b8710) at brin.c:281
        lp = 0x7f8741a3cfb8
        origsz = 952
        newsz = 94894244461288
        page = 0x7f8741a3cf80 ""
        origtup = 0x564e4b6c5b48
        newtup = 0x7ffe53ae0890
        samepage = false
        need_insert = true
        off = 9
        brtup = 0x7f8741a3d108
        dtup = 0x564e4b6c4ca0
        pagesPerRange = 1
        origHeapBlk = 0
        heapBlk = 0
        bdesc = 0x564e4b60ca58
        revmap = 0x564e4b6b8aa8
        buf = 114
        tupcxt = 0x564e4b6c4b80
        oldcxt = 0x564e4b6b2bc0
        autosummarize = false
        __func__ = "brininsert"
#10 0x0000564e49989165 in index_insert (indexRelation=0x7f87412316b0, 
values=0x7ffe53ae09b0, 
    isnull=0x7ffe53ae0990, heap_t_ctid=0x564e4b6b49d0, 
heapRelation=0x7f874122f288, 
    checkUnique=UNIQUE_CHECK_NO, indexUnchanged=false, 
indexInfo=0x564e4b6b8710) at indexam.c:193
        __func__ = "index_insert"
#11 0x0000564e49ba4b23 in ExecInsertIndexTuples (resultRelInfo=0x564e4b6b3168, 
    slot=0x564e4b6b49a0, estate=0x564e4b6b2ce0, update=true, noDupErr=false, 
specConflict=0x0, 
    arbiterIndexes=0x0) at execIndexing.c:416
        applyNoDupErr = false
        checkUnique = UNIQUE_CHECK_NO
        indexRelation = 0x7f87412316b0
        indexInfo = 0x564e4b6b8710
        indexUnchanged = false
        satisfiesConstraint = false
        tupleid = 0x564e4b6b49d0
        result = 0x0
        i = 0
        numIndices = 1
        relationDescs = 0x564e4b6b4bb8
        heapRelation = 0x7f874122f288
        indexInfoArray = 0x564e4b6b86f0
        econtext = 0x564e4b6b8a10
        values = {1005713280000, 800, 800, 8800, 94894272775620, 1065353216, 0, 
94894272775640, 
          94894272775648, 94894272775656, 94894272775663, 7200, 19630000000, 
          18446083844818551616, 18445887828109551616, 94894272775704, 
94894272775720, 
          94894272775732, 94894272775737, 100352, 140730302335664, 
94894242068319, 
          140730302335904, 140730302335900, 0, 94894272418200, 1092824065, 
94894272760224, 
          140730302336114, 140218890121864, 9334784, 94894272775552}
        isnull = {false <repeats 20 times>, 254, 127, false, false, 232, 137, 
107, 75, 78, 86, 
          false, false}
#12 0x0000564e49beeb2a in ExecUpdate (mtstate=0x564e4b6b2f50, 
resultRelInfo=0x564e4b6b3168, 
    tupleid=0x7ffe53ae0c72, oldtuple=0x0, slot=0x564e4b6b49a0, 
planSlot=0x564e4b6b3758, 
    epqstate=0x564e4b6b3038, estate=0x564e4b6b2ce0, canSetTag=true) at 
nodeModifyTable.c:1936
        lockmode = LockTupleNoKeyExclusive
        partition_constraint_failed = false
        update_indexes = true
        resultRelationDesc = 0x7f874122f288
        result = TM_Ok
        tmfd = {ctid = {ip_blkid = {bi_hi = 3040, bi_lo = 21422}, ip_posid = 
32766}, 
          xmax = 1265331384, cmax = 22094, traversed = 136}
        recheckIndexes = 0x0
        __func__ = "ExecUpdate"
#13 0x0000564e49befc5c in ExecModifyTable (pstate=0x564e4b6b2f50) at 
nodeModifyTable.c:2594
        node = 0x564e4b6b2f50
        estate = 0x564e4b6b2ce0
        operation = CMD_UPDATE
        resultRelInfo = 0x564e4b6b3168
        subplanstate = 0x564e4b6b35a8
        slot = 0x564e4b6b49a0
        planSlot = 0x564e4b6b3758
        oldSlot = 0x564e4b6b4788
        tupleid = 0x7ffe53ae0c72
        tuple_ctid = {ip_blkid = {bi_hi = 0, bi_lo = 0}, ip_posid = 30}
        oldtupdata = {t_len = 1265314752, t_self = {ip_blkid = {bi_hi = 22094, 
bi_lo = 0}, 
            ip_posid = 29086}, t_tableOid = 22094, t_data = 0x10000006b}
        oldtuple = 0x0
        proute = 0x0
        relinfos = 0x0
        lc = 0x7ffe53ae0cf0
        __func__ = "ExecModifyTable"
#14 0x0000564e49bb2014 in ExecProcNodeFirst (node=0x564e4b6b2f50) at 
execProcnode.c:463
No locals.
#15 0x0000564e49ba64f4 in ExecProcNode (node=0x564e4b6b2f50)
    at ../../../src/include/executor/executor.h:257
No locals.
#16 0x0000564e49ba8ede in ExecutePlan (estate=0x564e4b6b2ce0, 
planstate=0x564e4b6b2f50, 
    use_parallel_mode=false, operation=CMD_UPDATE, sendTuples=false, 
numberTuples=0, 
    direction=ForwardScanDirection, dest=0x564e4b6b2480, execute_once=true) at 
execMain.c:1551
        slot = 0x564e4b6b2ce0
        current_tuple_count = 0
#17 0x0000564e49ba6b9a in standard_ExecutorRun (queryDesc=0x564e4b6aade0, 
    direction=ForwardScanDirection, count=0, execute_once=true) at 
execMain.c:361
        estate = 0x564e4b6b2ce0
        operation = CMD_UPDATE
        dest = 0x564e4b6b2480
        sendTuples = false
        oldcontext = 0x564e4b6aacc0
        __func__ = "standard_ExecutorRun"
#18 0x0000564e49ba69b0 in ExecutorRun (queryDesc=0x564e4b6aade0, 
direction=ForwardScanDirection, 
    count=0, execute_once=true) at execMain.c:305
No locals.
#19 0x0000564e49dfb366 in ProcessQuery (plan=0x564e4b6b1bc0, 
    sourceText=0x564e4b5e28a0 "update brintest_multi set inetcol = 
'192.168.204.50/0'::inet;", 
    params=0x0, queryEnv=0x0, dest=0x564e4b6b2480, qc=0x7ffe53ae10a0) at 
pquery.c:160
        queryDesc = 0x564e4b6aade0
#20 0x0000564e49dfccf4 in PortalRunMulti (portal=0x564e4b645510, 
isTopLevel=true, 
    setHoldSnapshot=false, dest=0x564e4b6b2480, altdest=0x564e4b6b2480, 
qc=0x7ffe53ae10a0)
    at pquery.c:1266
        pstmt = 0x564e4b6b1bc0
        stmtlist_item__state = {l = 0x564e4b6b2428, i = 0}
        active_snapshot_set = true
        stmtlist_item = 0x564e4b6b2440
#21 0x0000564e49dfc2a5 in PortalRun (portal=0x564e4b645510, 
count=9223372036854775807, 
    isTopLevel=true, run_once=true, dest=0x564e4b6b2480, 
altdest=0x564e4b6b2480, 
    qc=0x7ffe53ae10a0) at pquery.c:786
        _save_exception_stack = 0x7ffe53ae11b0
        _save_context_stack = 0x0
        _local_sigjmp_buf = {{__jmpbuf = {0, -8820586131844317798, 
94894241509376, 
              140730302338768, 0, 0, -8820586130944639590, 
-2956948205129384550}, 
            __mask_was_saved = 0, __saved_mask = {__val = {18421000251, 
94894272750696, 128, 
                94894271899520, 94894272312608, 140730302337024, 1864, 
94894248563559, 
                94894272736176, 140730302337056, 94894248752375, 13, 112, 
94894272750832, 112, 
                1403916336}}}}
        _do_rethrow = false
        result = false
        nprocessed = 94894272750720
        saveTopTransactionResourceOwner = 0x564e4b655480
        saveTopTransactionContext = 0x564e4b661040
        saveActivePortal = 0x0
        saveResourceOwner = 0x564e4b655480
        savePortalContext = 0x0
        saveMemoryContext = 0x564e4b661040
        __func__ = "PortalRun"
#22 0x0000564e49df5b49 in exec_simple_query (
    query_string=0x564e4b5e28a0 "update brintest_multi set inetcol = 
'192.168.204.50/0'::inet;")
    at postgres.c:1214
        snapshot_set = true
        per_parsetree_context = 0x0
        plantree_list = 0x564e4b6b2428
        parsetree = 0x564e4b5e3600
        commandTag = CMDTAG_UPDATE
        qc = {commandTag = CMDTAG_UNKNOWN, nprocessed = 0}
        querytree_list = 0x564e4b60a530
        portal = 0x564e4b645510
        receiver = 0x564e4b6b2480
        format = 0
        parsetree_item__state = {l = 0x564e4b5e3638, i = 0}
        dest = DestRemote
        oldcontext = 0x564e4b661040
        parsetree_list = 0x564e4b5e3638
        parsetree_item = 0x564e4b5e3650
        save_log_statement_stats = false
        was_logged = false
        use_implicit_block = false
        msec_str = 
"\240(^KNV\000\000=\000\000\000\006\000\000\000\360\020\256S\376\177\000\000|D\302I=\000\000"
        __func__ = "exec_simple_query"
#23 0x0000564e49dfa320 in PostgresMain (argc=1, argv=0x7ffe53ae1330, 
    dbname=0x564e4b60f410 "regression", username=0x564e4b60f3e8 "jcasanov") at 
postgres.c:4488
        query_string = 0x564e4b5e28a0 "update brintest_multi set inetcol = 
'192.168.204.50/0'::inet;"
        firstchar = 81
        input_message = {
          data = 0x564e4b5e28a0 "update brintest_multi set inetcol = 
'192.168.204.50/0'::inet;", 
          len = 62, maxlen = 1024, cursor = 62}
        local_sigjmp_buf = {{__jmpbuf = {0, -8820586131884163686, 
94894241509376, 
              140730302338768, 0, 0, -8820586131812860518, 
-2956948203183751782}, 
            __mask_was_saved = 1, __saved_mask = {__val = {4194304, 0, 0, 0, 0, 
0, 0, 32, 0, 
                1095216660735, 16711680, 0, 0, 18446742974214701055, 
72056494543077375, 0}}}}
        send_ready_for_query = false
        idle_in_transaction_timeout_enabled = false
        idle_session_timeout_enabled = false
        __func__ = "PostgresMain"
#24 0x0000564e49d2fc23 in BackendRun (port=0x564e4b606b20) at postmaster.c:4521
        av = {0x564e4a13f6df "postgres", 0x0}
        ac = 1
#25 0x0000564e49d2f552 in BackendStartup (port=0x564e4b606b20) at 
postmaster.c:4243
        bn = 0x564e4b606cf0
        pid = 0
        __func__ = "BackendStartup"
#26 0x0000564e49d2b8a3 in ServerLoop () at postmaster.c:1765
        port = 0x564e4b606b20
        i = 2
        rmask = {fds_bits = {128, 0 <repeats 15 times>}}
        selres = 1
        now = 1631493215
        readmask = {fds_bits = {224, 0 <repeats 15 times>}}
        nSockets = 8
        last_lockfile_recheck_time = 1631493215
        last_touch_time = 1631493215
        __func__ = "ServerLoop"
#27 0x0000564e49d2b0f2 in PostmasterMain (argc=3, argv=0x564e4b5dbeb0) at 
postmaster.c:1437
        opt = -1
        status = 0
        userDoption = 0x564e4b5ff7c0 "data"
        listen_addr_saved = true
        i = 64
        output_config_variable = 0x0
        __func__ = "PostmasterMain"
#28 0x0000564e49c276ea in main (argc=3, argv=0x564e4b5dbeb0) at main.c:199
        do_check_root = true

Reply via email to