Making postgres go BOOM

4 views
Skip to first unread message

Jonathan Leto

unread,
Mar 28, 2010, 2:47:12 PM3/28/10
to plpa...@googlegroups.com
Howdy,

I am working on getting function arguments passed from Postgres ->
Parrot and I made this happen:

TRAP: FailedAssertion("!((((varattrib_1b_e *) (attre))->va_len_1be) ==
sizeof(toast_pointer) + 2)", File: "tuptoaster.c", Line: 1369)

Anybody know if this is me being dumb, a bug (or lack of robustness)
in Postgres, or a mixture of both?

This happens on commit 3fa06d2 of the fill_pmc_args branch, on
linux-amd64 with postgres master
c40ed912630bfd3d09ba93c64cdbbde61a2087ae .

Full backtrace:

#0 0x00002b424a1cf265 in raise () from /lib64/libc.so.6
#1 0x00002b424a1d0d10 in abort () from /lib64/libc.so.6
#2 0x00000000006cc96d in ExceptionalCondition (conditionName=<value
optimized out>, errorType=<value optimized out>, fileName=<value
optimized out>,
lineNumber=<value optimized out>) at assert.c:57
#3 0x0000000000471a32 in toast_fetch_datum (attr=<value optimized
out>) at tuptoaster.c:1369
#4 0x00000000004725fa in heap_tuple_untoast_attr (attr=0x723b900) at
tuptoaster.c:133
#5 0x000000000068ee66 in textcat (fcinfo=0x7fff36771200) at varlena.c:570
#6 0x00000000005608a2 in ExecMakeFunctionResult (fcache=0x76b9360,
econtext=0x75b8e70, isNull=0x7fff36771a20 "\027",
isDone=0x7fff36771684)
at execQual.c:1827
#7 0x000000000055d5fc in ExecEvalFuncArgs (fcinfo=0x7fff367716e0,
argList=<value optimized out>, econtext=0x75b8e70) at execQual.c:1358
#8 0x0000000000560701 in ExecMakeFunctionResult (fcache=0x76b8b48,
econtext=0x75b8e70, isNull=0x7fff36771f00 "\020?l\a",
isDone=0x7fff36771b64)
at execQual.c:1605
#9 0x000000000055d5fc in ExecEvalFuncArgs (fcinfo=0x7fff36771bc0,
argList=<value optimized out>, econtext=0x75b8e70) at execQual.c:1358
#10 0x0000000000560701 in ExecMakeFunctionResult (fcache=0x76b8330,
econtext=0x75b8e70, isNull=0x7fff367723e0 "", isDone=0x7fff36772044)
at execQual.c:1605
#11 0x000000000055d5fc in ExecEvalFuncArgs (fcinfo=0x7fff367720a0,
argList=<value optimized out>, econtext=0x75b8e70) at execQual.c:1358
#12 0x0000000000560701 in ExecMakeFunctionResult (fcache=0x76b7b18,
econtext=0x75b8e70, isNull=0x7fff367728c0 "", isDone=0x7fff36772524)
at execQual.c:1605
#13 0x000000000055d5fc in ExecEvalFuncArgs (fcinfo=0x7fff36772580,
argList=<value optimized out>, econtext=0x75b8e70) at execQual.c:1358
#14 0x0000000000560701 in ExecMakeFunctionResult (fcache=0x76b7300,
econtext=0x75b8e70, isNull=0x7fff36772da0 "", isDone=0x7fff36772a04)
at execQual.c:1605
#15 0x000000000055d5fc in ExecEvalFuncArgs (fcinfo=0x7fff36772a60,
argList=<value optimized out>, econtext=0x75b8e70) at execQual.c:1358
#16 0x0000000000560701 in ExecMakeFunctionResult (fcache=0x76b6ae8,
econtext=0x75b8e70, isNull=0x7fff36773281 "\206f",
isDone=0x7fff36772ee4)
at execQual.c:1605
#17 0x000000000055d5fc in ExecEvalFuncArgs (fcinfo=0x7fff36772f40,
argList=<value optimized out>, econtext=0x75b8e70) at execQual.c:1358
#18 0x0000000000560701 in ExecMakeFunctionResult (fcache=0x76b6238,
econtext=0x75b8e70, isNull=0x7fff36773761 "Ik\a",
isDone=0x7fff367733c4)
at execQual.c:1605
#19 0x000000000055d5fc in ExecEvalFuncArgs (fcinfo=0x7fff36773420,
argList=<value optimized out>, econtext=0x75b8e70) at execQual.c:1358
#20 0x0000000000560701 in ExecMakeFunctionResult (fcache=0x76b5988,
econtext=0x75b8e70, isNull=0x7fff36773c41 "", isDone=0x7fff367738a4)
at execQual.c:1605
#21 0x000000000055d5fc in ExecEvalFuncArgs (fcinfo=0x7fff36773900,
argList=<value optimized out>, econtext=0x75b8e70) at execQual.c:1358
#22 0x0000000000560701 in ExecMakeFunctionResult (fcache=0x76b4f20,
econtext=0x75b8e70, isNull=0x7fff36773fd0 "\001", isDone=0x0) at
execQual.c:1605
#23 0x00002b4250169827 in exec_eval_expr (estate=0x7fff36773fc0,
expr=0x7656110, isNull=0x7fff36773fd0 "\001", rettype=<value optimized
out>)
at pl_exec.c:4518
#24 0x00002b425016dcef in exec_stmts (estate=0x7fff36773fc0,
stmts=<value optimized out>) at pl_exec.c:2140
#25 0x00002b425016cbb6 in exec_stmt_block (estate=0x7fff36773fc0,
block=0x76562e8) at pl_exec.c:1167
#26 0x00002b425016f28f in plpgsql_exec_function (func=0x75d39e8,
fcinfo=0x7fff36774220) at pl_exec.c:316
#27 0x00002b4250164aa3 in plpgsql_call_handler (fcinfo=0x7fff36774220)
at pl_handler.c:122
#28 0x00000000005608a2 in ExecMakeFunctionResult (fcache=0x75e77b0,
econtext=0x75e7588, isNull=0x75e8a98
"\177~\177\177\177\177\177\1778q]\a",
isDone=0x75e8bd8) at execQual.c:1827
#29 0x000000000055d373 in ExecProject (projInfo=<value optimized out>,
isDone=0x7fff3677470c) at execQual.c:5079
#30 0x00000000005736c3 in ExecResult (node=0x75e7470) at nodeResult.c:155
#31 0x000000000055cd06 in ExecProcNode (node=0x75e7470) at execProcnode.c:355
#32 0x000000000055ba25 in standard_ExecutorRun (queryDesc=0x71b29a8,
direction=11963, count=0) at execMain.c:1190
#33 0x000000000061cac6 in PortalRunSelect (portal=0x71af168,
forward=<value optimized out>, count=0, dest=0x75e60f0) at
pquery.c:952
#34 0x000000000061e200 in PortalRun (portal=0x71af168,
count=9223372036854775807, isTopLevel=1 '\001', dest=0x75e60f0,
altdest=0x75e60f0,
completionTag=0x7fff36774970 "") at pquery.c:796
#35 0x000000000061a53b in exec_simple_query (query_string=0x723ee48
"select is(test_varchar(), 'cheese', 'We can return a varchar');") at
postgres.c:1051
#36 0x000000000061b738 in PostgresMain (argc=<value optimized out>,
argv=<value optimized out>, username=<value optimized out>) at
postgres.c:3864
#37 0x00000000005e44a2 in ServerLoop () at postmaster.c:3482
#38 0x00000000005e5074 in PostmasterMain (argc=3, argv=0x718f240) at
postmaster.c:1085
#39 0x000000000058971e in main (argc=3, argv=<value optimized out>) at
main.c:188

Duke

--
Jonathan "Duke" Leto
jona...@leto.net
http://leto.net

Reply all
Reply to author
Forward
0 new messages