Search Postgresql Archives

Re: Segmentation fault with PG-12

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



På tirsdag 08. oktober 2019 kl. 17:24:21, skrev Tom Lane <tgl@xxxxxxxxxxxxx>:
Andreas Joseph Krogh <andreas@xxxxxxxxxx> writes:
> Will running a debug-enabled build slow things noticably down?

gcc promises that the generated code is the same with or without debug.
I think clang does too.  With other compilers you may pay some penalty.

> Is there a way
> to make it dump a stack-trace (or back-trace in C-land?) on sig11?

You should be able to get a core file from which you can extract a
stack trace (and other info) after the fact.

https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend

regards, tom lane
 
Attached is output from "bt full".
 
Is this helpful?
Anything else I can do to help narrowing down the problem?
 
Thanks.
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@xxxxxxxxxx
www.visena.com
 
#0  slot_deform_heap_tuple (natts=24, offp=0x5598ec873d90, tuple=<optimized out>, slot=0x5598ec873d48)
    at ./build/../src/backend/executor/execTuples.c:895
        isnull = 0x5598ec8733e8
        tup = <optimized out>
        bp = <optimized out>
        tupleDesc = <optimized out>
        values = 0x5598ec875de8
        off = <optimized out>
        slow = <optimized out>
        hasnulls = <optimized out>
        attnum = <optimized out>
        tp = <optimized out>
        tupleDesc = <optimized out>
        values = <optimized out>
        isnull = <optimized out>
        tup = <optimized out>
        hasnulls = <optimized out>
        attnum = <optimized out>
        tp = <optimized out>
        off = <optimized out>
        bp = <optimized out>
        slow = <optimized out>
        thisatt = <optimized out>
#1  tts_buffer_heap_getsomeattrs (slot=0x5598ec873d48, natts=24) at ./build/../src/backend/executor/execTuples.c:676
        bslot = 0x5598ec873d48
#2  0x00005598e94534ac in slot_getsomeattrs_int (slot=slot@entry=0x5598ec873d48, attnum=24)
    at ./build/../src/backend/executor/execTuples.c:1877
        __errno_location = <optimized out>
#3  0x00005598e94443f1 in slot_getsomeattrs (attnum=<optimized out>, slot=0x5598ec873d48)
    at ./build/../src/include/executor/tuptable.h:345
