Re: gs_group_1 crashing on 13beta2/s390x
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Christoph Berg <myon@debian.org>, Tom Lane <tgl@sss.pgh.pa.us>, Andrew Gierth <andrew@tao11.riddles.org.uk>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-10-15T22:29:24Z
Lists: pgsql-hackers
Hi,
On 2020-10-15 01:32:46 -0700, Andres Freund wrote:
> I have a fix for this, but I've just stared at s390 assembly code for
> ~10h, never having done so before. So that'll have to wait for tomorrow.
>
> It's quite possible that that fix would also help on other
> architectures...
Pushed now to 11-master.
Author: Andres Freund <andres@anarazel.de>
Branch: master [72559438f] 2020-10-15 14:29:53 -0700
Branch: REL_13_STABLE [ae3e75aba] 2020-10-15 14:30:40 -0700
Branch: REL_12_STABLE [c8a2bb0f1] 2020-10-15 14:31:32 -0700
Branch: REL_11_STABLE [f3dee5b9a] 2020-10-15 15:06:16 -0700
llvmjit: Also copy parameter / return value attributes from template functions.
Previously we only copied the function attributes. That caused problems at
least on s390x: Because we didn't copy the 'zeroext' attribute for
ExecAggTransReparent()'s *IsNull parameters, expressions invoking it didn't
ensure that the upper bytes of the registers were zeroed. In the - relatively
rare - cases where not, ExecAggTransReparent() wrongly ended up in the
newValueIsNull branch due to the register not being zero. Subsequently causing
a crash.
It's quite possible that this would cause problems on other platforms, and in
other places than just ExecAggTransReparent() on s390x.
Thanks to Christoph (and the Debian project) for providing me with access to a
s390x machine, allowing me to debug this.
Reported-By: Christoph Berg
Author: Andres Freund
Discussion: https://postgr.es/m/20201015083246.kie5726xerdt3ael@alap3.anarazel.de
Backpatch: 11-, where JIT was added
I had a successful check-world run with maximum jittery on s390x. But I
did hit the issue in different places than you did, so it'd be cool if
you could re-enable JIT for s390x - I think you have a package tracking
HEAD?
Thanks again Christoph!
Greetings,
Andres Freund
Commits
-
llvmjit: Work around bug in LLVM 3.9 causing crashes after 72559438f92.
- c835c7ffe21d 12.5 landed
- 4a4f4487d2d2 11.10 landed
- fe2a16d8b3e6 14.0 landed
- efc9a8e9800c 13.1 landed
-
llvmjit: Also copy parameter / return value attributes from template functions.
- f3dee5b9aba6 11.10 landed
- c8a2bb0f1abf 12.5 landed
- ae3e75abab22 13.1 landed
- 72559438f92f 14.0 landed