Another assert failure from no-palloc-in-critical-sections

Поиск
Список
Период
Сортировка
Искать

Another assert failure from no-palloc-in-critical-sections

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
I tried the test case given in
http://www.postgresql.org/message-id/dafad644f268ce1503e1b8b682aae38a.squirrel@webmail.xs4all.nl
on HEAD.  It asserted here:

#2  0x000000000077b419 in ExceptionalCondition (   conditionName=, errorType=,    fileName=, lineNumber=)   at assert.c:54
#3  0x000000000079be76 in palloc (size=384) at mcxt.c:670
#4  0x0000000000479408 in ginCompressPostingList (ipd=0x7f13343bb048,    nipd=272428, maxsize=384, nwritten=0x7fff1d832eec) at ginpostinglist.c:191
#5  0x000000000046b92b in createPostingTree (index=0x7f1348ae31e0,    items=0x7f13343bb048, nitems=272428, buildStats=0x7fff1d835670)   at gindatapage.c:1739
#6  0x0000000000465206 in buildFreshLeafTuple (ginstate=0x7fff1d8330b0,    attnum=1, key=2105441, category=0 '\000', items=0x7f13343bb048,    nitem=272428, buildStats=0x7fff1d835670) at gininsert.c:158
#7  ginEntryInsert (ginstate=0x7fff1d8330b0, attnum=1, key=2105441,    category=0 '\000', items=0x7f13343bb048, nitem=272428,    buildStats=0x7fff1d835670) at gininsert.c:228
#8  0x0000000000465863 in ginbuild (fcinfo=)   at gininsert.c:408
#9  0x0000000000784654 in OidFunctionCall3Coll (   functionId=, collation=0, arg1=139720800461152,    arg2=139720800481760, arg3=31056056) at fmgr.c:1650
#10 0x00000000004f18ba in index_build (heapRelation=0x7f1348ade160,    indexRelation=0x7f1348ae31e0, indexInfo=0x1d9e0b8, isprimary=0 '\000',    isreindex=0 '\000') at index.c:1962
		regards, tom lane


Re: Another assert failure from no-palloc-in-critical-sections

От:
Heikki Linnakangas <hlinnakangas@vmware.com>
Дата:
On 04/05/2014 08:08 PM, Tom Lane wrote:
> I tried the test case given in
> http://www.postgresql.org/message-id/dafad644f268ce1503e1b8b682aae38a.squirrel@webmail.xs4all.nl
> on HEAD.  It asserted here:
>...
> #5  0x000000000046b92b in createPostingTree (index=0x7f1348ae31e0,
>      items=0x7f13343bb048, nitems=272428, buildStats=0x7fff1d835670)
>      at gindatapage.c:1739

Yep, that's a clear violation of the no-pallocs-in-critical-section 
rule. Thanks, fixed.

I'm surprised none of the existing regression tests caught that. 
Apparently none of them create a GIN index with enough duplicate keys 
that it would create a posting tree. I added one.

- Heikki


Re: Another assert failure from no-palloc-in-critical-sections

От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Heikki Linnakangas wrote:

> I'm surprised none of the existing regression tests caught that.
> Apparently none of them create a GIN index with enough duplicate
> keys that it would create a posting tree. I added one.

Perhaps the --enable-coverage option to configure, and related make
targets, could prove insightful.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


FAQ