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 1sLNyh-00Ef47-Ud for pgsql-general@arkaria.postgresql.org; Sun, 23 Jun 2024 14:14:00 +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 1sLNyf-00C28Q-9y for pgsql-general@arkaria.postgresql.org; Sun, 23 Jun 2024 14:13:57 +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 1sLNye-00C28I-Q6 for pgsql-general@lists.postgresql.org; Sun, 23 Jun 2024 14:13:57 +0000 Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sLNyc-0039Kx-8M for pgsql-general@postgresql.org; Sun, 23 Jun 2024 14:13:56 +0000 Received: by mail-ua1-x929.google.com with SMTP id a1e0cc1a2514c-80f50f01b32so2371172241.0 for ; Sun, 23 Jun 2024 07:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719152031; x=1719756831; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=++6M39Me3vhZtJxfYk1LaEjF7Li16ctiNB6QqyIBJag=; b=Isl8a6uybIBDZQx5IU6ddPpPb6fwFd4C6Xd3EENmEhnheusmWUU5JFv88d2bpezCWW KddUx8NkoPkLBh4xFQkJy/ZUOVavoBbkPx94ZXNyCR01okGyYRVf/xczYDXC1YiHY5Rr +UgfGTVQMGOVkWWN4DkaK3F5DaN83aHm3SNlv/lvb4h271WeXkqZJJN9/UCziM4W9qQy TZHvcX17/GmiR8OGkKQwBV99WD66EBFQDvs/sj1WJA0gmtmyQKJasBxBTgESBmbt3TFw YKJK/e2O6I3iOG7PxksOmeiW2lsH95oeloeIrWQItILWRA447oHNXGX5qbNqFoQG/tvU uzXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719152031; x=1719756831; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=++6M39Me3vhZtJxfYk1LaEjF7Li16ctiNB6QqyIBJag=; b=r7GRsVzGh+fiKRPCItw/dxuKawGp06ICJvE0IgxrBmSMCzusfQhYR8UlqByPZ3JSCh vU4pGrFa2xrQiimD23MsYXEa+UvQKT83wtgMUIwnC05j6zkIF6mg57qqNBhjQZKSlvXD rTOO5cGxnSes8ILGZCtBJ0Ls3OYzt/K5dr2euFTp+xnu1lexy/3ltTB/+KMaNCmWOhcm MvxjMTRsQ7zneBANC8YKR1uCKTak95Z33ED4FDIPv8UYgbf+Po+cljypGPg92x+uSzTy oC+hWeePNQ+LTet7fbvX1CqLTzvHF95EuoWSWAbXvA9vwf8p3vJ5grR2ANQWJBz1AD2B 0q/Q== X-Forwarded-Encrypted: i=1; AJvYcCVY++GqGQZLGQg4Vu/dc7NvgnDC0s8+zmxDlPfKsNq+T0z4+RGGdA8PpIWJGip/iAsff+cRfdmgeKpGV2gfNt8fKlYm5rW487NLpAb/ X-Gm-Message-State: AOJu0YzLme0SwIOWcx2jc+sDQ+uTZYnPmEsNzkW/FTdbMvyJjXhH1qf8 aiH6awQqirHc0QD38A3+vTG/IGgmX/Y3UzfGPyN4XLtvPI9qf0Upwiv8OFWZgJSjPcH3gkmOdnl 0Nhp+3URhQemeJqCWdOXDMJapNUA= X-Google-Smtp-Source: AGHT+IErMYrz+tAiCesEz7LIspMOlBGHt6kT5k03I5xLm/QEmZRQ1EpEhVVRX2E/u2N3sTE7wcVuEtYSLxgpP6hZO7I= X-Received: by 2002:ac5:cca3:0:b0:4eb:ddd:4b95 with SMTP id 71dfb90a1353d-4ef64bd4decmr1735624e0c.0.1719152031481; Sun, 23 Jun 2024 07:13:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kashif Zeeshan Date: Sun, 23 Jun 2024 19:13:40 +0500 Message-ID: Subject: Re: Stack Smashing Detected When Executing initdb To: Xu Haorong , Postgres General Content-Type: multipart/alternative; boundary="00000000000026c9eb061b8f4627" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000026c9eb061b8f4627 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Xu You need to enable some settings for the code dump to generated. For the settings you can use following link. https://access.redhat.com/solutions/4896 Regards Kashif Zeeshan On Sun, Jun 23, 2024 at 7:07=E2=80=AFPM Xu Haorong = wrote: > Hi Zeeshan, > > Thank you for helping me. I tried to analyze the core dump file, but > unfortunately it didn't seem to have generated one. Therefore I ran initd= b > with gdb, which produced following output: > > Program received signal SIGPIPE, Broken pipe. > 0x00007ffff791c574 in __GI___libc_write (fd=3D4, buf=3D0x555555636a60, > nbytes=3D64) at ../sysdeps/unix/sysv/linux/write.c:26 > warning: 26 ../sysdeps/unix/sysv/linux/write.c: No such file or directory > > The error message clearly indicates that something like write.c is > missing, which is included in GNU C Library. However, I found that I've > already installed it on my computer. It also confuses me that there was n= o > core dump file at all, since initdb says "Aborted (core dumped)". I'd > really appreciate if you can give me further information. > > Regards, > Haorong Xu > ------------------------------ > *=E5=8F=91=E4=BB=B6=E4=BA=BA:* Kashif Zeeshan > *=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4:* 2024=E5=B9=B46=E6=9C=8823=E6=97= =A5 16:50 > *=E6=94=B6=E4=BB=B6=E4=BA=BA:* Xu Haorong > *=E6=8A=84=E9=80=81:* pgsql-general@postgresql.org > *=E4=B8=BB=E9=A2=98:* Re: Stack Smashing Detected When Executing initdb > > Hi Xu > > To pinpoint the issue, please use gdb debugger to get the backtrace to > exactly find out where the error is occurring and you can then do the > required setups. > > > For Reference : > https://stackoverflow.com/questions/50093327/how-do-i-solve-postgresql-ab= orted-core-dumped-error > > > Thanks > Kashif Zeeshan > > On Sun, Jun 23, 2024 at 12:19=E2=80=AFPM Xu Haorong > wrote: > > Hi everyone, > > Today I tried to build the latest devel version of PostgreSQL(commit > 70a845c04a47645b58f8276a6b3ab201ea8ec426). The compilation was successful= , > but when I ran initdb an error occured: > > /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data > The files belonging to this database system will be owned by user > "postgres". > This user must also own the server process. > > The database cluster will be initialized with locale "en_US.UTF-8". > The default database encoding has accordingly been set to "UTF8". > The default text search configuration will be set to "english". > > Data page checksums are disabled. > > fixing permissions on existing directory /usr/local/pgsql/data ... ok > creating subdirectories ... ok > selecting dynamic shared memory implementation ... posix > selecting default "max_connections" ... 100 > selecting default "shared_buffers" ... 128MB > selecting default time zone ... Asia/Shanghai > creating configuration files ... ok > running bootstrap script ... ok > *performing post-bootstrap initialization ... *** **stack smashing > detected** ***: terminated* > *Aborted (core dumped)* > *child process exited with exit code 134* > *initdb: removing contents of data directory "/usr/local/pgsql/data"* > > After searching for solutions on the Internet, I disabled the stack > smashing protector by performing > *./configure CC=3D'clang -fno-stack-protector'* > > However, the problem still exists. Is there anyone else having this issue= ? > > Regards, > Haorong Xu > > --00000000000026c9eb061b8f4627 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Xu

You need to enable som= e settings for the code dump to generated.

For the= settings you can use following link.

On Sun, Jun = 23, 2024 at 7:07=E2=80=AFPM Xu Haorong <db_haorong@outlook.com> wrote:
=
Hi Zeeshan,

Thank you for helping me. I tried to analyze the core dump file, but unfort= unately it didn't seem to have generated one. Therefore I ran initdb wi= th gdb, which produced following output:

Program received signal SIGPIPE, Broken pipe.
0x00007ffff791c574 in __GI___libc_write (fd=3D4, buf=3D0x555555636a60, nbyt= es=3D64) at ../sysdeps/unix/sysv/linux/write.c:26
warning: 26=E2=80=82../sysdeps/unix/sysv/linux/write.c: No such file or dir= ectory

The error message clearly indicates that something like write.c is missing,= which is included in GNU C Library. However, I found that I've already= installed it on my computer. It also confuses me that there was no core du= mp file at all, since initdb says "Aborted (core dumped)". I'd really appreciate if you can give me further = information.

Regards,
Haorong Xu

=E5=8F=91=E4=BB=B6=E4=BA=BA: Kashif Zeeshan <kashi.zeeshan@gmail.c= om>
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B46=E6=9C=8823=E6= =97=A5 16:50
=E6=94=B6=E4=BB=B6=E4=BA=BA: Xu Haorong <db_haorong@outlook.com>
=E6=8A=84=E9=80=81: pgsql-general@postgresql.org <pgsql-general@postgresql.org<= /a>>
=E4=B8=BB=E9=A2=98: Re: Stack Smashing Detected When Executing initd= b
=C2=A0

On Sun, Jun 23, 2024 at 12:19=E2=80=AFPM Xu Haorong <db_haorong@outloo= k.com> wrote:
Hi everyone,=C2=A0

Today I tried to build the latest devel version of PostgreSQL(commit 70a845= c04a47645b58f8276a6b3ab201ea8ec426). The compilation was successful, but wh= en I ran initdb an error occured:

/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "pos= tgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8"= ;.
The default database encoding has accordingly been set to "UTF8".=
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default "max_connections" ... 100
selecting default "shared_buffers" ... 128MB
selecting default time zone ... Asia/Shanghai
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... *** stack smashin= g detected=C2=A0***: terminated
Aborted (core dumped)
child process exited with exit code 134
initdb: removing contents of data directory "/usr/local/pgsql/data&= quot;

After searching for solutions on the Internet, I disabled the=C2=A0stack sm= ashing protector by performing
./configure CC=3D'clang -fno-stack-protector'

However, the problem still exists. Is there anyone else having this issue?<= /div>

Regards,
Haorong Xu
--00000000000026c9eb061b8f4627--