Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 0AADE2E00A7 for ; Fri, 4 Apr 2008 18:48:59 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 15555-01 for ; Fri, 4 Apr 2008 18:48:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by developer.postgresql.org (Postfix) with ESMTP id 2FA722E002D for ; Fri, 4 Apr 2008 18:48:53 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m34Lmn07008862; Fri, 4 Apr 2008 17:48:49 -0400 (EDT) To: Alex Adriaanse cc: Martijn van Oosterhout , pgsql-general@postgresql.org Subject: Re: Out of memory In-reply-to: <47F68E87.8030906@innovacomputing.com> References: <47ED3B41.80305@innovacomputing.com> <20080328215755.GF9150@svana.org> <16720.1206749235@sss.pgh.pa.us> <47ED90D8.40807@innovacomputing.com> <17490.1206751901@sss.pgh.pa.us> <47F68E87.8030906@innovacomputing.com> Comments: In-reply-to Alex Adriaanse message dated "Fri, 04 Apr 2008 15:24:39 -0500" Date: Fri, 04 Apr 2008 17:48:49 -0400 Message-ID: <8861.1207345729@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/245 X-Sequence-Number: 131214 Alex Adriaanse writes: > ... possible that these particular addresses have shifted due to the > different environment and now point to irrelevant instructions. But in > case they haven't, here's the output I got: > (gdb) x/i 0x000000000049ea35 > 0x49ea35 : callq 0x562c00 > (gdb) x/i 0x000000000049ea00 > 0x49ea00 : mov %rbx,0xffffffffffffffd0(%rsp) > (gdb) x/i 0x00000000005e7b13 > 0x5e7b13 : mov 0xfffffffffffffff0(%rdi),%rdi Hmm, not exactly what I was expecting to see. The last one looks like someone passed garbage (maybe a NULL) to pfree; which would be a bug but it's not clear how memory pressure would result in that, and without knowing where pfree was called from we're not going to be able to get far investigating. The first two both seem like they could only be explained by running out of execution stack space. 8.1 takes the max_stack_depth setting you tell it as gospel, so a core dump right there is possible if you set max_stack_depth too large, but you didn't mention having changed it. In any case it's not clear why you'd get a transient spate of problems like that, unless the system was handlng especially (and unreasonably) complicated queries for awhile. Did you query the client about whether their workload could have been unusual during this episode? Of course this is all just speculation since we can't trust the addresses completely. regards, tom lane