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: Sun, 12 Jul 2015 14:37:54 -0400
Message-ID: <13182.1436726274@sss.pgh.pa.us> (raw)
In-Reply-To: <CAN=rtBik867VQwxkG3=-4Uc1KS4nYK99cuFvrit+QO7K44L-tQ@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>
<14297.1436652379@sss.pgh.pa.us>
<CAN=rtBik867VQwxkG3=-4Uc1KS4nYK99cuFvrit+QO7K44L-tQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Michael Bommarito <michael@bommaritollc.com> writes:
> Here's the session with debug_query_string:
> (gdb) printf "%s\n", debug_query_string
> SELECT application_name AS source, client_addr AS ip, COUNT(*) AS
> total_connections FROM pg_stat_activity WHERE pid <> pg_backend_pid() GROUP
> BY application_name, ip ORDER BY COUNT(*) DESC, application_name ASC,
> client_addr ASC
Thanks. This still doesn't match the stack trace: in particular, this
stack frame
#3 0x00007fd0d478152c in expression_tree_mutator (node=0x7fd0d5d9e908,
mutator=0x7fd0d481c390 <replace_rte_variables_mutator>,
context=0x7fff52170620) at
/tmp/buildd/postgresql-9.5-9.5~alpha1/build/../src/backend/nodes/nodeFuncs.c:2769
indicates that we found a PlaceHolderInfo node in the expression tree that
pullup_replace_vars() was applied to, but so far as I can see no such node
should exist in the query tree generated by this query. The most likely
theory seems to be that something clobbered the query tree while it was
sitting in the plancache, causing this recursive function to follow a
bogus pointer. But that doesn't leave us with a lot to go on.
What can you tell us about the environment this is happening in?
How is the client-side code executing the failing queries? (We know
it's using extended query protocol, but is it preparing a statement
and then executing it repeatedly, or just using a one-shot unnamed
prepared statement?) What nondefault settings are in use on the
server side? Do you have any extensions loaded, such as
pg_stat_statements or auto_explain?
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
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: <13182.1436726274@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> <CAN=rtBik867VQwxkG3=-4Uc1KS4nYK99cuFvrit+QO7K44L-tQ@mail.gmail.com> <13182.1436726274@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