Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sLS0p-00Evnh-La for pgsql-general@arkaria.postgresql.org; Sun, 23 Jun 2024 18:32:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sLS0l-00F075-OV for pgsql-general@arkaria.postgresql.org; Sun, 23 Jun 2024 18:32:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sLS0l-00F06u-DO for pgsql-general@lists.postgresql.org; Sun, 23 Jun 2024 18:32:23 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sLS0d-003AxX-0H for pgsql-general@postgresql.org; Sun, 23 Jun 2024 18:32:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 45NIW9X0983896; Sun, 23 Jun 2024 14:32:09 -0400 From: Tom Lane To: Xu Haorong cc: "pgsql-general@postgresql.org" Subject: Re: Stack Smashing Detected When Executing initdb In-reply-to: <959183.1719157695@sss.pgh.pa.us> References: <959183.1719157695@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 23 Jun 2024 11:48:15 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <983894.1719167529.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 23 Jun 2024 14:32:09 -0400 Message-ID: <983895.1719167529@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Xu Haorong writes: >> performing post-bootstrap initialization ... *** stack smashing detecte= d ***: terminated >> Aborted (core dumped) >> child process exited with exit code 134 > No such problem is visible in our build farm [1], so what we have to > figure out is how your machine is different from all of those. Also, before you spend a lot of time chasing this, make sure it's not a mirage. Reset your source tree fully with "git clean -dfxq" then configure, make, make install; then see if problem still exists. If it does, the PG community's accumulated wisdom about getting stack traces is here: https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_= backend Note that the "child process exited" message you show implies that the failure was not in initdb itself, but in the single-user postgres backend process that it spawns. This means that any core file would have been dumped into the created data directory, so you would have to use initdb's --no-clean option to prevent it from being removed immediately. Also, if you are using a systemd-based Linux distribution, you may have to negotiate with systemd-coredump to get back any core dump at all. "man 5 core" can be helpful reading here (personally I just disable systemd-coredump per the directions shown there). regards, tom lane