No locals.
#4  ExecInterpExpr (state=0x5598ec8776b8, econtext=0x5598ec876ea8, isnull=<optimized out>)
    at ./build/../src/backend/executor/execExprInterp.c:441
        op = <optimized out>
        resultslot = 0x0
        innerslot = <optimized out>
        outerslot = <optimized out>
        scanslot = 0x0
        dispatch_table = {0x5598e9443608 <ExecInterpExpr+168>, 0x5598e94443f8 <ExecInterpExpr+3736>, 
          0x5598e94443d0 <ExecInterpExpr+3696>, 0x5598e94443b0 <ExecInterpExpr+3664>, 0x5598e9444380 <ExecInterpExpr+3616>, 
          0x5598e9444350 <ExecInterpExpr+3568>, 0x5598e9444328 <ExecInterpExpr+3528>, 0x5598e9444318 <ExecInterpExpr+3512>, 
          0x5598e9444148 <ExecInterpExpr+3048>, 0x5598e94442e0 <ExecInterpExpr+3456>, 0x5598e9444300 <ExecInterpExpr+3488>, 
          0x5598e94442c8 <ExecInterpExpr+3432>, 0x5598e9444120 <ExecInterpExpr+3008>, 0x5598e94440f0 <ExecInterpExpr+2960>, 
          0x5598e94442a0 <ExecInterpExpr+3392>, 0x5598e9444270 <ExecInterpExpr+3344>, 0x5598e9444250 <ExecInterpExpr+3312>, 
          0x5598e9444240 <ExecInterpExpr+3296>, 0x5598e94441d8 <ExecInterpExpr+3192>, 0x5598e94441c0 <ExecInterpExpr+3168>, 
          0x5598e94441a8 <ExecInterpExpr+3144>, 0x5598e94435a8 <ExecInterpExpr+72>, 0x5598e94435af <ExecInterpExpr+79>, 
          0x5598e9444168 <ExecInterpExpr+3080>, 0x5598e94435d0 <ExecInterpExpr+112>, 0x5598e94435d7 <ExecInterpExpr+119>, 
          0x5598e94440b8 <ExecInterpExpr+2904>, 0x5598e94440b0 <ExecInterpExpr+2896>, 0x5598e9444088 <ExecInterpExpr+2856>, 
          0x5598e9444080 <ExecInterpExpr+2848>, 0x5598e9444070 <ExecInterpExpr+2832>, 0x5598e9444058 <ExecInterpExpr+2808>, 
          0x5598e9444028 <ExecInterpExpr+2760>, 0x5598e9444008 <ExecInterpExpr+2728>, 0x5598e9443fe0 <ExecInterpExpr+2688>, 
          0x5598e9443fd0 <ExecInterpExpr+2672>, 0x5598e9443fb8 <ExecInterpExpr+2648>, 0x5598e9443f60 <ExecInterpExpr+2560>, 
          0x5598e9443f90 <ExecInterpExpr+2608>, 0x5598e9443f38 <ExecInterpExpr+2520>, 0x5598e9443d98 <ExecInterpExpr+2104>, 
          0x5598e9443f20 <ExecInterpExpr+2496>, 0x5598e9443f08 <ExecInterpExpr+2472>, 0x5598e9443ef0 <ExecInterpExpr+2448>, 
          0x5598e9443ec0 <ExecInterpExpr+2400>, 0x5598e9443e28 <ExecInterpExpr+2248>, 0x5598e9443dc0 <ExecInterpExpr+2144>, 
          0x5598e9443d60 <ExecInterpExpr+2048>, 0x5598e9443e48 <ExecInterpExpr+2280>, 0x5598e9443ce8 <ExecInterpExpr+1928>, 
          0x5598e9443cd0 <ExecInterpExpr+1904>, 0x5598e9444598 <ExecInterpExpr+4152>, 0x5598e9443cb8 <ExecInterpExpr+1880>, 
          0x5598e9443ca0 <ExecInterpExpr+1856>, 0x5598e9443c78 <ExecInterpExpr+1816>, 0x5598e9443be8 <ExecInterpExpr+1672>, 
          0x5598e9443c18 <ExecInterpExpr+1720>, 0x5598e9443b98 <ExecInterpExpr+1592>, 0x5598e9443b80 <ExecInterpExpr+1568>, 
          0x5598e9443b68 <ExecInterpExpr+1544>, 0x5598e9443b50 <ExecInterpExpr+1520>, 0x5598e9443b38 <ExecInterpExpr+1496>, 
          0x5598e9443b18 <ExecInterpExpr+1464>, 0x5598e9443b00 <ExecInterpExpr+1440>, 0x5598e9443c00 <ExecInterpExpr+1696>, 
          0x5598e9443ae8 <ExecInterpExpr+1416>, 0x5598e9443e90 <ExecInterpExpr+2352>, 0x5598e9443aa0 <ExecInterpExpr+1344>, 
          0x5598e9443690 <ExecInterpExpr+304>, 0x5598e9443ad0 <ExecInterpExpr+1392>, 0x5598e9443ab8 <ExecInterpExpr+1368>, 
          0x5598e9443a88 <ExecInterpExpr+1320>, 0x5598e9443a48 <ExecInterpExpr+1256>, 0x5598e9443a70 <ExecInterpExpr+1296>, 
          0x5598e9443a10 <ExecInterpExpr+1200>, 0x5598e94439f8 <ExecInterpExpr+1176>, 0x5598e94439e0 <ExecInterpExpr+1152>, 
          0x5598e94439c0 <ExecInterpExpr+1120>, 0x5598e9443628 <ExecInterpExpr+200>, 0x5598e94438f8 <ExecInterpExpr+920>, 
          0x5598e9443980 <ExecInterpExpr+1056>, 0x5598e94438a0 <ExecInterpExpr+832>, 0x5598e9443940 <ExecInterpExpr+992>, 
          0x5598e94437f8 <ExecInterpExpr+664>, 0x5598e9443710 <ExecInterpExpr+432>, 0x5598e94436f8 <ExecInterpExpr+408>, 
          0x5598e94436e0 <ExecInterpExpr+384>, 0x5598e9443608 <ExecInterpExpr+168>}
#5  0x00005598e942326b in ExecEvalExprSwitchContext (isNull=0x7ffdf2aae7a7, econtext=<optimized out>, state=<optimized out>)
    at ./build/../src/include/executor/executor.h:307
        retDatum = <optimized out>
        oldContext = <optimized out>
        retDatum = <optimized out>
        oldContext = <optimized out>
#6  ExecQual (econtext=<optimized out>, state=<optimized out>) at ./build/../src/include/executor/executor.h:376
        ret = <optimized out>
        isnull = false
        ret = <optimized out>
        isnull = <optimized out>
