Re: PG11 jit failing on ppc64el - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: PG11 jit failing on ppc64el
Date
Msg-id CAEepm=1BOKxBzt+hgRwdBSFv==DpDxQoad5daHgiDUrQSsgWWA@mail.gmail.com
Whole thread Raw
In response to Re: PG11 jit failing on ppc64el  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PG11 jit failing on ppc64el  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, May 24, 2018 at 3:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@enterprisedb.com> writes:
>> BTW It is working on arm64 too, starting with LLVM 6.  5 crashed the
>> same way as it does on ppc.  See build farm member eelpout which is
>> running Debian.
>
> For entertainment's sake, I tried building --with-llvm on FreeBSD 12
> arm64 (hey, gotta do something with this raspberry pi toy I got).

Neat.  Quite tempted to get one!

> I used llvm-devel-7.0.d20180327 which seems to be the latest available in
> FreeBSD's package system.  Builds cleanly, does not work at all.
> SIGSEGV here:
>
> [big ugly stack]
>
> Sure looks like infinite recursion in findSymbolAddress.  Thoughts?

Hmm.  I just tried llvm-devel-7.0.d20180327 on my amd64 FreeBSD 12
system and our make check passed with flying colours.  I guess there
could be a bug in LLVM or the FreeBSD 12 linker or their interaction
on ARM.  Maybe the cycle somehow comes from lines 376 and 391 of this:


https://github.com/llvm-mirror/llvm/blob/41d411071aefb16379415150d970171698b13ff9/lib/ExecutionEngine/Orc/OrcCBindingsStack.h

I know that LocalIndirectStubsManager is instantiated differently on
each architecture, but I couldn't immediately see how that could
produce the cycle and I'm currently avoiding the LLVM-internals rabbit
hole.  Maybe Andres has an idea?

-- 
Thomas Munro
http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: SPI/backend equivalent of extended-query Describe(statement)?
Next
From: Michael Paquier
Date:
Subject: Re: PANIC during crash recovery of a recently promoted standby