Re: BUG #17481: sometime pg_stat_statements coredump - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #17481: sometime pg_stat_statements coredump
Date
Msg-id YoLj2fcRQ5KZXAj0@paquier.xyz
Whole thread Raw
In response to Re: BUG #17481: sometime pg_stat_statements coredump  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, May 16, 2022 at 11:21:21AM -0400, Tom Lane wrote:
> Not much info here.  Can you install the debug symbols for the postgres
> package you're using and repeat the backtrace?  Another potentially useful
> bit of info would be the source text for the query that's causing the
> failure, which you could get with "p debug_query_string" in gdb.

CleanQuerytext() would crash on a NULL string AFAIK, but this really
smells like a case where a utility code path is freeing the pointer of
the query string that PGSS is attempting to look at.  I have seen this
problem in the past, where this subtle issue could be created even if
the code was rather careful in the query string handling.  Here, are
we dealing with a CALL that involves plpgsql?  Or is that a different
language, like something out of core?
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: James Coleman
Date:
Subject: pg_rewind fails to detect timeline change
Next
From: Andrey Lepikhov
Date:
Subject: Re: Negative value of numGroups