From: David Steele <david@pgbackrest.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: solai v <solai.cdac@gmail.com>
Cc: hofstetter@jomasoft.ch, Noah Misch <noah@leadboat.com>
Subject: Re: Return pg_control from pg_backup_stop().
Date: Wed, 28 Oct 2026 15:32:34 +0000 (UTC)
Message-ID: <c9a397a1-531d-4b54-aadb-a38aa6b752c8@pgbackrest.org> (raw)
In-Reply-To: <auHU8Vg3eHKpPjzb@paquier.xyz>
References: <4193dcbc-591e-44bb-816c-43b4ae70d31c@pgbackrest.org>
<86436ff9-eb98-4c8a-825e-3bcae022107b@pgbackrest.org>
<CAF0whueXubW3F4aaHOzMTbz92smb1bQ1MY_MiqXnmh-t1JmeYQ@mail.gmail.com>
<9b37265e-8025-4e8a-9a9c-c4232eaf746f@pgbackrest.org>
<d1697de1-eb7f-41bf-a4b7-bba7203df11f@pgbackrest.org>
<50308898-7fad-40d5-88dd-fa657938c2fe@iki.fi>
<atxBSt9Mn8B9DUej@paquier.xyz>
<auE7LJWMYskGO5Qr@paquier.xyz>
<auGYf3jXtzLrr4gA@paquier.xyz>
<86ab26ee-928d-4d58-b29d-e3ae7623a97b@pgbackrest.org>
<auHU8Vg3eHKpPjzb@paquier.xyz>
On 10/28/26 11:56, Michael Paquier wrote:
> On Wed, Oct 28, 2026 at 08:56:25AM +0000, David Steele wrote:
>> I've CC'd billbug's owner. The HEAD run with the 2026-10-28 04:00 UTC
>> snapshot crashed a client backend (PID 1498) running BASE_BACKUP with
>> SIGSEGV during src/bin/pg_basebackup/t/010_pg_basebackup.pl, but no
>> backtrace made it into the logs. Could you check whether a core file was
>> written and get a backtrace from it? If no core was written then the
>> coreadm settings may be redirecting or suppressing it. Any additional info
>> you can provide would be greatly appreciated.
>
> We have what looks like a second report on HEAD and v19, different
> pattern:
> https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=thorntail&dt=2026-10-28%2006%3A31%...
>
> From 001's primary logs:
> 2026-10-28 10:44:13.113 MSK [1706208:4] LOG: client backend (PID
> 1706227) was terminated by signal 10: Bus error
> 2026-10-28 10:44:13.113 MSK [1706208:5] DETAIL: Failed process was
> running: BASE_BACKUP (CHECKPOINT 'fast', MAX_RATE 32);
>
> If something else is going on, I'm not quite sure what it is yet.
thorntail is also SPARC so this failure narrows things down quite a bit.
The test that crashed is "base backup cleanly canceled". This test is
designed to be cancelled in the middle so it is unlikely that it ever
got to the new code, which isolates the extra 8KiB on the stack as the
likely cause. Well, that already seemed clear but this is additional
confirmation.
On the cancel path the only runtime difference from the prior code is
the size of perform_base_backup()'s frame. The new 8kB buffer is
declared inside PG_ENSURE_ERROR_CLEANUP() so the error from the cancel
siglongjmp()s back into the larger frame. A bus error on SPARC is
usually an alignment trap, so my guess is that the larger frame exposes
an alignment problem somewhere in the unwinding. That fits with my
earlier suspicion that this is a latent issue exposed by moving things
around on the stack.
Since v19 is failing as well this is not specific to master. I think we
should go ahead with your palloc0() patch to get the buildfarm green
again. It takes the buffer out of the frame entirely. It may well be
masking something, but that is better investigated with a backtrace than
with a red buildfarm. Perhaps Noah can get one from thorntail.
[This analysis was aided by Claude but I double-checked the details.]
Regards,
-David
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: david@pgbackrest.org, michael@paquier.xyz, hlinnaka@iki.fi, robertmhaas@gmail.com, andres@anarazel.de, masao.fujii@gmail.com, solai.cdac@gmail.com, noah@leadboat.com
Subject: Re: Return pg_control from pg_backup_stop().
In-Reply-To: <c9a397a1-531d-4b54-aadb-a38aa6b752c8@pgbackrest.org>
References: <4193dcbc-591e-44bb-816c-43b4ae70d31c@pgbackrest.org> <86436ff9-eb98-4c8a-825e-3bcae022107b@pgbackrest.org> <CAF0whueXubW3F4aaHOzMTbz92smb1bQ1MY_MiqXnmh-t1JmeYQ@mail.gmail.com> <9b37265e-8025-4e8a-9a9c-c4232eaf746f@pgbackrest.org> <d1697de1-eb7f-41bf-a4b7-bba7203df11f@pgbackrest.org> <50308898-7fad-40d5-88dd-fa657938c2fe@iki.fi> <atxBSt9Mn8B9DUej@paquier.xyz> <auE7LJWMYskGO5Qr@paquier.xyz> <auGYf3jXtzLrr4gA@paquier.xyz> <86ab26ee-928d-4d58-b29d-e3ae7623a97b@pgbackrest.org> <auHU8Vg3eHKpPjzb@paquier.xyz> <c9a397a1-531d-4b54-aadb-a38aa6b752c8@pgbackrest.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