From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: rekgrpth@gmail.com
Subject: BUG #17370: shmem lost on segfault
Date: Wed, 19 Jan 2022 03:05:56 +0000
Message-ID: <17370-a42a313cf1589256@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17370
Logged by: RekGRpth
Email address: rekgrpth@gmail.com
PostgreSQL version: 14.1
Operating system: docker alpine
Description:
In developing my https://github.com/RekGRpth/pg_task I found strange
behavior of shared memory segment.
I setup shared memory segment and give it to background worker, which I
start with default restart interval.
See
https://github.com/RekGRpth/pg_task/blob/d951723b6e556479f9a3fa960a6b3d1fb8f52164/conf.c#L67-L134
And everything works fine, even if background worker exits on error (if for
example I drop needed table task), then it restarts and can access to shared
memory segment.
See
https://github.com/RekGRpth/pg_task/blob/d951723b6e556479f9a3fa960a6b3d1fb8f52164/work.c#L742
But if third other process terminates by segmentation fault, my background
worker restarts fine but can not access to shared memory segment.
dsm_attach returns NULL
What I need to do to solve this problem?
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, rekgrpth@gmail.com
Subject: Re: BUG #17370: shmem lost on segfault
In-Reply-To: <17370-a42a313cf1589256@postgresql.org>
* 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