Re: pg11.1 jit segv

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg11.1 jit segv
Date: 2018-11-17 16:13:58
Message-ID: 20181117161358.GV10913@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 16, 2018 at 05:47:24PM -0800, Andres Freund wrote:
> That's probably just the same issue as before, namely random data
> somehow being produced as the result of tuple deforming.

Does this help at all?

ts=# SELECT utrancell FROM child.daily_eric_umts_rnc_utrancell_view_201807 LIMIT 9;
ERROR: invalid memory alloc request size 18446744073709551613

Note that's a table named after a view, and not itself a view..

(gdb) b errfinish
Breakpoint 3 at 0x891a00: file elog.c, line 411.
(gdb) c
Continuing.
SELECT start_time, site_id, sect_id, rnc_id, utrancell, eul_harq_ps_trans_tti2_1 FROM child.daily_eric_umts_rnc_utrancell_view_201801 LIMIT 1;
1: start_time (typeid = 1114, len = 8, typmod = -1, byval = t)
2: site_id (typeid = 23, len = 4, typmod = -1, byval = t)
3: sect_id (typeid = 23, len = 4, typmod = -1, byval = t)
4: rnc_id (typeid = 23, len = 4, typmod = -1, byval = t)
5: utrancell (typeid = 25, len = -1, typmod = -1, byval = f)
6: eul_harq_ps_trans_tti2_1 (typeid = 20, len = 8, typmod = -1, byval = t)
----
1: start_time = "2000-01-01 00:00:00" (typeid = 1114, len = 8, typmod = -1, byval = t)
2: site_id = "0" (typeid = 23, len = 4, typmod = -1, byval = t)
3: sect_id = "0" (typeid = 23, len = 4, typmod = -1, byval = t)
4: rnc_id = "0" (typeid = 23, len = 4, typmod = -1, byval = t)

The error occurs when selecting the 5th column, which is "text not null"; but,
the other fields are also garbage (namely 0).

#0 slot_compile_deform (context=context(at)entry=0xe184b8, desc=desc(at)entry=0xe9baf0, ops=ops(at)entry=0xa21020 <TTSOpsBufferHeapTuple>, natts=5) at llvmjit_deform.c:36
#1 0x00007fffe72535f5 in llvm_compile_expr (state=0xed8458) at llvmjit_expr.c:325
#2 0x000000000061e429 in ExecReadyExpr (state=state(at)entry=0xed8458) at execExpr.c:628
#3 0x00000000006219b4 in ExecBuildProjectionInfo (targetList=<optimized out>, econtext=<optimized out>, slot=<optimized out>, parent=parent(at)entry=0xed7d40, inputDesc=inputDesc(at)entry=0xe9baf0) at execExpr.c:472
#4 0x00000000006370b2 in ExecAssignProjectionInfo (planstate=planstate(at)entry=0xed7d40, inputDesc=inputDesc(at)entry=0xe9baf0) at execUtils.c:501
#5 0x00000000006371c6 in ExecConditionalAssignProjectionInfo (planstate=planstate(at)entry=0xed7d40, inputDesc=0xe9baf0, varno=<optimized out>) at execUtils.c:539
#6 0x0000000000632627 in ExecAssignScanProjectionInfo (node=node(at)entry=0xed7d40) at execScan.c:240
#7 0x0000000000655867 in ExecInitSeqScan (node=node(at)entry=0xeecbb8, estate=estate(at)entry=0xed78d8, eflags=eflags(at)entry=16) at nodeSeqscan.c:182
#8 0x0000000000630e53 in ExecInitNode (node=0xeecbb8, estate=estate(at)entry=0xed78d8, eflags=eflags(at)entry=16) at execProcnode.c:207
#9 0x000000000064c78a in ExecInitLimit (node=node(at)entry=0xeecc50, estate=estate(at)entry=0xed78d8, eflags=eflags(at)entry=16) at nodeLimit.c:368
#10 0x0000000000630b52 in ExecInitNode (node=node(at)entry=0xeecc50, estate=estate(at)entry=0xed78d8, eflags=eflags(at)entry=16) at execProcnode.c:363
#11 0x000000000062ac45 in InitPlan (eflags=16, queryDesc=<optimized out>) at execMain.c:1025
#12 standard_ExecutorStart (queryDesc=<optimized out>, eflags=16) at execMain.c:265
#13 0x0000000000784fdb in PortalStart (portal=portal(at)entry=0xe48528, params=params(at)entry=0x0, eflags=eflags(at)entry=0, snapshot=snapshot(at)entry=0x0) at pquery.c:520
#14 0x0000000000781218 in exec_simple_query (query_string=0xe56568 "SELECT start_time,site_id,sect_id,rnc_id,utrancell FROM child.daily_eric_umts_rnc_utrancell_view_201801 LIMIT 1\n") at postgres.c:1176
#15 0x00000000007825c2 in PostgresMain (argc=argc(at)entry=17, argv=argv(at)entry=0xddbb40, dbname=0xdfcd70 "postgres", dbname(at)entry=0x0, username=<optimized out>) at postgres.c:4243
#16 0x000000000047d8be in main (argc=17, argv=0xddbb40) at main.c:224

