Re: 8.3b2 XPath-based function index server crash - Mailing list pgsql-general

From Matt Magoffin
Subject Re: 8.3b2 XPath-based function index server crash
Date
Msg-id 50057.192.168.1.108.1195434607.squirrel@msqr.us
Whole thread Raw
In response to Re: 8.3b2 XPath-based function index server crash  ("Matt Magoffin" <postgresql.org@msqr.us>)
Responses Re: 8.3b2 XPath-based function index server crash  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>>> (gdb) bt
>>> #0  0xffff8820 in __memcpy ()
>>> #1  0x004d9098 in xmlBufferAdd ()
>>> #2  0x004e0dc4 in xmlParserInputBufferCreateMem ()
>>> #3  0x004ced98 in xmlCtxtReadMemory ()
>>> #4  0x0026ea0c in xpath (fcinfo=0x37) at xml.c:3183
>>> #5  0x001095bc in ExecMakeFunctionResultNoSets (fcache=0x10563fc,
>>> econtext=0x10562a8, isNull=0xbfffd4f8 "\004Y?P", isDone=0x0) at
>>> execQual.c:1412
>>
>> [ squint... ]  Hmm, that seems to be in the same general area as some
>> post-beta2 fixes.  Before we spend more time on this, could you update
>> to 8.3beta3 and see if the problem is still there?  b3 is not officially
>> announced yet, but the tarballs are up.
>
> I tried looking for the 8.3b3 tarballs, but can't find them on any
> download host I've tried (starting with ftp.postgresql.org, looking in the
> source directory). Are they available some place else?

I took the latest snapshot from /dev, but I still get the same crash:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x00a4b000
0xffff8b1c in __memcpy ()
(gdb) bt
#0  0xffff8b1c in __memcpy ()
#1  0x004da098 in xmlBufferAdd ()
#2  0x004e1dc4 in xmlParserInputBufferCreateMem ()
#3  0x004cfd98 in xmlCtxtReadMemory ()
#4  0x0026c32c in xpath (fcinfo=<value temporarily unavailable, due to
optimizations>) at xml.c:3355
#5  0x001095cc in ExecMakeFunctionResultNoSets (fcache=0x10613fc,
econtext=0x10612a8, isNull=0xbfffd4f8 "\004\004?,", isDone=0x0) at
execQual.c:1412
#6  0x00109650 in ExecEvalArrayRef (astate=0x1061364, econtext=0x10612a8,
isNull=0xbfffd4f8 "\004\004?,", isDone=0x0) at execQual.c:254
#7  0x0010d560 in ExecEvalXml (xmlExpr=0x1061324, econtext=0x10612a8,
isNull=0xbfffd5d8 "\001)?\f", isDone=<value temporarily unavailable, due
to optimizations>) at execQual.c:3012
#8  0x0010ae28 in ExecEvalExprSwitchContext (expression=<value temporarily
unavailable, due to optimizations>, econtext=<value temporarily
unavailable, due to optimizations>, isNull=<value temporarily unavailable,
due to optimizations>, isDone=<value temporarily unavailable, due to
optimizations>) at execQual.c:3726
#9  0x00075e00 in FormIndexDatum (indexInfo=0x1054a1c, slot=0x105451c,
estate=0x106121c, values=0xbfffd69c, isnull=0xbfffd67c "") at index.c:1065
#10 0x00076a58 in IndexBuildHeapScan (heapRelation=0x7bc220,
indexRelation=0x7bedcc, indexInfo=0x1054a1c, callback=0x36690
<btbuildCallback>, callback_state=0xbfffda08) at index.c:1734
#11 0x000365fc in btbuild (fcinfo=<value temporarily unavailable, due to
optimizations>) at nbtree.c:119
#12 0x00287168 in OidFunctionCall3 (functionId=<value temporarily
unavailable, due to optimizations>, arg1=8110624, arg2=8121804,
arg3=17123868) at fmgr.c:1580
#13 0x000747a4 in index_build (heapRelation=0x7bc220,
indexRelation=0x7bedcc, indexInfo=0x1054a1c, isprimary=0 '\0') at
index.c:1355
#14 0x00075c20 in index_create (heapRelationId=601643,
indexRelationName=0x1053fa0 "assigned_area_idx", indexRelationId=991232,
indexInfo=0x1054a1c, accessMethodObjectId=403, tableSpaceId=0,
classObjectId=0x10550c4, coloptions=0x10554e4, reloptions=0, isprimary=0
'\0', isconstraint=0 '\0', allow_system_table_mods=0 '\0', skip_build=0
'\0', concurrent=0 '\0') at index.c:841
#15 0x000ce824 in DefineIndex (heapRelation=0x1053fcc,
indexRelationName=0x1053fa0 "assigned_area_idx", indexRelationId=0,
accessMethodName=0x105400c "btree", tableSpaceName=0x273a "",
attributeList=0x1054020, predicate=0x19, options=0x0, src_options=0x0,
unique=0 '\0', primary=0 '\0', isconstraint=0 '\0', is_alter_table=0 '\0',
check_rights=1 '\001', skip_build=0 '\0', quiet=0 '\0', concurrent=0 '\0')
at indexcmds.c:452
#16 0x001c946c in ProcessUtility (parsetree=0x103ac88,
queryString=0x1053e1c "create index assigned_area_idx ON lead
(\nXMLSERIALIZE(CONTENT(xpath('/als:auto-lead-service/als:meta[@key=\"AREA\"][1]/text()',
xml,\nARRAY[ARRAY['als','http://au"..., params=0x0, isTopLevel=1 '\001',
dest=0x103ad04, completionTag=<value temporarily unavailable, due to
optimizations>) at utility.c:919
#17 0x001c5fec in PortalRunUtility (portal=0x1047c1c,
utilityStmt=0x103ac88, isTopLevel=1 '\001', dest=0x103ad04,
completionTag=0xbfffe4ca "") at pquery.c:1173
#18 0x001c6470 in PortalRunMulti (portal=0x1047c1c, isTopLevel=1 '\001',
dest=0x103ad04, altdest=0x103ad04, completionTag=0xbfffe4ca "") at
pquery.c:1266
#19 0x001c6dfc in PortalRun (portal=0x1047c1c, count=2147483647,
isTopLevel=0 '\0', dest=0x103ad04, altdest=0x103ad04,
completionTag=0xbfffe4ca "") at pquery.c:813
#20 0x001c1f04 in exec_simple_query (query_string=0x1039e1c "create index
assigned_area_idx ON lead

(\nXMLSERIALIZE(CONTENT(xpath('/als:auto-lead-service/als:meta[@key=\"com.autoleadservice.service.AssignDealer.AREA\"][1]/text()',
xml,\nARRAY[ARRAY['als','http://au"...) at postgres.c:963
#21 0x001c3cdc in PostgresMain (argc=4, argv=<value temporarily
unavailable, due to optimizations>, username=0x1001454 "lms") at
postgres.c:3531
#22 0x001894e8 in ServerLoop () at postmaster.c:3180
#23 0x0018a9f4 in PostmasterMain (argc=8, argv=0x800420) at postmaster.c:1028
#24 0x0012d4ac in main (argc=8, argv=0x800420) at main.c:188



pgsql-general by date:

Previous
From: "Matt Magoffin"
Date:
Subject: Re: 8.3b2 XPath-based function index server crash
Next
From: Ow Mun Heng
Date:
Subject: Re: getting the number of rows affected by a query