#7  TriggerEnabled (estate=estate@entry=0x5598eaeabdd0, trigger=trigger@entry=0x5598eaeac828, event=<optimized out>, 
    modifiedCols=modifiedCols@entry=0x5598eb7d34b8, oldslot=0x5598ec876b88, newslot=0x5598ec873d48, relinfo=<optimized out>, 
    relinfo=<optimized out>) at ./build/../src/backend/commands/trigger.c:3516
        predicate = <optimized out>
        econtext = <optimized out>
        oldContext = <optimized out>
        i = <optimized out>
        relinfo = <optimized out>
        relinfo = <optimized out>
        oldslot = 0x5598ec876b88
        modifiedCols = 0x5598eb7d34b8
        estate = 0x5598eaeabdd0
        newslot = 0x5598ec873d48
        event = <optimized out>
        trigger = 0x5598eaeac828
        i = <optimized out>
        modified = <optimized out>
        predicate = <optimized out>
        econtext = <optimized out>
        oldContext = <optimized out>
        i = <optimized out>
        tgqual = <optimized out>
#8  0x00005598e9429813 in ExecBRUpdateTriggers (estate=estate@entry=0x5598eaeabdd0, epqstate=epqstate@entry=0x5598eb7d3110, 
    relinfo=relinfo@entry=0x5598eaeac090, tupleid=tupleid@entry=0x7ffdf2aaea0a, fdw_trigtuple=fdw_trigtuple@entry=0x0, 
    newslot=newslot@entry=0x5598ec873d48) at ./build/../src/backend/commands/trigger.c:3081
        trigger = 0x5598eaeac828
        oldtuple = <optimized out>
        trigdesc = 0x5598eaeac010
        oldslot = 0x5598ec876b88
        newtuple = 0x0
        trigtuple = 0x5598ec876778
        should_free_trig = false
        should_free_new = false
        LocTriggerData = {type = T_TriggerData, tg_event = 14, tg_relation = 0x5598eb2e7fa8, tg_trigtuple = 0x20, 
          tg_newtuple = 0x20015598ec601e18, tg_trigger = 0x228, tg_trigslot = 0x248, tg_newslot = 0x5598ec872278, tg_oldtable = 0x0, 
          tg_newtable = 0x0}
        i = 19
        updatedCols = 0x5598eb7d34b8
        lockmode = <optimized out>
#9  0x00005598e946caed in ExecUpdate (mtstate=mtstate@entry=0x5598eb7d3018, tupleid=0x7ffdf2aaea0a, oldtuple=0x0, 
    slot=0x5598ec873d48, planSlot=planSlot@entry=0x5598ec873468, epqstate=epqstate@entry=0x5598eb7d3110, estate=0x5598eaeabdd0, 
    canSetTag=true) at ./build/../src/backend/executor/nodeModifyTable.c:1072
        resultRelInfo = 0x5598eaeac090
        resultRelationDesc = 0x5598eb2e7fa8
        result = <optimized out>
        tmfd = {ctid = {ip_blkid = {bi_hi = 48592, bi_lo = 60138}, ip_posid = 21912}, xmax = 3968283752, cmax = 21912, 
          traversed = 128}
        recheckIndexes = 0x0
        saved_tcs_map = 0x0
        __func__ = "ExecUpdate"
#10 0x00005598e946dd79 in ExecModifyTable (pstate=0x5598eb7d3018) at ./build/../src/backend/executor/nodeModifyTable.c:2223
        node = 0x5598eb7d3018
        proute = 0x0
        estate = 0x5598eaeabdd0
        operation = CMD_UPDATE
        saved_resultRelInfo = 0x0
        resultRelInfo = 0x5598eaeac090
        subplanstate = 0x5598ec601c08
        junkfilter = 0x5598ec876088
        slot = <optimized out>
        planSlot = 0x5598ec873468
        tupleid = <optimized out>
        tuple_ctid = {ip_blkid = {bi_hi = 3, bi_lo = 36252}, ip_posid = 22}
        oldtupdata = {t_len = 3941252560, t_self = {ip_blkid = {bi_hi = 21912, bi_lo = 0}, ip_posid = 0}, t_tableOid = 0, 
          t_data = 0x7ffdf2aaea50}
        oldtuple = <optimized out>
        __func__ = "ExecModifyTable"
