BUG #9836: SegFault at heaptouple.c:1104 - Mailing list pgsql-bugs

From sidicas2@gmail.com
Subject BUG #9836: SegFault at heaptouple.c:1104
Date
Msg-id 20140402224006.309.82151@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      9836
Logged by:          David Smith
Email address:      sidicas2@gmail.com
PostgreSQL version: 9.1.12
Operating system:   Debian Stable
Description:

Database has been crashing every 6 minutes for the past 2 days after over 8
months of working perfectly fine.

I rebooted the PC and ran a complete hard disk check and no problems have
turned up.
This shows up in /var/log/messages:

[  442.407152] postgres[3573]: segfault at 7f8e9f486cc8 ip 00007f8e91996c38
sp 00007fff77c60440 error 4 in postgres[7f8e91905000+51d000]
[  552.829747] postgres[3589]: segfault at 7f8e93adecc8 ip 00007f8e91996c38
sp 00007fff77c604e0 error 4 in postgres[7f8e91905000+51d000]


sudo -u postgres gdb -q -c /var/lib/postgresql/9.1/main/core
/usr/lib/postgresql/9.1/bin/postgres
Reading symbols from /usr/lib/postgresql/9.1/bin/postgres...Reading symbols
from /usr/lib/debug/usr/lib/postgresql/9.1/bin/postgres...done.
done.
[New LWP 3589]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `postgres: ttrss ttrss [local] SELECT
                        '.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f8e91996c38 in slot_deform_tuple (slot=slot@entry=0x7f8e940b49a0,
natts=natts@entry=10)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/access/common/heaptuple.c:1104
1104
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/access/common/heaptuple.c:
No such file or directory.
(gdb) bt full
#0  0x00007f8e91996c38 in slot_deform_tuple (slot=slot@entry=0x7f8e940b49a0,
natts=natts@entry=10)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/access/common/heaptuple.c:1104
        thisatt = 0x7f8e74026870
        tuple = <optimized out>
        tupleDesc = <optimized out>
        values = 0x7f8e940b4a50
        isnull = 0x7f8e940b4ae0 ""
        tup = 0x7f8e7a545ad8
        hasnulls = 1 '\001'
        att = 0x7f8e74026470
        attnum = 8
        tp = 0x7f8e7a545af8 "j\215\006"
        off = 425300432
        bp = 0x7f8e7a545aef "\177\377"
        slow = 1 '\001'
#1  0x00007f8e91998677 in slot_getsomeattrs (slot=0x7f8e940b49a0,
attnum=10)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/access/common/heaptuple.c:1300
        tuple = <optimized out>
        attno = 10
        __func__ = "slot_getsomeattrs"
#2  0x00007f8e91ab7608 in ExecProject (projInfo=0x7f8e940b79f0,
isDone=isDone@entry=0x7fff77c6061c)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execQual.c:5385
        slot = 0x7f8e940b7818
        econtext = 0x7f8e940828a0
        numSimpleVars = <optimized out>
#3  0x00007f8e91ac7495 in ExecNestLoop (node=node@entry=0x7f8e94082790)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/nodeNestloop.c:265
        result = <optimized out>
        isDone = ExprSingleResult
        nl = 0x7f8e9409fcf0
        innerPlan = 0x7f8e94086af0
        outerPlan = 0x7f8e94082a00
        outerTupleSlot = <optimized out>
        innerTupleSlot = <optimized out>
        joinqual = 0x0
        otherqual = 0x0
        econtext = 0x7f8e940828a0
        lc = <optimized out>
#4  0x00007f8e91ab03e8 in ExecProcNode (node=node@entry=0x7f8e94082790)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execProcnode.c:439
        result = <optimized out>
        __func__ = "ExecProcNode"
#5  0x00007f8e91abce07 in agg_retrieve_direct (aggstate=0x7f8e94082030)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/nodeAgg.c:1119
        econtext = 0x7f8e94082320
        aggnulls = 0x7f8e940b7d40 ""
        pergroup = 0x7f8e940b7e68
        firstSlot = 0x7f8e940823d0
        node = 0x7f8e9409faf0
        tmpcontext = <optimized out>
        aggvalues = 0x7f8e940b7d28
        peragg = 0x7f8e940b7d58
        outerslot = <optimized out>
        outerPlan = 0x7f8e94082790
        aggno = <optimized out>
#6  ExecAgg (node=node@entry=0x7f8e94082030)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/nodeAgg.c:1011
No locals.
#7  0x00007f8e91ab0380 in ExecProcNode (node=node@entry=0x7f8e94082030)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execProcnode.c:466
        result = <optimized out>
---Type <return> to continue, or q <return> to quit---
        __func__ = "ExecProcNode"
#8  0x00007f8e91acaeeb in ExecSetParamPlan (node=0x7f8e940bc428,
econtext=0x7f8e940b9fe8)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/nodeSubplan.c:928
        subplan = 0x7f8e9409fdd0
        planstate = 0x7f8e94082030
        subLinkType = EXPR_SUBLINK
        oldcontext = 0x7f8e940985f0
        slot = <optimized out>
        l = <optimized out>
        found = 0 '\000'
        astate = 0x0
        __func__ = "ExecSetParamPlan"
#9  0x00007f8e91ab4235 in ExecEvalParamExec (exprstate=<optimized out>,
econtext=<optimized out>, isNull=0x7f8e940bbf12 "",
    isDone=<optimized out>) at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execQual.c:1083
        expression = <optimized out>
        thisParamId = <optimized out>
        prm = 0x7f8e94081fa8
#10 0x00007f8e91ab774d in ExecTargetList (isDone=0x7fff77c6088c,
itemIsDone=0x7f8e940bc118, isnull=0x7f8e940bbf08 "",
    values=0x7f8e940bbe78, econtext=0x7f8e940b9fe8,
targetlist=0x7f8e940bc0e8)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execQual.c:5231
        gstate = <optimized out>
        tle = <optimized out>
        resind = <optimized out>
        oldContext = 0x7f8e94096dd0
        tl = 0x7f8e940bc0c8
        haveDoneSets = <optimized out>
#11 ExecProject (projInfo=projInfo@entry=0x7f8e940bbf28,
isDone=isDone@entry=0x7fff77c6088c)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execQual.c:5446
        slot = 0x7f8e940bb2f8
        econtext = 0x7f8e940b9fe8
        numSimpleVars = <optimized out>
#12 0x00007f8e91ab7aac in ExecScan (node=node@entry=0x7f8e940ba2e8,
accessMtd=accessMtd@entry=0x7f8e91ac1980 <IndexNext>,
    recheckMtd=recheckMtd@entry=0x7f8e91ac1930 <IndexRecheck>)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execScan.c:207
        slot = 0x7f8e940bb3a8
        econtext = 0x7f8e940b9fe8
        qual = 0x0
        projInfo = 0x7f8e940bbf28
        isDone = ExprSingleResult
        resultSlot = <optimized out>
#13 0x00007f8e91ac1ace in ExecIndexScan (node=node@entry=0x7f8e940ba2e8)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/nodeIndexscan.c:146
No locals.
#14 0x00007f8e91ab0478 in ExecProcNode (node=node@entry=0x7f8e940ba2e8)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execProcnode.c:398
        result = <optimized out>
        __func__ = "ExecProcNode"
#15 0x00007f8e91aad710 in ExecutePlan (dest=0x7f8e940a8c50,
direction=<optimized out>, numberTuples=0, sendTuples=1 '\001',
    operation=CMD_SELECT, planstate=0x7f8e940ba2e8, estate=0x7f8e94081e80)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execMain.c:1442
        slot = <optimized out>
        current_tuple_count = 0
#16 standard_ExecutorRun (queryDesc=0x7f8e9402e0a0, direction=<optimized
out>, count=0)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/executor/execMain.c:316
        estate = 0x7f8e94081e80
        operation = CMD_SELECT
        dest = 0x7f8e940a8c50
        sendTuples = <optimized out>
        oldcontext = 0x7f8e94097990
#17 0x00007f8e91b83b80 in PortalRunSelect
(portal=portal@entry=0x7f8e93f79c20, forward=forward@entry=1 '\001',
count=0,
    count@entry=9223372036854775807, dest=dest@entry=0x7f8e940a8c50)
---Type <return> to continue, or q <return> to quit---
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/tcop/pquery.c:945
        queryDesc = 0x7f8e9402e0a0
        direction = <optimized out>
        nprocessed = <optimized out>
        __func__ = "PortalRunSelect"
#18 0x00007f8e91b85030 in PortalRun (portal=portal@entry=0x7f8e93f79c20,
count=count@entry=9223372036854775807,
    isTopLevel=isTopLevel@entry=1 '\001', dest=dest@entry=0x7f8e940a8c50,
altdest=altdest@entry=0x7f8e940a8c50,
    completionTag=completionTag@entry=0x7fff77c60d40 "")
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/tcop/pquery.c:789
        save_exception_stack = 0x7fff77c60c50
        save_context_stack = 0x0
        local_sigjmp_buf = {{__jmpbuf = {140250345286624,
-823261591905765611, 140250345286896, 140250345802832, 2,
              140250345181184, -832911314627332331, -823266555214956779},
__mask_was_saved = 0, __saved_mask = {__val = {
                140250307672700, 140250345181184, 140250345167392,
140250308876250, 144, 140250308876250, 80, 140250344301840,
                140250345286896, 140250308896126, 2, 140250345181184,
140250307750245, 140250345286624, 2, 140250344561696}}}}
        result = <optimized out>
        nprocessed = <optimized out>
        saveTopTransactionResourceOwner = <optimized out>
        saveTopTransactionContext = <optimized out>
        saveActivePortal = 0x0
        saveResourceOwner = 0x7f8e94011110
        savePortalContext = 0x0
        saveMemoryContext = 0x7f8e94011000
        __func__ = "PortalRun"
#19 0x00007f8e91b80dcf in exec_simple_query (
    query_string=0x7f8e9401f170 "SELECT
id,update_interval,auth_login,\n\t\t\tfeed_url,auth_pass,cache_images,\n\t\t\tmark_unread_on_update,
owner_uid,\n\t\t\tpubsub_state, auth_pass_encrypted,\n\t\t\t(SELECT
max(date_entered) FROM\n\t\t\t\tttrss_entries"...)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/tcop/postgres.c:1020
        parsetree = 0x7f8e9402abe0
        portal = 0x7f8e93f79c20
        snapshot_set = <optimized out>
        commandTag = <optimized out>
        completionTag = "\000ELECT

1\000\000\367\223\216\177\000\000\027\000\000\000\000\000\000\000\303\a\264\221\216\177\000\000\230\334\367\223\216\177\000\000O\267\367\223\216\177\000\000lL\005\222\216\177\000\000\020\245\363\223\216\177\000"
        querytree_list = <optimized out>
        plantree_list = 0x7f8e940a8c20
        receiver = 0x7f8e940a8c50
        format = 0
        dest = DestRemote
        parsetree_list = 0x7f8e9402ad10
        save_log_statement_stats = 0 '\000'
        was_logged = <optimized out>
        msec_str = "\000ELECT
1\000\000\367\223\216\177\000\000\027\000\000\000\000\000\000\000\303\a\264\221\216\177\000"
        parsetree_item = 0x7f8e9402acf0
        isTopLevel = 1 '\001'
#20 PostgresMain (argc=<optimized out>, argv=argv@entry=0x7f8e93f3b050,
dbname=0x7f8e74026870 "V\271\020", username=<optimized out>)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/tcop/postgres.c:3968
        query_string = 0x7f8e9401f170 "SELECT
id,update_interval,auth_login,\n\t\t\tfeed_url,auth_pass,cache_images,\n\t\t\tmark_unread_on_update,
owner_uid,\n\t\t\tpubsub_state, auth_pass_encrypted,\n\t\t\t(SELECT
max(date_entered) FROM\n\t\t\t\tttrss_entries"...
        firstchar = -1811764256
        input_message = {
          data = 0x7f8e9401f170 "SELECT
id,update_interval,auth_login,\n\t\t\tfeed_url,auth_pass,cache_images,\n\t\t\tmark_unread_on_update,
owner_uid,\n\t\t\tpubsub_state, auth_pass_encrypted,\n\t\t\t(SELECT
max(date_entered) FROM\n\t\t\t\tttrss_entries"...,
          len = 325, maxlen = 1024, cursor = 325}
        local_sigjmp_buf = {{__jmpbuf = {140250311810764,
-823266540588894443, 1, 1, 140250311901796, 140250311902048,
              -832911314587486443, -823266553278892267}, __mask_was_saved =
1, __saved_mask = {__val = {0, 140250344578200,
                140250311901796, 140250311902048, 140250275855770,
206158430256, 140735202856368, 140735202856160, 140250312241576,
                140735202856332, 140250311891488, 140250311902048, 24, 0,
140250344304672, 140250344568664}}}}
        send_ready_for_query = 0 '\000'
        __func__ = "PostgresMain"
#21 0x00007f8e91b42988 in BackendRun (port=0x7f8e93f7dc00)
---Type <return> to continue, or q <return> to quit---
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/postmaster/postmaster.c:3607
        ac = 1
        secs = 449793266
        usecs = 378497
        i = <optimized out>
        av = 0x7f8e93f3b050
        maxac = <optimized out>
#22 BackendStartup (port=0x7f8e93f7dc00)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/postmaster/postmaster.c:3297
        bn = 0x7f8e93f759b0
        pid = 0
#23 ServerLoop () at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/postmaster/postmaster.c:1461
        port = 0x7f8e93f7dc00
        rmask = {fds_bits = {64, 0 <repeats 15 times>}}
        selres = <optimized out>
        readmask = {fds_bits = {72, 0 <repeats 15 times>}}
        nSockets = 7
        now = <optimized out>
        last_touch_time = 1396477700
        __func__ = "ServerLoop"
#24 0x00007f8e91b436c1 in PostmasterMain (argc=argc@entry=5,
argv=argv@entry=0x7f8e93f3a1d0)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/postmaster/postmaster.c:1122
        opt = <optimized out>
        status = <optimized out>
        userDoption = <optimized out>
        listen_addr_saved = <optimized out>
        i = <optimized out>
        __func__ = "PostmasterMain"
#25 0x00007f8e9199692f in main (argc=5, argv=0x7f8e93f3a1d0)
    at
/home/cbe/projects/postgresql/9.1/postgresql-9.1-9.1.12/build/../src/backend/main/main.c:209
No locals.
(gdb)
(gdb) q

pgsql-bugs by date:

Previous
From: shaharhd@gmail.com
Date:
Subject: BUG #9833: daterange is not utilizing index correctly
Next
From: nuko.yokohama@gmail.com
Date:
Subject: BUG #9843: interval data type storage size (8.1 later)