Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bltXT-0000oe-OX for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Sep 2016 08:02:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bltXS-0004Uu-Nb for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Sep 2016 08:02:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bltXQ-0004Ul-Rl for pgsql-hackers@postgresql.org; Mon, 19 Sep 2016 08:02:53 +0000 Received: from smtp-relay.spoje.net ([77.87.240.81]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bltXN-0007Ys-7X for pgsql-hackers@postgresql.org; Mon, 19 Sep 2016 08:02:51 +0000 Received: from localhost (unknown [127.0.0.1]) by smtp-relay.spoje.net (Postfix) with ESMTP id B0CF8E137B for ; Mon, 19 Sep 2016 08:02:45 +0000 (UTC) X-Virus-Scanned: Amavis X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-50 required=5 tests=[ALL_TRUSTED=-1] autolearn=ham Received: from smtp-relay.spoje.net ([127.0.0.1]) by localhost (smtp-relay.spoje.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6ZOrPGf41Lyw for ; Mon, 19 Sep 2016 10:02:39 +0200 (CEST) Received: from localhost (pekarna.slikova4.brevnov.czf [10.11.1.19]) by smtp-relay.spoje.net (Postfix) with ESMTP id 0D525E1373 for ; Mon, 19 Sep 2016 10:02:38 +0200 (CEST) From: Antonin Houska To: pgsql-hackers@postgresql.org Subject: Possibly too stringent Assert() in b-tree code X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 25.0.94 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 19 Sep 2016 10:02:38 +0200 Message-ID: <2628.1474272158@localhost> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org I've recently seen this when using 9.6: #0 0x00007f147892f0c7 in raise () from /lib64/libc.so.6 #1 0x00007f1478930478 in abort () from /lib64/libc.so.6 #2 0x00000000009683a1 in ExceptionalCondition (conditionName=3D0x9f2ef8 "!= (((PageHeader) (page))->pd_special >=3D (__builtin_offsetof (PageHeaderData= , pd_linp)))", errorType=3D0x9f2e8a "FailedAssertion", fileName=3D0x9f2e60 "../../../../src/include/storage/bufpage.h", lineNu= mber=3D314) at assert.c:54 #3 0x00000000004ee3d2 in PageValidateSpecialPointer (page=3D0x7f14700f3480= "") at ../../../../src/include/storage/bufpage.h:314 #4 0x00000000004ef913 in _bt_getbuf (rel=3D0x7f14795a1a50, blkno=3D11, acc= ess=3D2) at nbtpage.c:629 #5 0x00000000004eae8c in _bt_split (rel=3D0x7f14795a1a50, buf=3D136, cbuf= =3D0, firstright=3D367, newitemoff=3D408, newitemsz=3D16, newitem=3D0x26083= 30, newitemonleft=3D0 '\000') at nbtinsert.c:986 #6 0x00000000004ea563 in _bt_insertonpg (rel=3D0x7f14795a1a50, buf=3D136, = cbuf=3D0, stack=3D0x26090c8, itup=3D0x2608330, newitemoff=3D408, split_only= _page=3D0 '\000') at nbtinsert.c:781 #7 0x00000000004e954c in _bt_doinsert (rel=3D0x7f14795a1a50, itup=3D0x2608= 330, checkUnique=3DUNIQUE_CHECK_YES, heapRel=3D0x25aa0a0) at nbtinsert.c:204 #8 0x00000000004f3b73 in btinsert (rel=3D0x7f14795a1a50, values=3D0x7ffe46= c6f7f0, isnull=3D0x7ffe46c6f7d0 "", ht_ctid=3D0x260927c, heapRel=3D0x25aa0a= 0, checkUnique=3DUNIQUE_CHECK_YES) at nbtree.c:279 #9 0x00000000004e7964 in index_insert (indexRelation=3D0x7f14795a1a50, val= ues=3D0x7ffe46c6f7f0, isnull=3D0x7ffe46c6f7d0 "", heap_t_ctid=3D0x260927c, = heapRelation=3D0x25aa0a0, checkUnique=3DUNIQUE_CHECK_YES) at indexam.c:204 Of course, the database could have been corrupted after having encountered many crashes during my experiments. Neverthelesss, even without in-depth knowledge of the b-tree code I suspect that this stack trace might reflect a legal situation. In partcular, if _bt_page_recyclable() returned on this condition: if (PageIsNew(page)) return true; Unfortunately I no longer have the cluster nor the core dump, but I remember all the fields of PageHeader were indeed zeroed. --=20 Antonin Houska Cybertec Sch=C3=B6nig & Sch=C3=B6nig GmbH Gr=C3=B6hrm=C3=BChlgasse 26 A-2700 Wiener Neustadt Web: http://www.postgresql-support.de, http://www.cybertec.at --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers