Re: assessing parallel-safety

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: assessing parallel-safety
Date: 2015-03-25 10:35:04
Message-ID: CAA4eK1JctdCqTSBSAEnaURY+FEDEw5HwGRMm=LFO6cJ82oV5tw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 22, 2015 at 12:00 AM, Thom Brown <thom(at)linux(dot)com> wrote:
>
> On 21 March 2015 at 14:28, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>
>> On Fri, Mar 20, 2015 at 7:54 PM, Thom Brown <thom(at)linux(dot)com> wrote:
>> > createdb pgbench
>> > pgbench -i -s 200 pgbench
>> >
>> > CREATE TABLE pgbench_accounts_1 (CHECK (bid = 1)) INHERITS
(pgbench_accounts);
>> > ...
>> > CREATE TABLE pgbench_accounts_200 (CHECK (bid = 200)) INHERITS
>> > (pgbench_accounts);
>> >
>>
>> I managed to reproduce the Assertion reported by you as:
>>
>> #2 0x00000000007a053a in ExceptionalCondition
(conditionName=conditionName(at)entry=0x813a4b "!(IsInParallelMode())",
errorType=errorType(at)entry=0x7da1d6 "FailedAssertion",
fileName=fileName(at)entry=0x81397d "parallel.c", lineNumber=lineNumber(at)entry=123)
at assert.c:54
>> #3 0x00000000004cd5ba in CreateParallelContext
(entrypoint=entrypoint(at)entry=0x659d2c <ParallelQueryMain>,
nworkers=nworkers(at)entry=8) at parallel.c:123
>>
>> The reason is that CreateParallelContext() expects to be called
>> in ParallelMode and we enter into parallel-mode after InitPlan()
>> in standard_ExecutorStart(). So the probable fix could be
>> to EnterParallelMode before initializing the plan.
>>
>> I still could not reproduce the crash you have reported as:
>> >> #0 0x0000000000770843 in pfree ()
>> >> #1 0x00000000005a382f in ExecEndFunnel ()
>> >> #2 0x000000000059fe75 in ExecEndAppend ()
>> >> #3 0x00000000005920bd in standard_ExecutorEnd ()
>>
>>
>> Could you let me know which all patches you have tried
>> and on top of which commit.
>>
>> I am trying on the commit as mentioned in mail[1]. Basically
>> have you tried the versions mentioned in that mail:
>>
>> HEAD Commit-id : 8d1f2390
>> parallel-mode-v8.1.patch [2]
>> assess-parallel-safety-v4.patch [1]
>> parallel-heap-scan.patch [3]
>> parallel_seqscan_v11.patch (Attached with this mail)
>>
>> If something else, could you let me know the same so that I can try
>> that to reproduce the issue reported by you.
>>
>
> Looks like one of the patches I applied is newer than the one in your
list:
>

Okay, then that was the reason why you were seeing the crash whereas
I could not reproduce, however I have integrated the patch with the
v-9 of parallel-mode patch and posted it on appropriate thread.
One point to note is that I think there is one small issue in one of the
latest commits [1]. After that is fixed you can once verify with latest
patch.

[1] -
http://www.postgresql.org/message-id/CAA4eK1+NwUJ9ik61yGfZBcN85dQuNEvd38_h1zngCdZrGLGQTQ@mail.gmail.com

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-03-25 10:37:04 Re: assessing parallel-safety
Previous Message Amit Kapila 2015-03-25 10:30:17 Re: Parallel Seq Scan