Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wi5T8-00026w-8T for pgsql-general@arkaria.postgresql.org; Wed, 07 May 2014 17:17:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wi5T7-0003d8-Oy for pgsql-general@arkaria.postgresql.org; Wed, 07 May 2014 17:17:21 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wi5T6-0003cu-AD; Wed, 07 May 2014 17:17:20 +0000 Received: from gw.crysberg.dk ([194.239.152.65] helo=mail.crysberg.dk) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wi5T3-0005MB-BY; Wed, 07 May 2014 17:17:19 +0000 Received: from quick.crysberg.dk (quick.crysberg.dk [192.168.10.139]) by mail.crysberg.dk (8.14.3/8.12.10) with ESMTP id s47HHD7x032694; Wed, 7 May 2014 19:17:13 +0200 Received: from localhost (localhost [127.0.0.1]) by quick.crysberg.dk (Postfix) with ESMTP id 85E4BF00B9; Wed, 7 May 2014 19:17:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at quick.crysberg.dk Received: from quick.crysberg.dk ([127.0.0.1]) by localhost (quick.crysberg.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9z1uteeuxLu8; Wed, 7 May 2014 19:16:56 +0200 (CEST) Received: from quick.crysberg.dk (quick.crysberg.dk [192.168.10.139]) by quick.crysberg.dk (Postfix) with ESMTP id CAE94F00B8; Wed, 7 May 2014 19:16:56 +0200 (CEST) Date: Wed, 7 May 2014 19:16:56 +0200 (CEST) From: Leif Jensen To: Tom Lane Cc: Adrian Klaver , pgsql-general , pgsql-bugs@postgresql.org Message-ID: <4548428.10806.1399483016605.JavaMail.root@quick> In-Reply-To: <29568.1399479101@sss.pgh.pa.us> Subject: Re: Server process crash - Segmentation fault MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: Zimbra 6.0.9_GA_2686 (ZimbraWebClient - FF3.0 (Linux)/6.0.9_GA_2686) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Could it be related to the OFFSET part of the statement ? I have another query on the same table without OFFSET, which seems to work fine. Leif ----- Original Message ----- > Leif Jensen writes: > > Here is a gdb dump of the backtrace at the server process crash. > > I have also included the code that generates these calls. As > > mentioned below this specific connection has been used many times > > before the crash. Also, we are aware of the thread caveat that > > only using a connection from one thread at a time. Therefore the > > "strange" connection name that includes both the process id and > > the thread id. This is for the code to make sure that a > > connection is only used in the thread it is meant to. > > Hm. The crash looks like it must be because ActiveSnapshot is null > (not set). Since we're doing a FETCH, the active snapshot ought to > be the one saved for the cursor query by DECLARE CURSOR. It looks > like the problem is that pquery.c only bothers to install that as the > active snapshot while calling ExecutorRun, but in this stack trace > we're in ExecutorRewind. > > I wonder if it's a bad idea for ExecReScanLimit to be executing > user-defined expressions? But it's been like that for awhile, > and I think we might have a hard time preserving the bounded-sort > optimization if we didn't do that. > > Anyway the simple fix would be to ensure we install the query > snapshot as active before calling ExecutorRewind. > > One interesting question is why this issue hasn't been seen before; > it seems like it'd not be that hard to hit. > > regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general