Thread

  1. easy crash on HEAD

    Josh Kupershmidt <schmiddy@gmail.com> — 2013-05-16T19:33:46Z

    I am pretty sure this is an easily-reproducible crash on git head
    (well, as of a2a480af889b5), helpfully confirmed on IRC by wulczer and
    deko. I reproduced the crash myself on OS X and 64-bit Debian.
    
    ---
    create table foo (a int);
    CREATE RULE notify_foo_updates AS ON UPDATE TO foo DO NOTIFY foo;
    \d foo
    ---
    
    Backtrace looks like this:
    (gdb) bt
    #0  0x00007fff837ce954 in recvfrom ()
    #1  0x0000000100188fe3 in secure_read (port=0x100802280,
    ptr=0x10055d340, len=8192) at be-secure.c:304
    #2  0x0000000100191bdc in pq_recvbuf () at pqcomm.c:854
    #3  0x0000000100192053 in pq_getbyte () at pqcomm.c:895
    #4  0x0000000100257fec in SocketBackend [inlined] () at
    /media/src/OSS/postgresql/src/backend/tcop/postgres.c:344
    #5  0x0000000100257fec in ReadCommand (inBuf=0x7fff5fbfe0d0) at postgres.c:492
    #6  0x0000000100258746 in PostgresMain (argc=1, argv=0x10101a010,
    dbname=0x101019e78 "adsync", username=<value temporarily unavailable,
    due to optimizations>) at postgres.c:3946
    #7  0x0000000100204a95 in BackendRun [inlined] () at
    /media/src/OSS/postgresql/src/backend/postmaster/postmaster.c:3985
    #8  0x0000000100204a95 in ServerLoop () at postmaster.c:3674
    #9  0x00000001002083d4 in PostmasterMain (argc=3, argv=0x100800700) at
    postmaster.c:1244
    #10 0x0000000100194089 in main (argc=3, argv=0x100800700) at main.c:196
    
    
    Josh
    
    
    
  2. Re: easy crash on HEAD

    Josh Kupershmidt <schmiddy@gmail.com> — 2013-05-16T19:43:44Z

    On Thu, May 16, 2013 at 3:33 PM, Josh Kupershmidt <schmiddy@gmail.com> wrote:
    > Backtrace looks like this:
    
    My mistake -- the last backtrace was from an idle client before the
    crash. Thank you andres and wulczer for the correction. Here is the
    interesting one:
    
    (gdb) bt
    #0  has_unnamed_full_join_using (jtnode=0x0) at ruleutils.c:2647
    #1  0x00000001002c65ef in set_deparse_for_query (dpns=0x7fff5fbfd6c0,
    query=0x101117090, parent_namespaces=<value temporarily unavailable,
    due to optimizations>) at ruleutils.c:2568
    #2  0x00000001002c7b2b in get_query_def (query=0x101117090,
    buf=0x7fff5fbfd880, parentnamespace=0x0, resultDesc=0x0,
    prettyFlags=3, wrapColumn=0, startIndent=0) at ruleutils.c:3997
    #3  0x00000001002d10f2 in pg_get_ruledef_worker (ruleoid=<value
    temporarily unavailable, due to optimizations>, prettyFlags=3) at
    ruleutils.c:3888
    #4  0x00000001002d12da in pg_get_ruledef_ext (fcinfo=<value
    temporarily unavailable, due to optimizations>) at ruleutils.c:434
    #5  0x000000010016327a in ExecMakeFunctionResult (fcache=0x101100a80,
    econtext=0x101100068, isNull=0x101100618 "", isDone=<value temporarily
    unavailable, due to optimizations>) at execQual.c:1938
    #6  0x000000010015f92d in ExecEvalFuncArgs (fcinfo=0x1011002d8,
    argList=<value temporarily unavailable, due to optimizations>,
    econtext=0x101100068) at execQual.c:1478
    #7  0x0000000100162e75 in ExecMakeFunctionResult (fcache=0x101100268,
    econtext=0x101100068, isNull=0x101102321 "", isDone=0x101102494) at
    execQual.c:1709
    #8  0x000000010015f5da in ExecTargetList [inlined] () at
    /media/src/OSS/postgresql/src/backend/executor/execQual.c:5240
    #9  0x000000010015f5da in ExecProject (projInfo=<value temporarily
    unavailable, due to optimizations>, isDone=0x7fff5fbfdc2c) at
    execQual.c:5455
    #10 0x0000000100166f9b in ExecScan (node=0x1010fff50,
    accessMtd=0x100173cd0 <IndexNext>, recheckMtd=0x100173c80
    <IndexRecheck>) at execScan.c:207
    #11 0x000000010015efc8 in ExecProcNode (node=0x1010fff50) at execProcnode.c:404
    #12 0x000000010015d97e in ExecutePlan [inlined] () at
    /media/src/OSS/postgresql/src/backend/executor/execMain.c:1450
    #13 0x000000010015d97e in standard_ExecutorRun (queryDesc=0x101109a38,
    direction=<value temporarily unavailable, due to optimizations>,
    count=0) at execMain.c:306
    #14 0x000000010025a3a7 in PortalRunSelect (portal=0x101039638,
    forward=<value temporarily unavailable, due to optimizations>,
    count=0, dest=<value temporarily unavailable, due to optimizations>)
    at pquery.c:944
    #15 0x000000010025bde7 in PortalRun (portal=0x101039638,
    count=9223372036854775807, isTopLevel=1 '\001', dest=0x1010f1908,
    altdest=0x1010f1908, completionTag=0x7fff5fbfdeb0 "") at pquery.c:788
    #16 0x0000000100257a8a in exec_simple_query (query_string=0x101031238
    "SELECT r.rulename, trim(trailing ';' from
    pg_catalog.pg_get_ruledef(r.oid, true)), ev_enabled\nFROM
    pg_catalog.pg_rewrite r\nWHERE r.ev_class = '40964' ORDER BY 1;") at
    postgres.c:1048
    #17 0x0000000100259498 in PostgresMain (argc=1, argv=0x101040740,
    dbname=0x1010405a8 "test", username=<value temporarily unavailable,
    due to optimizations>) at postgres.c:3985
    #18 0x0000000100204a95 in BackendRun [inlined] () at
    /media/src/OSS/postgresql/src/backend/postmaster/postmaster.c:3985
    #19 0x0000000100204a95 in ServerLoop () at postmaster.c:3674
    #20 0x00000001002083d4 in PostmasterMain (argc=3, argv=0x100800700) at
    postmaster.c:1244
    #21 0x0000000100194089 in main (argc=3, argv=0x100800700) at main.c:196
    
    Josh
    
    
    
  3. Re: easy crash on HEAD

    Tom Lane <tgl@sss.pgh.pa.us> — 2013-05-16T19:46:18Z

    Josh Kupershmidt <schmiddy@gmail.com> writes:
    > I am pretty sure this is an easily-reproducible crash on git head
    > (well, as of a2a480af889b5), helpfully confirmed on IRC by wulczer and
    > deko. I reproduced the crash myself on OS X and 64-bit Debian.
    
    > create table foo (a int);
    > CREATE RULE notify_foo_updates AS ON UPDATE TO foo DO NOTIFY foo;
    > \d foo
    
    Thanks, will fix.
    
    			regards, tom lane