Re: v16dev: invalid memory alloc request size 8488348128

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: v16dev: invalid memory alloc request size 8488348128
Date: 2023-04-14 23:33:58
Message-ID: CAApHDvq9HR1-SJfQP8+-tphmbABWzL6r87y92+UxKHz3yhqdqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 15 Apr 2023 at 10:48, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
>
> On Sat, Apr 15, 2023 at 10:04:52AM +1200, David Rowley wrote:
> > Which aggregate function is being called here? Is it a custom
> > aggregate written in C, by any chance?
>
> That function is not an aggregate:

There's an aggregate somewhere as indicated by this fragment from the
stack trace:

> #12 project_aggregates (aggstate=aggstate(at)entry=0x607200070d38) at ../src/backend/executor/nodeAgg.c:1377
> #13 0x0000000000903eb6 in agg_retrieve_direct (aggstate=aggstate(at)entry=0x607200070d38) at ../src/backend/executor/nodeAgg.c:2520
> #14 0x0000000000904074 in ExecAgg (pstate=0x607200070d38) at ../src/backend/executor/nodeAgg.c:2172

Any chance you could try and come up with a minimal reproducer? You
have access to see which aggregates are being used here and what data
types are being given to them and then what's being done with the
return value of that aggregate that's causing the crash. Maybe you
can still get the crash if you mock up some data to aggregate and
strip out the guts from the plpgsql functions that we're crashing on?

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2023-04-15 00:26:53 Re: Direct I/O
Previous Message Amin 2023-04-14 23:33:05 Scans are offloaded to SeqScan instead of CustomScan when there are multiple relations in the same query