#11 0x00005598e944725d in ExecProcNode (node=0x5598eb7d3018) at ./build/../src/include/executor/executor.h:239
No locals.
#12 ExecutePlan (execute_once=<optimized out>, dest=0x5598eb932038, direction=<optimized out>, numberTuples=0, 
    sendTuples=<optimized out>, operation=CMD_UPDATE, use_parallel_mode=<optimized out>, planstate=0x5598eb7d3018, 
    estate=0x5598eaeabdd0) at ./build/../src/backend/executor/execMain.c:1646
        slot = <optimized out>
        current_tuple_count = 0
        slot = <optimized out>
        current_tuple_count = <optimized out>
#13 standard_ExecutorRun (queryDesc=0x5598eccf9c18, direction=<optimized out>, count=0, execute_once=<optimized out>)
    at ./build/../src/backend/executor/execMain.c:364
        estate = 0x5598eaeabdd0
        operation = CMD_UPDATE
        dest = 0x5598eb932038
        sendTuples = <optimized out>
        oldcontext = <optimized out>
        __func__ = "standard_ExecutorRun"
#14 0x00005598e95a3ec5 in ProcessQuery (plan=<optimized out>, 
    sourceText=0x5598eb931dd0 "UPDATE origo_email_delivery SET folder_id=$1, created=$2\nWHERE entity_id IN ($3)\nRETURNING entity_id", params=0x5598eb931e80, queryEnv=0x0, dest=0x5598eb932038, completionTag=0x7ffdf2aaeb90 "")
    at ./build/../src/backend/tcop/pquery.c:161
        queryDesc = 0x5598eccf9c18
#15 0x00005598e95a4103 in PortalRunMulti (portal=portal@entry=0x5598eae277a0, isTopLevel=isTopLevel@entry=true, 
    setHoldSnapshot=setHoldSnapshot@entry=true, dest=dest@entry=0x5598eb932038, altdest=0x5598e9b49c00 <donothingDR>, 
    completionTag=completionTag@entry=0x7ffdf2aaeb90 "") at ./build/../src/backend/tcop/pquery.c:1283
        pstmt = 0x5598eb4b8b40
        active_snapshot_set = true
        stmtlist_item = 0x5598eb4b8b20
#16 0x00005598e95a43c2 in FillPortalStore (portal=portal@entry=0x5598eae277a0, isTopLevel=isTopLevel@entry=true)
    at ./build/../src/backend/tcop/pquery.c:1030
        treceiver = 0x5598eb932038
        completionTag = "\000\353\252\362\375\177\000\000f\221o\351\230U\000\000\370\031M\231D\177\000\000\020\215K\353\230U\000\000\320\353\252\362\375\177\000\000?<k\351\230U\000\000\020\037\223\353\230U\000\000\310J\004\353\230U\000"
        __func__ = "FillPortalStore"
#17 0x00005598e95a4f5f in PortalRun (portal=portal@entry=0x5598eae277a0, count=count@entry=5000, isTopLevel=isTopLevel@entry=true, 
    run_once=<optimized out>, dest=dest@entry=0x5598ead9a850, altdest=altdest@entry=0x5598ead9a850, completionTag=0x7ffdf2aaf020 "")
    at ./build/../src/backend/tcop/pquery.c:765
        save_exception_stack = 0x7ffdf2aaeef0
        save_context_stack = 0x0
        local_sigjmp_buf = {{__jmpbuf = {0, 7709727683193285437, 3, 94115275677280, 94115264100256, 0, 7709727683153439549, 
              4482281864764795709}, __mask_was_saved = 0, __saved_mask = {__val = {139932367421736, 140728674741520, 94115275677136, 
                100, 623927117367069, 140728674741552, 94115239309042, 140724603453440, 112, 94115263521584, 94115275677280, 
                94115273415056, 0, 140728674741584, 94115239780433, 3}}}}
        result = <optimized out>
        nprocessed = <optimized out>
        saveTopTransactionResourceOwner = 0x5598eade7728
        saveTopTransactionContext = 0x5598eb89f250
        saveActivePortal = 0x0
        saveResourceOwner = 0x5598eade7728
        savePortalContext = 0x0
        saveMemoryContext = 0x5598ead9a330
        __func__ = "PortalRun"
