core dump with last CVS

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема core dump with last CVS
Дата
Msg-id Pine.GSO.4.63.0509031900270.14250@ra.sai.msu.su
обсуждение исходный текст
Ответы Re: core dump with last CVS  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi there,

following query cause postmaster to fail.

tp=# select query from rquery('new&york&hotel') as query;
server closed the connection unexpectedly        This probably means the server terminated abnormally        before or
whileprocessing the request.
 
The connection to the server was lost. Attempting reset: Failed.

this happens *only* if rquery marks as immutable.


in postgresql console I see

TRAP: BadArgument("!(((context) != ((void *)0) && (((((Node*)((context)))->type) == T_AllocSetContext))))", File:
"mcxt.c",Line: 502)
 


(gdb) bt
#0  0x40101ac1 in kill () from /lib/libc.so.6
#1  0x401016eb in raise () from /lib/libc.so.6
#2  0x40103127 in abort () from /lib/libc.so.6
#3  0x08251f02 in ExceptionalCondition (    conditionName=0x6 <Address 0x6 out of bounds>,    errorType=0x8278b22
"BadArgument",fileName=0x4020ad24 "8,\023",    lineNumber=0) at assert.c:51
 
#4  0x082691db in MemoryContextAlloc (context=0x8278b22, size=24) at mcxt.c:502
#5  0x40018191 in QTNCopy () from /u/megera/app/pgsql/cvs/run/lib/tprewriter.so
#6  0x40018e90 in tp_rewrite_accum ()   from /u/megera/app/pgsql/cvs/run/lib/tprewriter.so
#7  0x08151962 in advance_transition_function (aggstate=0x83e5b3c,    peraggstate=0x83ebab8, pergroupstate=0x83ec7d8,
newVal=138568552,   isNull=36 '$') at nodeAgg.c:385
 
#8  0x08151aef in advance_aggregates (aggstate=0x83e5b3c, pergroup=0x83ec7d8)    at nodeAgg.c:447
#9  0x081521c2 in agg_retrieve_direct (aggstate=0x83e5b3c) at nodeAgg.c:785
#10 0x0814844b in ExecProcNode (node=0x83e5b3c) at execProcnode.c:377
#11 0x081469bc in ExecutePlan (estate=0x83e58a4, planstate=0x83e5b3c,    operation=CMD_SELECT, numberTuples=1,
direction=NoMovementScanDirection,   dest=0x8321144) at execMain.c:1107
 
#12 0x08145b3b in ExecutorRun (queryDesc=0x83da174,    direction=ForwardScanDirection, count=0) at execMain.c:231
#13 0x0815e8bc in _SPI_pquery (queryDesc=0x83da174, tcount=0) at spi.c:1536
#14 0x0815e631 in _SPI_execute_plan (plan=0x83dc1c4, Values=0x83d1134,    Nulls=0x83d1148 " ~", snapshot=0x0,
crosscheck_snapshot=0x0,   read_only=1 '\001', tcount=1) at spi.c:1464
 
#15 0x0815c969 in SPI_execute_plan (plan=0x83dc1c4, Values=0x83d1134,    Nulls=0x0, read_only=1 '\001', tcount=1) at
spi.c:335
#16 0x4c852195 in exec_run_select (estate=0xbfffe400, expr=0x83d38dc,    maxtuples=0, portalP=0x0) at pl_exec.c:3716
#17 0x4c84e5ae in exec_stmt_select (estate=0xbfffe400, stmt=0x83d3928)    at pl_exec.c:1654
#18 0x4c84d98f in exec_stmt (estate=0xbfffe400, stmt=0x83d3928)    at pl_exec.c:1045
#19 0x4c84d86e in exec_stmts (estate=0xffffffff, stmts=0x4020ad24)    at pl_exec.c:981
#20 0x4c84d73b in exec_stmt_block (estate=0xbfffe400, block=0x83d39ec)    at pl_exec.c:937
#21 0x4c84c68a in plpgsql_exec_function (func=0x83d2904, fcinfo=0xbfffe4e0)    at pl_exec.c:286
#22 0x4c848a15 in plpgsql_call_handler (fcinfo=0xbfffe4e0) at pl_handler.c:123
#23 0x08149c07 in ExecMakeFunctionResult (fcache=0x83c8720,    econtext=0x83c8b78, isNull=0xbfffe749 "\001S",
isDone=0x0)   at execQual.c:1031
 
#24 0x0814c375 in ExecEvalExprSwitchContext (expression=0x6,    econtext=0x4020ad24, isNull=0x0, isDone=0x0) at
execQual.c:2808
#25 0x0819c275 in evaluate_expr (expr=0x0, result_type=16977) at clauses.c:2654
#26 0x0819b948 in simplify_function (funcid=5439893, result_type=16977,    args=0x83bf004, allow_inline=1 '\001',
context=0xbfffe7f0)   at clauses.c:2162
 
#27 0x0819b4b4 in eval_const_expressions_mutator (node=0x530195,    context=0xbfffe7f0) at clauses.c:1308
#28 0x0819aa2a in eval_const_expressions (node=0x0) at clauses.c:1214
#29 0x081916f7 in preprocess_expression (root=0x83bf004, expr=0x4020ad24,    kind=1283697108) at planner.c:443
#30 0x0819165f in subquery_planner (parse=0x83be7a0, tuple_fraction=0,    subquery_pathkeys=0x0) at planner.c:290
#31 0x0819124c in planner (parse=0x83be7a0, isCursor=0 '\0', cursorOptions=0,    boundParams=0x0) at planner.c:135
#32 0x081d574e in pg_plan_query (querytree=0x83be7a0, boundParams=0x0)    at postgres.c:725
#33 0x081d580d in pg_plan_queries (querytrees=0x4020ad24, boundParams=0x0,    needSnapshot=0 '\0') at postgres.c:793
#34 0x081d5a3f in exec_simple_query (    query_string=0x83be1e4 "select query from rquery('new&york&hotel') as query;")
  at postgres.c:958
 
#35 0x081d8778 in PostgresMain (argc=4, argv=0x8364388,    username=0x8364360 "megera") at postgres.c:3160
#36 0x081acc42 in BackendRun (port=0x837d350) at postmaster.c:2864
#37 0x081ac630 in BackendStartup (port=0x837d350) at postmaster.c:2505
#38 0x081aa8d0 in ServerLoop () at postmaster.c:1232
#39 0x081a9c19 in PostmasterMain (argc=1, argv=0x8363578) at postmaster.c:941
#40 0x0816715e in main (argc=1, argv=0x8363578) at main.c:268
#41 0x400edd06 in __libc_start_main () from /lib/libc.so.6

create or replace function rquery(text) returns tsquery as
$$

DECLARE        inquery ALIAS FOR $1;        outquery tsquery;
BEGIN        select into outquery tp_rewrite(ARRAY[query, place.name_tsquery])        from place,to_tsquery(inquery) as
querywhere query @ name_tsquery        and name ~ ' ';
 
        RETURN outquery;
END;
$$
language plpgsql immutable;


    Regards,        Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Adding a new node to the executor
Следующее
От: Tom Lane
Дата:
Сообщение: Re: core dump with last CVS