Re: add assertion for palloc in signal handlers - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: add assertion for palloc in signal handlers
Date
Msg-id aZX4yo30-WtmEBhD@nathan
Whole thread Raw
In response to Re: add assertion for palloc in signal handlers  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
On Wed, Feb 18, 2026 at 09:46:43AM -0600, Nathan Bossart wrote:
> On Wed, Feb 18, 2026 at 12:13:46PM +0500, Kirill Reshke wrote:
>> Hi! I tested patch under --single (single user mode), and ISTM that we
>> can reach palloc from ProcessInterrups here?
>> Maybe we should not elog in single user mode inside sighandler...
> 
> This is reproducible even without single-user mode by sending SIGQUIT to a
> client backend.  Both die() and quickdie() call ereport(), and both are
> commonly used as signal handlers for SIGTERM and SIGQUIT.

I also just got an assertion failure due to something in the startup
process.  Unfortunately I lost it before digging further, but I think it
was the proc_exit() call in StartupProcShutdownHandler().  I'll try to
reproduce it to get more details.  In any case, I'm a bit worried that
these assertions will cause quite a bit of noise.  I think we'd better
concoct a plan for dealing with them prior to inflicting the buildfarm.

-- 
nathan



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: convert SpinLock* macros to static inline functions
Next
From: Ants Aasma
Date:
Subject: Re: pg_stat_io_histogram