Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZLGW-0007uV-8d for pgsql-general@arkaria.postgresql.org; Wed, 10 Jan 2018 18:38:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZLGV-0000CS-5x for pgsql-general@arkaria.postgresql.org; Wed, 10 Jan 2018 18:38:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eZLGU-0000CI-Ux for pgsql-general@lists.postgresql.org; Wed, 10 Jan 2018 18:38:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eZLGR-0007LW-OB for pgsql-general@postgresql.org; Wed, 10 Jan 2018 18:38:18 +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 w0AIcBbv020343; Wed, 10 Jan 2018 13:38:12 -0500 From: Tom Lane To: Glauco Torres cc: pgsql-general@postgresql.org, Matheus Oliveira Subject: Re: Segmentation fault with core dump In-reply-to: References: <20180110173742.bvsk6rl4srprzsp4@alvherre.pgsql> <17271.1515606060@sss.pgh.pa.us> <18727.1515607938@sss.pgh.pa.us> Comments: In-reply-to Glauco Torres message dated "Wed, 10 Jan 2018 16:21:14 -0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20341.1515609491.1@sss.pgh.pa.us> Date: Wed, 10 Jan 2018 13:38:11 -0500 Message-ID: <20342.1515609491@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Glauco Torres writes: > Today I left to generate more core-dump, follow the return, > (gdb) bt > #0 tbm_comparator (left=left@entry=0x1d5ca08, right=right@entry=0x3acdb70) > at tidbitmap.c:1031 > #1 0x0000000000801268 in med3 (a=0x1d5ca08 "\350>\337\001", b=0x3acdb70 >
, c=0x583ecd8
bounds>, cmp=0x603ca0 ) at qsort.c:107 > #2 0x0000000000801621 in pg_qsort (a=0x1d5ca08, n=, > n@entry=10477, > es=es@entry=8, cmp=cmp@entry=0x603ca0 ) at qsort.c:157 > #3 0x0000000000604a7b in tbm_begin_iterate (tbm=tbm@entry=0x1dd8a00) at > tidbitmap.c:635 Oh ho! I was wondering to myself "if pg_qsort is broken, why isn't his system falling over everywhere?". The answer evidently is "yes, it is falling over everywhere". This symptom looks pretty much like what you had before, ie far-out-of-range addresses getting passed to med3(), but the qsort call site is completely different. Since you've eliminated the idea that the executable file per se is different from your working servers, I think we're now down to the conclusion that there's something flaky about the hardware on this server. Maybe it's misexecuting integer divide every so often --- though it's hard to guess why only pg_qsort would be affected. regards, tom lane