Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault - Mailing list pgsql-bugs

From Stefan Kaltenbrunner
Subject Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault
Date
Msg-id 4AEB34D5.2010202@kaltenbrunner.cc
Whole thread Raw
In response to Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault  (Greg Stark <gsstark@mit.edu>)
Responses Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault
Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault
List pgsql-bugs
Greg Stark wrote:
> On Fri, Oct 30, 2009 at 11:22 AM, Stefan Kaltenbrunner
> <stefan@kaltenbrunner.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

pgsql-bugs by date:

Previous
From: Greg Stark
Date:
Subject: Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault
Next
From: Tom Lane
Date:
Subject: Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault