pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: rgr@cslab.de
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8579: CoreDump of background writer process
Date: Wed, 06 Nov 2013 09:50:33 -0500
Message-ID: <27730.1383749433@sss.pgh.pa.us> (raw)
In-Reply-To: <E1Vdyst-000374-Fd@wrigleys.postgresql.org>
References: <E1Vdyst-000374-Fd@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

rgr@cslab.de writes:
> [ bgwriter crashes here after reporting an error: ]
> (gdb) up
> #1  0x08205ef4 in BackgroundWriterMain () at bgwriter.c:329
> 329     bgwriter.c: No such file or directory.
>         in bgwriter.c
> 329@bgwriter.c: MemoryContextResetAndDeleteChildren(bgwriter_context);
> 
> (gdb) print bgwriter_context
> $1 = (MemoryContext) 0x84c0c00
> 
> (gdb) print *bgwriter_context
> $3 = {type = T_Invalid, methods = 0x84c0d00, parent = 0x10, firstchild =
> 0x0, nextchild = 0x0, name = 0x0}

The only theory I can think of for that is that the bgwriter_context
local variable wasn't correctly saved and restored by sigsetjmp ...
which IMO would be a compiler bug, but possibly a compiler weenie
would have a different opinion.  What compiler are you using, anyway,
and with what optimization options?

If this theory is correct, attaching "volatile" to the declaration of
bgwriter_context (line 202) ought to work around the problem.  Or
if that doesn't work, mark the variable static.

It'd also be interesting to know if this was the first error reported
by the bgwriter process, or if it successfully recovered from any
previous errors.  (Some trawling of your postmaster log should reveal
this.)  If the latter, it'd suggest there's something funny about
returning to the same sigsetjmp context multiple times; which would
perhaps be a bug worth filing with your OS vendor.

			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 (7+ messages)  latest in thread

Message-ID: <27730.1383749433@sss.pgh.pa.us>
Permalink:  ../27730.1383749433@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27730.1383749433@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, rgr@cslab.de
  Subject: Re: BUG #8579: CoreDump of background writer process
  In-Reply-To: <27730.1383749433@sss.pgh.pa.us>
  References: <E1Vdyst-000374-Fd@wrigleys.postgresql.org> <27730.1383749433@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