From: Euler Taveira <euler@eulerto.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: Segmentation Fault
Date: Thu, 14 Sep 2023 17:57:29 -0300
Message-ID: <3c291501-31a4-4f92-b1eb-eb5e842693a6@app.fastmail.com> (raw)
In-Reply-To: <CABa+nRs8vLBkCtSw5HJCreo1Fx-NysHG_AgMBBOQNBFFGnwQJA@mail.gmail.com>
References: <CABa+nRvwZy_5t1QF9NJNGwAf03tv_PO_Sg1FsN1+-3Odb1XgBA@mail.gmail.com>
<CABa+nRuatSjnqsPfnoo0APzgeM1Um94FesYj6H1YKB1qJ8JoqA@mail.gmail.com>
<3030992.1694649537@sss.pgh.pa.us>
<CABa+nRs0x9DR52xyRa2COJOad-9VfjYQkDRcJOPACGsSCN_QJQ@mail.gmail.com>
<CABa+nRs8vLBkCtSw5HJCreo1Fx-NysHG_AgMBBOQNBFFGnwQJA@mail.gmail.com>
On Thu, Sep 14, 2023, at 4:29 PM, Robert Sanford wrote:
> And now it's happening again...
>
> I'm trying to get a core dump but I can't seem to actually generate one.
>
> When I try to set ulimit -c from the command line, I get a message that I'm not allowed to do that. So I went in and updated /etc/security/limits.conf for the postgres user as follows.
> postgres hard core unlimited
> postgres soft core unlimited
>
> I then restarted the postgres server. When I look at the limits in the pid folder I see...
> Limit Soft Limit Hard Limit Units
> Max cpu time unlimited unlimited seconds
> Max file size unlimited unlimited bytes
> Max data size unlimited unlimited bytes
> Max stack size 8388608 unlimited bytes
> Max core file size 0 unlimited bytes
Are you using systemd? If so, execute
sudo systemctl show -p LimitCORE postgresql@15-main.service
(Replace service name accordingly.)
If it is not showing infinity as value, you need to edit the service file using
the following command:
sudo systemctl edit postgresql@15-main.service
and add
[Service]
LimitCORE=infinity
Restart the service after it and check again with systemctl show command.
You should also check where the operating system is saving the core files.
cat /proc/sys/kernel/core_pattern
If it says core, it means it is storing it in PGDATA directory. Some OSes can
use a command/script to send the core files to another location.
--
Euler Taveira
EDB https://www.enterprisedb.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: euler@eulerto.com
Subject: Re: Segmentation Fault
In-Reply-To: <3c291501-31a4-4f92-b1eb-eb5e842693a6@app.fastmail.com>
References: <CABa+nRvwZy_5t1QF9NJNGwAf03tv_PO_Sg1FsN1+-3Odb1XgBA@mail.gmail.com> <CABa+nRuatSjnqsPfnoo0APzgeM1Um94FesYj6H1YKB1qJ8JoqA@mail.gmail.com> <3030992.1694649537@sss.pgh.pa.us> <CABa+nRs0x9DR52xyRa2COJOad-9VfjYQkDRcJOPACGsSCN_QJQ@mail.gmail.com> <CABa+nRs8vLBkCtSw5HJCreo1Fx-NysHG_AgMBBOQNBFFGnwQJA@mail.gmail.com> <3c291501-31a4-4f92-b1eb-eb5e842693a6@app.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox