Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault

From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bernt M(dot) Johnsen" <Bernt(dot)Johnsen(at)sun(dot)com>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault
Date: 2009-10-30 18:47:49
Message-ID: 4AEB34D5.2010202@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Greg Stark wrote:
> On Fri, Oct 30, 2009 at 11:22 AM, Stefan Kaltenbrunner
> <stefan(at)kaltenbrunner(dot)cc> wrote:
>> ok I now see why you (and I) failed to reproduce the problem - it only
>> causes clusters/databases to crash that were actually generated using the
>> upthread mentioned script. it does NOT fail using a dump generated by a
>> database that fails(!).
>> So the issue must be a bit more complex and somehow relate to some prior
>> stuff the script does.
>
> Does it still crash if you compile with CFLAGS='-O0 -g' ? Could you
> send a backtrace from that?

ok just assembled a new testcase from the querylog of the tool:

http://www.kaltenbrunner.cc/files/rand_gen_crash.sql

this crashes on i386 and results in something like:

ERROR: invalid memory alloc request size 8589934592

on an AMD64 host for me.

However the error seems to go away after an ANALYZE... so I wonder if
this is just another case of "if we missestimated the size of the
hashtable we are doomed"

Stefan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-10-30 18:52:35 Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault
Previous Message Greg Stark 2009-10-30 18:26:26 Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault