Re: Segmentation Fault

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Segmentation Fault
Date: 2023-09-14 20:57:29
Message-ID: 3c291501-31a4-4f92-b1eb-eb5e842693a6@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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(at)15-main(dot)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(at)15-main(dot)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/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-09-15 00:17:16 Re: Segmentation Fault
Previous Message Robert Sanford 2023-09-14 19:29:20 Re: Segmentation Fault