Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ve4RU-0002Q3-RL for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Nov 2013 14:50:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ve4RT-0005vr-VQ for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Nov 2013 14:50:48 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ve4RR-0005sa-N1 for pgsql-bugs@postgresql.org; Wed, 06 Nov 2013 14:50:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ve4RP-0005gL-07 for pgsql-bugs@postgresql.org; Wed, 06 Nov 2013 14:50:45 +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 rA6EoXKm027731; Wed, 6 Nov 2013 09:50:34 -0500 From: Tom Lane To: rgr@cslab.de cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8579: CoreDump of background writer process In-reply-to: References: Comments: In-reply-to rgr@cslab.de message dated "Wed, 06 Nov 2013 08:54:43 +0000" Date: Wed, 06 Nov 2013 09:50:33 -0500 Message-ID: <27730.1383749433@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 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