Re: Segmentation Fault

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: Segmentation Fault
Дата
Msg-id 3c291501-31a4-4f92-b1eb-eb5e842693a6@app.fastmail.com
обсуждение исходный текст
Ответ на Re: Segmentation Fault  (Robert Sanford <wobbet@gmail.com>)
Список 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@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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Robert Sanford
Дата:
Сообщение: Re: Segmentation Fault
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Segmentation Fault