#18 0x00005598e95a2541 in exec_execute_message (max_rows=5000, portal_name=0x5598ead9a440 "bda")
    at ./build/../src/backend/tcop/postgres.c:2090
        completed = <optimized out>
        execute_is_fetch = false
        completionTag = "\000ELECT 1\000\061\000\000\230U\000\000\240\360\252\362\375\177\000\000\243\245m\351\230U\000\000\003\000\000\000\000\000\000\000\362.h\351T\000\000\000\300\270\331\352\230U\000\000\000\000\000\000\000\004\000"
        save_log_statement_stats = false
        was_logged = false
        dest = DestRemoteExecute
        receiver = 0x5598ead9a850
        portal = 0x5598eae277a0
        sourceText = 0x5598eb931dd0 "UPDATE origo_email_delivery SET folder_id=$1, created=$2\nWHERE entity_id IN ($3)\nRETURNING entity_id"
        prepStmtName = 0x5598eb931e60 "cached-26ada7f9"
        portalParams = 0x5598eb931e80
        is_xact_command = <optimized out>
        msec_str = "P\360\252\362\375\177\000\000P\360\252\362\375\177\000\000\060\360\252\362\375\177\000\000V:H\351\230U\000"
        dest = <optimized out>
        receiver = <optimized out>
        portal = <optimized out>
        completed = <optimized out>
        completionTag = <optimized out>
        sourceText = <optimized out>
        prepStmtName = <optimized out>
        portalParams = <optimized out>
        save_log_statement_stats = <optimized out>
        is_xact_command = <optimized out>
        execute_is_fetch = <optimized out>
        was_logged = <optimized out>
        msec_str = <optimized out>
        __errno_location = <optimized out>
        __errno_location = <optimized out>
        __errno_location = <optimized out>
        __errno_location = <optimized out>
        __errno_location = <optimized out>
#19 PostgresMain (argc=<optimized out>, argv=argv@entry=0x5598eadd22e0, dbname=<optimized out>, username=<optimized out>)
    at ./build/../src/backend/tcop/postgres.c:4297
        portal_name = 0x5598ead9a440 "bda"
        max_rows = <optimized out>
        firstchar = <optimized out>
        input_message = {data = 0x5598ead9a440 "bda", len = 8, maxlen = 1024, cursor = 8}
        local_sigjmp_buf = {{__jmpbuf = {140728674741936, 7709727683268782909, 1, 94115263750856, 94115263750880, 140728674742800, 
              7709727683172313917, 4482281862789147453}, __mask_was_saved = 1, __saved_mask = {__val = {0, 140728674746062, 
                140728674746010, 140728674746322, 0, 0, 140728674742800, 140728674742208, 10797087918629389056, 140728674742368, 
                94115239888639, 206158430256, 140728674742392, 140728674742192, 10797087918629389056, 74}}}}
        send_ready_for_query = false
        disable_idle_in_transaction_timeout = false
        __func__ = "PostgresMain"
#20 0x00005598e952906b in BackendRun (port=0x5598eadc0570, port=0x5598eadc0570)
    at ./build/../src/backend/postmaster/postmaster.c:4431
        av = 0x5598eadd22e0
        maxac = <optimized out>
        ac = 1
        i = 1
        av = <optimized out>
        maxac = <optimized out>
        ac = <optimized out>
        i = <optimized out>
        __errno_location = <optimized out>
        __errno_location = <optimized out>
        __errno_location = <optimized out>
#21 BackendStartup (port=0x5598eadc0570) at ./build/../src/backend/postmaster/postmaster.c:4122
        bn = <optimized out>
        pid = <optimized out>
        bn = <optimized out>
        pid = <optimized out>
        __errno_location = <optimized out>
        __errno_location = <optimized out>
        save_errno = <optimized out>
        __errno_location = <optimized out>
        __errno_location = <optimized out>
#22 ServerLoop () at ./build/../src/backend/postmaster/postmaster.c:1704
        port = <optimized out>
        i = <optimized out>
        rmask = {fds_bits = {64, 0 <repeats 15 times>}}
        selres = <optimized out>
        now = <optimized out>
        readmask = {fds_bits = {448, 0 <repeats 15 times>}}
        nSockets = <optimized out>
        last_lockfile_recheck_time = 1570582948
        last_touch_time = 1570580782
        __func__ = "ServerLoop"
#23 0x00005598e952a043 in PostmasterMain (argc=5, argv=0x5598ead93060) at ./build/../src/backend/postmaster/postmaster.c:1377
        opt = <optimized out>
        status = <optimized out>
        userDoption = <optimized out>
        listen_addr_saved = <optimized out>
        i = <optimized out>
        output_config_variable = <optimized out>
        __func__ = "PostmasterMain"
#24 0x00005598e92a0cb6 in main (argc=5, argv=0x5598ead93060) at ./build/../src/backend/main/main.c:228
No locals.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux