pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17481: sometime pg_stat_statements coredump
3+ messages / 3 participants
[nested] [flat]

* BUG #17481: sometime pg_stat_statements coredump
@ 2022-05-15 02:37  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2022-05-15 02:37 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: mailtch@163.com

The following bug has been logged on the website:

Bug reference:      17481
Logged by:          tangcheng
Email address:      mailtch@163.com
PostgreSQL version: 14.2
Operating system:   debian 11
Description:        

In my database , use pg_stat_statement, but sometime, coredump 
occurred,Details are as follows:

Using host libthread_db library"/lib/x86 64-1inux-gnu/libthread db.so.1"
Core was generated by `postgres: XXXX XXXXX(6294) CALL Program terminated
with signal SIGSEGV, Segmentation fault.
#0  0x0000556d1bc6ac9d in CleanQuerytext()
(gdb) bt
#0  0x0000556d1bc6ac9d in CleanQuerytext()
#1  0x00007f8450d3522f in pgss_store() from
/usr/local/pgsql-14.2/1ib/pg_stat_statements.so
#2  0x00007f8450d362bd in
pgss_ProcessUtility()from/usr/1ocal/pgsq1-14.2/1ib/pg_stat_statements.so 
#3  0x0000556d1bb42c7f in PortalRunUtility() 
#4  0x0000556d1bb42dab in PortalRunMulti () 
#5  0x0000556d1bb43275 in PortalRun()
#6  0x0000556d1bb409fe in PostgresMain () 
#7  0x0000556d1bac74f1 in ServerLoop()
#8 0x0000556d1bac8322 in PostmasterMain() 
#9 0x0000556d1b86d860 in main (()



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #17481: sometime pg_stat_statements coredump
@ 2022-05-16 15:21  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2022-05-16 15:21 UTC (permalink / raw)
  To: mailtch@163.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> In my database , use pg_stat_statement, but sometime, coredump 
> occurred,Details are as follows:

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.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #17481: sometime pg_stat_statements coredump
@ 2022-05-16 23:52  Michael Paquier <michael@paquier.xyz>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2022-05-16 23:52 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: mailtch@163.com; pgsql-bugs@lists.postgresql.org

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-05-16 23:52 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-05-15 02:37 BUG #17481: sometime pg_stat_statements coredump PG Bug reporting form <noreply@postgresql.org>
2022-05-16 15:21 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-05-16 23:52   ` Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox