Many 8.3 server crashes in xmlCleanupCharEncodingHandlers()

Поиск
Список
Период
Сортировка
От Matt Magoffin
Тема Many 8.3 server crashes in xmlCleanupCharEncodingHandlers()
Дата
Msg-id 49988.192.168.1.108.1197951927.squirrel@msqr.us
обсуждение исходный текст
Ответы Re: Many 8.3 server crashes in xmlCleanupCharEncodingHandlers()  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Many 8.3 server crashes in xmlCleanupCharEncodingHandlers()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello, I'm using 8.3b4 and keep experiencing server crash when I execute
various queries using XML functions. The crash backtraces look like this:

---
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x3f847ae1
0x004b140c in xmlCleanupCharEncodingHandlers ()
(gdb) bt
#0  0x004b140c in xmlCleanupCharEncodingHandlers ()
#1  0x004d01fc in xmlCleanupParser ()
#2  0x0026d514 in xpath (fcinfo=<value temporarily unavailable, due to
optimizations>) at xml.c:3441
#3  0x0010b908 in ExecMakeFunctionResult (fcache=0xa08474,
econtext=0x7fe9ec, isNull=0xbfffdb08 "", isDone=0xbfffd8c8) at
execQual.c:1351
#4  0x0010a120 in ExecEvalArrayCoerceExpr (astate=0xa08428,
econtext=0x7fe9ec, isNull=0xbfffdb08 "", isDone=0xbfffd8c8) at
execQual.c:3633
#5  0x0010b4c0 in ExecEvalFuncArgs (fcinfo=0xbfffd968, argList=<value
temporarily unavailable, due to optimizations>, econtext=0x7fe9ec) at
execQual.c:1111
#6  0x0010b5fc in ExecMakeFunctionResult (fcache=0xa0801c,
econtext=0x7fe9ec, isNull=0xbfffdbf8 "", isDone=0x0) at execQual.c:1169
#7  0x0010c120 in ExecQual (qual=<value temporarily unavailable, due to
optimizations>, econtext=0x7fe9ec, resultForNull=<value temporarily
unavailable, due to optimizations>) at execQual.c:4501
#8  0x0010fcb8 in ExecScan (node=0x7fe960, accessMtd=0x119a20 <IndexNext>)
at execScan.c:131
#9  0x00107e80 in ExecProcNode (node=0x7fe960) at execProcnode.c:338
#10 0x0011c818 in ExecNestLoop (node=0x107bb8c) at nodeNestloop.c:170
#11 0x00107ee0 in ExecProcNode (node=0x107bb8c) at execProcnode.c:367
#12 0x0011e158 in ExecSort (node=0x107bb00) at nodeSort.c:102
#13 0x00107f20 in ExecProcNode (node=0x107bb00) at execProcnode.c:386
#14 0x00105f28 in ExecutorRun (queryDesc=<value temporarily unavailable,
due to optimizations>, direction=ForwardScanDirection, count=0) at
execMain.c:1233
#15 0x001c6834 in PortalRunSelect (portal=0x104be1c, forward=<value
temporarily unavailable, due to optimizations>, count=0, dest=0x103a228)
at pquery.c:943
#16 0x001c7c4c in PortalRun (portal=0x104be1c, count=2147483647,
isTopLevel=0 '\0', dest=0x103a228, altdest=0x103a228,
completionTag=0xbfffe3c4 "") at pquery.c:769
#17 0x001c59b4 in PostgresMain (argc=<value temporarily unavailable, due
to optimizations>, argv=<value temporarily unavailable, due to
optimizations>, username=<value temporarily unavailable, due to
optimizations>) at postgres.c:1844
#18 0x0018a468 in ServerLoop () at postmaster.c:3180
#19 0x0018b974 in PostmasterMain (argc=4, argv=0x800550) at postmaster.c:1028
#20 0x0012e2fc in main (argc=4, argv=0x800550) at main.c:188

