Re: BUG #15033: Segmentation fault running a query
Andrew Grossman <agrossman@gmail.com>
From: Andrew Grossman <agrossman@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2018-01-27T20:06:48Z
Lists: pgsql-bugs
Oh, I have little doubt there's a better way to solve the actual problem--this actually resulted from some buggy code that passed a bunch of unexpected arguments to a query generating function. I would note that this did reproduce for me on a different system with some different specs. I will follow-up with a stack trace. In the meantime, a more accessible version of the reproduction script has been placed at the following address: https://fleetinventory.com/media/static/pg10crash.sql On Sat, Jan 27, 2018 at 3:00 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > =?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes: > > I have encountered a segmentation fault running a particular query. > > Given the shape of the query and the fact that it's calling a recursive > function, I'm suspicious that this is caused by a stack overrun that we've > missed checking for. If so, it might not reproduce for someone else, > unless they were running with the exact same physical stack limit (not > max_stack_depth, but the kernel limit) as you are, and a similar compiler. > > It would likely be easier all round if you could get a stack trace > from the crash as you observe it. See > > https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend > > If my idea is right, the whole trace would be very long (probably > thousands of stack frames) but the first hundred or so ought to > be enough to diagnose. > > BTW, seems like there's gotta be a more efficient way to solve your > problem than a 14000-way INTERSECT. > > regards, tom lane >
Commits
-
Add stack-overflow guards in set-operation planning.
- e194f13838a5 9.5.11 landed
- c03fc84626be 9.3.21 landed
- 4e9fb4bfe2e3 9.6.7 landed
- 35a528062cc8 11.0 landed
- 1b2a3860d3ea 10.2 landed
- 06efc5cf53b9 9.4.16 landed
-
Improve performance in freeing memory contexts
- 25c539233044 9.6.0 cited