#0 errfinish (dummy=dummy(at)entry=0) at elog.c:411
#1 0x0000000000895379 in elog_finish (elevel=elevel(at)entry=20, fmt=fmt(at)entry=0xaabf68 "invalid memory alloc request size %zu") at elog.c:1365
#2 0x00000000008bb46e in palloc (size=18446744073709551613) at mcxt.c:934
#3 0x000000000086ad3a in text_to_cstring (t=0x7fffe7b83344) at varlena.c:189
#4 0x0000000000897ed5 in FunctionCall1Coll (flinfo=flinfo(at)entry=0x7fffffffdce0, collation=collation(at)entry=0, arg1=arg1(at)entry=140737080996676) at fmgr.c:1123
#5 0x0000000000899206 in OutputFunctionCall (val=140737080996676, flinfo=0x7fffffffdce0) at fmgr.c:1755
#6 OidOutputFunctionCall (functionId=<optimized out>, val=val(at)entry=140737080996676) at fmgr.c:1838
#7 0x000000000048b57b in debugtup (slot=0xed8330, self=<optimized out>) at printtup.c:625
#8 0x0000000000629a50 in ExecutePlan (execute_once=<optimized out>, dest=0xa66160 <debugtupDR>, direction=<optimized out>, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=<optimized out>,
planstate=0xed7ad0, estate=0xed7878) at execMain.c:1748
#9 standard_ExecutorRun (queryDesc=0xe6ac78, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:364
#10 0x000000000078409b in PortalRunSelect (portal=portal(at)entry=0xe484c8, forward=forward(at)entry=true, count=0, count(at)entry=9223372036854775807, dest=dest(at)entry=0xa66160 <debugtupDR>) at pquery.c:932
#11 0x00000000007855b8 in PortalRun (portal=portal(at)entry=0xe484c8, count=count(at)entry=9223372036854775807, isTopLevel=isTopLevel(at)entry=true, run_once=run_once(at)entry=true, dest=dest(at)entry=0xa66160 <debugtupDR>,
altdest=altdest(at)entry=0xa66160 <debugtupDR>, completionTag=completionTag(at)entry=0x7fffffffdfc0 "") at pquery.c:773
#12 0x000000000078128d in exec_simple_query (query_string=0xe56508 "SELECT start_time,site_id,sect_id,rnc_id,utrancell,eul_harq_ps_trans_tti2_1 FROM child.daily_eric_umts_rnc_utrancell_view_201801 LIMIT 1;\n")
at postgres.c:1215
#13 0x00000000007825c2 in PostgresMain (argc=argc(at)entry=15, argv=argv(at)entry=0xddbb40, dbname=0xdfcd30 "postgres", dbname(at)entry=0x0, username=<optimized out>) at postgres.c:4243
#14 0x000000000047d8be in main (argc=15, argv=0xddbb40) at main.c:224

Justin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-11-17 16:14:49 Re: BUG #15449: file_fdw using program cause exit code error when using LIMIT
Previous Message Fabien COELHO 2018-11-17 16:12:41 Re: fix psql \conninfo & \connect when using hostaddr