Re: BUG #16696: Backend crash in llvmjit - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: BUG #16696: Backend crash in llvmjit
Date
Msg-id CA+hUKGK6J+Zsa1j-pjKAJmqRq6=E55Tr2EX_WoZ2j0RNYgXo-g@mail.gmail.com
Whole thread Raw
In response to Re: BUG #16696: Backend crash in llvmjit  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
On Thu, Jul 22, 2021 at 4:59 AM Andres Freund <andres@anarazel.de> wrote:
> On 2021-07-18 17:13:50 +1200, Thomas Munro wrote:
> > On Thu, May 20, 2021 at 2:49 AM Palle <girgen@pingpong.net> wrote:
> > > This seems to still not be fixed. Is it planned for 14.0 release?
> >
> > I don't know enough about LLVM and TLS to have an opinion on the
> > details, but I tested this and it works, and I think it should
> > probably be back-patched based on the discussion so far (and hopefully
> > in the future some way can be figured out to make it actually work?).

Done.

For the record, the original repro now causes PostgreSQL on FreeBSD
(with INLINE_DEBUG defined) to say:

2021-07-22 15:20:51.738 NZST [82982] DEBUG:  checking inlinability of boolin
2021-07-22 15:20:51.738 NZST [82982] DEBUG:  cannot inline boolin due
to thread-local variable _ThreadRuneLocale
2021-07-22 15:20:51.738 NZST [82982] DEBUG:  had to skip inlining boolin

> FWIW, there's ongoing work in llvm to make the jit stuff handle TLS
> correctly.

Cool.

Dmitry: Thanks very much for the report, reproducer, analysis and patch!



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17118: ALTER TABLE doesn't discard redundant UNIQUE constraints as CREATE TABLE will
Next
From: Heikki Linnakangas
Date:
Subject: Re: IRe: BUG #16792: silent corruption of GIN index resulting in SELECTs returning non-matching rows