pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pabloa98 <pabloa98@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: postgresql v11.1 Segmentation fault: signal 11: by running SELECT... JIT Issue?
Date: Mon, 28 Jan 2019 22:28:29 -0500
Message-ID: <22879.1548732509@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEjudX7dAtx8vJmGXJuOqGkdjOY=-OPQ+sW4WQG1MhXVL2uH+w@mail.gmail.com>
References: <CAEjudX7dAtx8vJmGXJuOqGkdjOY=-OPQ+sW4WQG1MhXVL2uH+w@mail.gmail.com>

pabloa98 <pabloa98@gmail.com> writes:
> I just migrated our databases from PostgreSQL version 9.6 to version 11.1.
> We got a segmentation fault while running this query:

> SELECT f_2110 as x FROM baseline_denull
> ORDER BY eid ASC
> limit 500
> OFFSET 131000;

> the table baseline_denull has 1765 columns, mainly numbers, like:

Hm, that sounds like it matches this recent bug fix:

Author: Andres Freund <andres@anarazel.de>
Branch: master [b23852766] 2018-11-27 10:07:03 -0800
Branch: REL_11_STABLE [aee085bc0] 2018-11-27 10:07:43 -0800

    Fix jit compilation bug on wide tables.
    
    The function generated to perform JIT compiled tuple deforming failed
    when HeapTupleHeader's t_hoff was bigger than a signed int8. I'd
    failed to realize that LLVM's getelementptr would treat an int8 index
    argument as signed, rather than unsigned.  That means that a hoff
    larger than 127 would result in a negative offset being applied.  Fix
    that by widening the index to 32bit.
    
    Add a testcase with a wide table. Don't drop it, as it seems useful to
    verify other tools deal properly with wide tables.
    
    Thanks to Justin Pryzby for both reporting a bug and then reducing it
    to a reproducible testcase!
    
    Reported-By: Justin Pryzby
    Author: Andres Freund
    Discussion: https://postgr.es/m/20181115223959.GB10913@telsasoft.com
    Backpatch: 11, just as jit compilation was


This would result in failures on wide rows that contain some null
entries.  If your table is mostly-not-null, that would fit the
observation that it only crashes on a few rows.

Can you try REL_11_STABLE branch tip and see if it works for you?

			regards, tom lane




view thread (11+ messages)  latest in thread

Message-ID: <22879.1548732509@sss.pgh.pa.us>
Permalink:  ../22879.1548732509@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22879.1548732509@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pabloa98@gmail.com
  Subject: Re: postgresql v11.1 Segmentation fault: signal 11: by running SELECT... JIT Issue?
  In-Reply-To: <22879.1548732509@sss.pgh.pa.us>
  References: <CAEjudX7dAtx8vJmGXJuOqGkdjOY=-OPQ+sW4WQG1MhXVL2uH+w@mail.gmail.com> <22879.1548732509@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox