public inbox for [email protected]help / color / mirror / Atom feed
Stack Smashing Detected When Executing initdb 3+ messages / 2 participants [nested] [flat]
* Stack Smashing Detected When Executing initdb @ 2024-06-23 07:19 Xu Haorong <[email protected]> 2024-06-23 15:48 ` Re: Stack Smashing Detected When Executing initdb Tom Lane <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Xu Haorong @ 2024-06-23 07:19 UTC (permalink / raw) To: pgsql-general 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='clang -fno-stack-protector' However, the problem still exists. Is there anyone else having this issue? Regards, Haorong Xu ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Stack Smashing Detected When Executing initdb 2024-06-23 07:19 Stack Smashing Detected When Executing initdb Xu Haorong <[email protected]> @ 2024-06-23 15:48 ` Tom Lane <[email protected]> 2024-06-23 18:32 ` Re: Stack Smashing Detected When Executing initdb Tom Lane <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Tom Lane @ 2024-06-23 15:48 UTC (permalink / raw) To: Xu Haorong <[email protected]>; +Cc: pgsql-general Xu Haorong <[email protected]> writes: > 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: > performing post-bootstrap initialization ... *** stack smashing detected ***: 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. You've provided exactly zero context: * What platform is this on (be specific)? Is the system software up-to-date? * What C compiler are you using, and what version exactly? * What configure options did you use? regards, tom lane [1] https://buildfarm.postgresql.org/cgi-bin/show_status.pl ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Stack Smashing Detected When Executing initdb 2024-06-23 07:19 Stack Smashing Detected When Executing initdb Xu Haorong <[email protected]> 2024-06-23 15:48 ` Re: Stack Smashing Detected When Executing initdb Tom Lane <[email protected]> @ 2024-06-23 18:32 ` Tom Lane <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2024-06-23 18:32 UTC (permalink / raw) To: Xu Haorong <[email protected]>; +Cc: pgsql-general I wrote: > Xu Haorong <[email protected]> writes: >> performing post-bootstrap initialization ... *** stack smashing detected ***: 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 ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-06-23 18:32 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-06-23 07:19 Stack Smashing Detected When Executing initdb Xu Haorong <[email protected]> 2024-06-23 15:48 ` Tom Lane <[email protected]> 2024-06-23 18:32 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox