pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Daniel Farina <daniel@heroku.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6200: standby bad memory allocations on SELECT
Date: Fri, 09 Sep 2011 18:13:19 +0300
Message-ID: <4E6A2D0F.1050601@enterprisedb.com> (raw)
In-Reply-To: <11731.1315580564@sss.pgh.pa.us>
References: <201109082233.p88MXbGE026996@wwwmaster.postgresql.org>
	<11731.1315580564@sss.pgh.pa.us>

On 09.09.2011 18:02, Tom Lane wrote:
> The way that I'd personally proceed to investigate it would probably be
> to change the "invalid memory alloc request size" size errors (in
> src/backend/utils/mmgr/mcxt.c; there are about four occurrences) from
> ERROR to PANIC so that they'll provoke a core dump, and then use gdb
> to get a stack trace, which would provide at least a little more
> information about what happened.  However, if you are only able to
> reproduce it in a production server, you might not like that approach.
> Perhaps you can set up an extra standby that's only there for testing,
> so you don't mind if it crashes?

If that's not possible or doesn't reproduce the issue, there's also 
functions in glibc to produce a backtrace without aborting the program: 
https://www.gnu.org/s/libc/manual/html_node/Backtraces.html.

I think you could also fork() + abort() to generate a core dump, not 
just a backtrace.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (29+ messages)  latest in thread

Message-ID: <4E6A2D0F.1050601@enterprisedb.com>
Permalink:  ../4E6A2D0F.1050601@enterprisedb.com/
Also on:    postgresql.org/message-id/4E6A2D0F.1050601@enterprisedb.com

 · 

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: heikki.linnakangas@enterprisedb.com, daniel@heroku.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #6200: standby bad memory allocations on SELECT
  In-Reply-To: <4E6A2D0F.1050601@enterprisedb.com>
  References: <201109082233.p88MXbGE026996@wwwmaster.postgresql.org> <11731.1315580564@sss.pgh.pa.us> <4E6A2D0F.1050601@enterprisedb.com>

* 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