pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Bommarito <michael@bommaritollc.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13490: Segmentation fault on pg_stat_activity
Date: Sat, 11 Jul 2015 18:06:19 -0400
Message-ID: <14297.1436652379@sss.pgh.pa.us> (raw)
In-Reply-To: <CAN=rtBipwKdHCtmXH3r4GNfUhF9e4ZfJbqcj7s_Ec9e2Mbf_LA@mail.gmail.com>
References: <20150707165212.1188.60819@wrigleys.postgresql.org>
	<CAB7nPqQq_mAJxcXQ-A6mACbA20Zh3G+w_0H7HtPunBHxEwfBqg@mail.gmail.com>
	<CAN=rtBjrcKjMbomR2cJUjRQFiw5sUw-=BdHYwThSq-X8+uY70Q@mail.gmail.com>
	<CAB7nPqSHmw9D2TySPDz_UrwcpsxnJXWBB2GH0RfePrm3mpbVwg@mail.gmail.com>
	<CAN=rtBipwKdHCtmXH3r4GNfUhF9e4ZfJbqcj7s_Ec9e2Mbf_LA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Michael Bommarito <michael@bommaritollc.com> writes:
> Hello Michael,
>   Here is the offending query and gdb session/stacktrace output.  Please
> let me know if we can provide anything else from gdb or logs that can be
> anonymized.

> *Query:*
> 2015-07-11 12:57:41 UTC [12803-7] LOG:  server process (PID 20696) was
> terminated by signal 11: Segmentation fault
> 2015-07-11 12:57:41 UTC [12803-8] DETAIL:  Failed process was running:
> SELECT COUNT(*) FROM pg_stat_activity WHERE pid <> pg_backend_pid()

I tried tracing through the logic using the line numbers shown in this
stack trace, and soon decided that they didn't seem to match the query
you show above --- but on closer look, that's to be expected, because
this core is evidently from PID 16028:

> [New LWP 16028]

If you can identify the exact query that 16028 was running from your logs,
that would be helpful.  Or, if you still have this same core file laying
about, "p debug_query_string" in gdb would probably be a more trustworthy
guide than trying to match up log entries.

>> That would be nice. I have let pgbench -C run for one hour with select
>> * from pg_stat_activity running every second (\watch 1) in parallel
>> but I could not reproduce the issue on HEAD.

Yeah, I tried similar experiments without result.  Presumably there is
some other triggering condition here, but it's hard to guess what.
I tried things like doing VACUUM FULL on pg_database and pg_authid
to force replan cycles on the view, but no crash.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (20+ messages)  latest in thread

Message-ID: <14297.1436652379@sss.pgh.pa.us>
Permalink:  ../14297.1436652379@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14297.1436652379@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@bommaritollc.com, michael.paquier@gmail.com
  Subject: Re: BUG #13490: Segmentation fault on pg_stat_activity
  In-Reply-To: <14297.1436652379@sss.pgh.pa.us>
  References: <20150707165212.1188.60819@wrigleys.postgresql.org> <CAB7nPqQq_mAJxcXQ-A6mACbA20Zh3G+w_0H7HtPunBHxEwfBqg@mail.gmail.com> <CAN=rtBjrcKjMbomR2cJUjRQFiw5sUw-=BdHYwThSq-X8+uY70Q@mail.gmail.com> <CAB7nPqSHmw9D2TySPDz_UrwcpsxnJXWBB2GH0RfePrm3mpbVwg@mail.gmail.com> <CAN=rtBipwKdHCtmXH3r4GNfUhF9e4ZfJbqcj7s_Ec9e2Mbf_LA@mail.gmail.com> <14297.1436652379@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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