Thread: plpython versus gcc 4.5.x

plpython versus gcc 4.5.x

From
Tom Lane
Date:
Buildfarm members bobcat (Fedora 14 x86) and frogmouth (mingw) have
been showing an assertion failure in the plpython regression tests
since this patch went in:
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=740e54c

I have been able to reproduce the problem locally on Fedora 14 x86_64.
The common thread appears to be use of gcc 4.5 --- Andrew says that
frogmouth is using 4.5.0, and current F-14 has gcc 4.5.1.  I have found
that manually re-inlining PLy_procedure_input_conversion is sufficient
to make the problem go away, as is reducing the optimization level below
-O2.

Based on these observations, I believe it's not our bug but an
optimization bug in gcc, and have accordingly filed a gcc bug:
https://bugzilla.redhat.com/show_bug.cgi?id=671899
However, it's hard to guess how long it might take for the gcc boys to
provide a fix, and in any case I fear it will be a long time before the
fix propagates to places like mingw.

Given these facts, and the fact that the above-mentioned patch has no
purpose other than code beautification, I recommend reverting the patch.
We could just revert the de-inlining of PLy_procedure_input_conversion,
but there doesn't seem to be a lot of point in having one separate and
the other not.
        regards, tom lane


Re: plpython versus gcc 4.5.x

From
Andrew Dunstan
Date:

On 01/22/2011 01:38 PM, Tom Lane wrote:
> Buildfarm members bobcat (Fedora 14 x86) and frogmouth (mingw) have
> been showing an assertion failure in the plpython regression tests
> since this patch went in:
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=740e54c
>
> I have been able to reproduce the problem locally on Fedora 14 x86_64.
> The common thread appears to be use of gcc 4.5 --- Andrew says that
> frogmouth is using 4.5.0, and current F-14 has gcc 4.5.1.  I have found
> that manually re-inlining PLy_procedure_input_conversion is sufficient
> to make the problem go away, as is reducing the optimization level below
> -O2.
>
> Based on these observations, I believe it's not our bug but an
> optimization bug in gcc, and have accordingly filed a gcc bug:
> https://bugzilla.redhat.com/show_bug.cgi?id=671899
> However, it's hard to guess how long it might take for the gcc boys to
> provide a fix, and in any case I fear it will be a long time before the
> fix propagates to places like mingw.
>
> Given these facts, and the fact that the above-mentioned patch has no
> purpose other than code beautification, I recommend reverting the patch.
> We could just revert the de-inlining of PLy_procedure_input_conversion,
> but there doesn't seem to be a lot of point in having one separate and
> the other not.
>        


Since there's only one call site for each function, I don't think it's 
worth making herculean efforts to do anything else.

so +1

cheers

andrew


Re: plpython versus gcc 4.5.x

From
Jan Urbański
Date:
On 22/01/11 19:38, Tom Lane wrote:
> Buildfarm members bobcat (Fedora 14 x86) and frogmouth (mingw) have
> been showing an assertion failure in the plpython regression tests
> since this patch went in:
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=740e54c

> Given these facts, and the fact that the above-mentioned patch has no
> purpose other than code beautification, I recommend reverting the patch.

Yep, that (sadly) seems to be the best way to proceed. I'll merge master
into the rest of my branches and mop up the resulting conflicts (which
shouldn't be that bad).

Cheers,
Jan