Re: BUG #5669: server process was terminated by exception 0xC0000005 - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #5669: server process was terminated by exception 0xC0000005
Date
Msg-id 1285174345-sup-1412@alvh.no-ip.org
Whole thread Raw
In response to Re: BUG #5669: server process was terminated by exception 0xC0000005  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5669: server process was terminated by exception 0xC0000005  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Excerpts from Tom Lane's message of mié sep 22 12:39:24 -0400 2010:

> OK ... so the problem is that the function uses the pg_settings view,
> which results in calling show_all_settings(), and in particular it
> runs show_session_authorization(), which then dumps core because
> session_authorization_string is NULL in an autovacuum process.

Ugh.

> As far as a fix for the crash goes, I'm not sure if it'd be better to
> try to make show_session_authorization() return some sort of default
> value in this scenario, or to try to ensure that the variable has been
> set to something valid before we start running user-supplied code.
> In either case the problem is potentially wider than this one function
> and variable.  Thoughts anyone?

My first thought is that the weird encoding of
session_authorization_string should better be contained in as few places
as possible, so we shouldn't try to initialize it to something
valid-looking.  Seems easier to have show_session_authorization() cope
with a NULL value.  But what would this default value be?

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5669: server process was terminated by exception 0xC0000005
Next
From: Bruce Momjian
Date:
Subject: Re: UNLISTEN bug