Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZE2ui-00022X-Ad for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Jul 2015 22:06:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZE2uh-0003YB-MK for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Jul 2015 22:06:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZE2ug-0003Xd-U7 for pgsql-bugs@postgresql.org; Sat, 11 Jul 2015 22:06:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZE2ud-00051k-M2 for pgsql-bugs@postgresql.org; Sat, 11 Jul 2015 22:06:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t6BM6JPs014298; Sat, 11 Jul 2015 18:06:19 -0400 From: Tom Lane To: Michael Bommarito cc: Michael Paquier , PostgreSQL mailing lists Subject: Re: BUG #13490: Segmentation fault on pg_stat_activity In-reply-to: References: <20150707165212.1188.60819@wrigleys.postgresql.org> Comments: In-reply-to Michael Bommarito message dated "Sat, 11 Jul 2015 09:07:29 -0400" Date: Sat, 11 Jul 2015 18:06:19 -0400 Message-ID: <14297.1436652379@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Bommarito 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