---
#0  0x95c59ca8 in __kill ()
#1  0x95cfe7b8 in abort ()
#2  0x00281338 in ExceptionalCondition (conditionName=<value temporarily
unavailable, due to optimizations>, errorType=<value temporarily
unavailable, due to optimizations>, fileName=<value temporarily
unavailable, due to optimizations>, lineNumber=<value temporarily
unavailable, due to optimizations>) at assert.c:57
#3  0x002a1460 in pfree (pointer=0x207) at mcxt.c:581
#4  0x004b1428 in xmlCleanupCharEncodingHandlers ()
#5  0x004d01fc in xmlCleanupParser ()
#6  0x0026d514 in xpath (fcinfo=<value temporarily unavailable, due to
optimizations>) at xml.c:3441
#7  0x0010b908 in ExecMakeFunctionResult (fcache=0xa08474,
econtext=0x7fe9ec, isNull=0xbfffdb08 "", isDone=0xbfffd8c8) at
execQual.c:1351
#8  0x0010a120 in ExecEvalArrayCoerceExpr (astate=0xa08428,
econtext=0x7fe9ec, isNull=0xbfffdb08 "", isDone=0xbfffd8c8) at
execQual.c:3633
#9  0x0010b4c0 in ExecEvalFuncArgs (fcinfo=0xbfffd968, argList=<value
temporarily unavailable, due to optimizations>, econtext=0x7fe9ec) at
execQual.c:1111
#10 0x0010b5fc in ExecMakeFunctionResult (fcache=0xa0801c,
econtext=0x7fe9ec, isNull=0xbfffdbf8 "", isDone=0x0) at execQual.c:1169
#11 0x0010c120 in ExecQual (qual=<value temporarily unavailable, due to
optimizations>, econtext=0x7fe9ec, resultForNull=<value temporarily
unavailable, due to optimizations>) at execQual.c:4501
#12 0x0010fcb8 in ExecScan (node=0x7fe960, accessMtd=0x119a20 <IndexNext>)
at execScan.c:131
#13 0x00107e80 in ExecProcNode (node=0x7fe960) at execProcnode.c:338
#14 0x0011c818 in ExecNestLoop (node=0x107c58c) at nodeNestloop.c:170
#15 0x00107ee0 in ExecProcNode (node=0x107c58c) at execProcnode.c:367
#16 0x0011e158 in ExecSort (node=0x107c500) at nodeSort.c:102
#17 0x00107f20 in ExecProcNode (node=0x107c500) at execProcnode.c:386
#18 0x00105f28 in ExecutorRun (queryDesc=<value temporarily unavailable,
due to optimizations>, direction=ForwardScanDirection, count=0) at
execMain.c:1233
#19 0x001c6834 in PortalRunSelect (portal=0x104781c, forward=<value
temporarily unavailable, due to optimizations>, count=0, dest=0x102d828)
at pquery.c:943
#20 0x001c7c4c in PortalRun (portal=0x104781c, count=2147483647,
isTopLevel=0 '\0', dest=0x102d828, altdest=0x102d828,
completionTag=0xbfffe3c4 "") at pquery.c:769
#21 0x001c59b4 in PostgresMain (argc=<value temporarily unavailable, due
to optimizations>, argv=<value temporarily unavailable, due to
optimizations>, username=<value temporarily unavailable, due to
optimizations>) at postgres.c:1844
#22 0x0018a468 in ServerLoop () at postmaster.c:3180
#23 0x0018b974 in PostmasterMain (argc=4, argv=0x800550) at postmaster.c:1028
#24 0x0012e2fc in main (argc=4, argv=0x800550) at main.c:188

The queries are executing via JDBC. When I then manually run the same
query in psql, filling in the statement parameters that were passed to the
query in Java, I seem to be able to run the query without error. An
example query plan is this:

 Sort  (cost=1815.26..1815.26 rows=1 width=58)
   Sort Key: m.range
   ->  Nested Loop  (cost=1371.75..1815.25 rows=1 width=58)
         ->  Unique  (cost=1371.75..1372.15 rows=53 width=40)
               ->  Sort  (cost=1371.75..1371.88 rows=53 width=40)
                     Sort Key: s.vin, m.lost_sale, m.lead_pos
                     ->  Hash Join  (cost=768.80..1370.23 rows=53 width=40)
                           Hash Cond: (m.sale_id = s.id)
                           ->  Seq Scan on mb_lead m  (cost=0.00..561.25
rows=10573 width=26)
                                 Filter: (NOT lost_sale)
                           ->  Hash  (cost=760.44..760.44 rows=669 width=30)
                                 ->  Index Scan using
mb_sale_sale_date_idx on mb_sale s
(cost=0.00..760.44 rows=669 width=30)
                                       Index Cond: ((sale_date >=
'2007-09-01'::date) AND (sale_date
< '2007-10-01'::date))
                                       Filter: (sale_type = 'd'::bpchar)
         ->  Index Scan using lead_pkey on lead l  (cost=0.00..8.34 rows=1
width=16)
               Index Cond: (l.id = m.lead_id)
               Filter:
((xpath('/als:auto-lead-service/als:meta[@key="com.autoleadservice.TypeFlag"]/text()'::text,
l.xml,
'{{als,http://autoleadservice.com/xml/als}}'::text[]))::text[]
&& '{foo,bar}'::text[])

Any ideas?

-- m@

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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: insert into t1 (delete from t0 returning *)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Many 8.3 server crashes in xmlCleanupCharEncodingHandlers()