Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 34DB71E16586 for ; Tue, 10 Jan 2012 12:11:27 -0400 (AST) Received: from exprod7og113.obsmtp.com ([64.18.2.179]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RkeIF-0002X1-F0 for pgsql-bugs@postgresql.org; Tue, 10 Jan 2012 16:11:26 +0000 Received: from mail-ee0-f44.google.com ([74.125.83.44]) (using TLSv1) by exprod7ob113.postini.com ([64.18.6.12]) with SMTP ID DSNKTwxjHFPNbMJX7NFVaGh4X3N65C8SQccu@postini.com; Tue, 10 Jan 2012 08:11:23 PST Received: by eekd41 with SMTP id d41so248739eek.17 for ; Tue, 10 Jan 2012 08:11:07 -0800 (PST) Received: by 10.213.20.218 with SMTP id g26mr530820ebb.1.1326211867346; Tue, 10 Jan 2012 08:11:07 -0800 (PST) Received: from [192.168.1.100] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id t59sm305841160eeh.10.2012.01.10.08.11.05 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Jan 2012 08:11:06 -0800 (PST) Message-ID: <4F0C6318.9010405@enterprisedb.com> Date: Tue, 10 Jan 2012 18:11:04 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120104 Icedove/8.0 MIME-Version: 1.0 To: Andrew Alcheyev CC: pgsql-bugs@postgresql.org Subject: Re: FreeBSD 9.0/amd64, PostgreSQL 9.1.2, pgbouncer 1.4.2: segmentation fault References: <976279052.20120110212229@telenet.ru> In-Reply-To: <976279052.20120110212229@telenet.ru> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201201/71 X-Sequence-Number: 32138 On 10.01.2012 17:22, Andrew Alcheyev wrote: > At some point the backend with this client crashes due to segmentation > fault with signal 11. > > GDB shows the following: > #0 0x00000000006b3a5b in SHMQueueDelete (queue=0x845b4c498) at shmqueue.c:77 > 77 prevElem->next = queue->next; > [New Thread 8025cd400 (LWP 100635/)] > [New LWP 100709] > (gdb) bt > #0 0x00000000006b3a5b in SHMQueueDelete (queue=0x845b4c498) at shmqueue.c:77 > #1 0x00000000006c16ef in SummarizeOldestCommittedSxact () at predicate.c:1467 > #2 0x00000000006c197f in RegisterSerializableTransactionInt (snapshot=0xbe7480) at predicate.c:1605 > #3 0x00000000006c190a in RegisterSerializableTransaction (snapshot=0xbe7480) at predicate.c:1569 > #4 0x00000000007ffcf7 in GetTransactionSnapshot () at snapmgr.c:138 > #5 0x00000000006cbaf5 in exec_simple_query (query_string=0x80249e030 "SELECT 'DBD::Pg ping test'") at postgres.c:932 > #6 0x00000000006cfcb3 in PostgresMain (argc=2, argv=0x80249a890, username=0x80249a860 "stat") at postgres.c:3926 > #7 0x000000000068340d in BackendRun (port=0x802448900) at postmaster.c:3601 > #8 0x0000000000682b1a in BackendStartup (port=0x802448900) at postmaster.c:3286 > #9 0x000000000067ff5c in ServerLoop () at postmaster.c:1455 > #10 0x000000000067f73d in PostmasterMain (argc=3, argv=0x7fffffffdb90) at postmaster.c:1116 > #11 0x00000000005fa67a in main (argc=3, argv=0x7fffffffdb90) at main.c:199 > (gdb) p prevElem > $1 = (SHM_QUEUE *) 0x0 That clearly looks like a bug in the SSI feature, introduced in PostgreSQL 9.1. This looks superficically similar to the bug that Dan Ports spotted on Friday: http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg190135.html. If you can reproduce the issue easily, could you try the patch he posted and see if it fixes it? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com