Re: terminate called after throwing an instance of 'std::bad_alloc'

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: terminate called after throwing an instance of 'std::bad_alloc'
Date: 2021-05-28 17:08:29
Message-ID: 20210528170829.GK2082@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

There's a memory leak affecting JIT expressions, even when inlining,
optimization, and tuple deforming are disabled.

The server that got OOM after installing PG13.3 (because your patch wasn't
applied) still gets OOM even with inline_above_cost=-1, optimize_above_cost=-1,
and deforming=off.

Actually I think this is an even more severe leak, even though it seems to be
infrequent. The inlining leak is slow enough that I don't think that it,
alone, would cause a crash. It's possible there's a race condition or
something that makes this hard to notice or reproduce, or the inlining leak is
just easier to find.

I guess your patch avoids this issue, too, since it didn't OOM with your patch.

--
Justin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2021-05-28 17:42:21 Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)
Previous Message Tom Lane 2021-05-28 16:24:54 Re: Degression (PG10 > 11, 12 or 13)