public inbox for [email protected]
help / color / mirror / Atom feedFrom: Emond Papegaaij <[email protected]>
To: Tatsuo Ishii <[email protected]>
Cc: [email protected]
Subject: Re: Fix signal handler in pgpool main
Date: Wed, 24 Jun 2026 15:19:10 +0200
Message-ID: <CAGXsc+buSf4=WPyVZP-VNHOSABBeRGx17sQjdu-9LyPY3FXBvA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
Thank you for taking care of this! I agree with your decision to not
patch 4.3 given that the code doesn't match. You have to weigh the
benefits against the risks in such cases.
Best regards,
Emond
Op di 23 jun 2026 om 14:54 schreef Tatsuo Ishii <[email protected]>:
>
> Hi Emond,
>
> > I got a bug report regarding pgpool main process from Emond Papegaaij:
> > its exit/reload signal handler uses non signal safe functions, and it
> > could lead to a crash of the process.
> >
> > Attached is the patch from him generated by Claude Code, with slight
> > modifications by me.
> >
> > Basically it changes the signal handler to async-signal-safe calls
> > only: capture the signal number into a new volatile sig_atomic_t
> > main_exit_request, write one byte to the existing self-pipe to wake
> > the main loop, restore errno, and return. The actual shutdown is
> > performed synchronously by a new do_shutdown() function called from
> > the pgpol main loop at the top of every iteration (via
> > check_requests()) and also right after the inner pool_pause() returns,
> > so a signal arriving during the 2-second select() sleep is acted on
> > without an extra tick of latency.
> >
> > I think this patch is important and worth to apply to all supported
> > branches.
> >
> > However, since it touches one of the most critical part of pgpool, I
> > would like to apply to master branch first and see how our build-farm
> > acts before back patching (it will take a few days).
> >
> > Comments?
>
> Patch pushed to v4.4.
>
> Peng and Koshino reviewed the patch off-list. No change was necessary.
> I just removed some non-ASCII characters in comments (probably I
> mistakenly brought them in by copy-and-paste). I tried to back-patch
> to v4.3 but it seems it needs invasive changes and I gave up it. So I
> decided to back patch through v4.4.
>
> Thank you!
> --
> Tatsuo Ishii
> SRA OSS K.K.
> English: http://www.sraoss.co.jp/index_en/
> Japanese:http://www.sraoss.co.jp
view thread (3+ messages)
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Fix signal handler in pgpool main
In-Reply-To: <CAGXsc+buSf4=WPyVZP-VNHOSABBeRGx17sQjdu-9LyPY3FXBvA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox