Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xLzSZ-00000001nRg-3V6n for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Oct 2026 08:56:40 +0000 Received: from localhost ([127.0.0.1]:40656 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xLzSZ-0000000En1g-1ZHg for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Oct 2026 08:56:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]:58928) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xLzSZ-0000000En1X-07LZ for pgsql-hackers@lists.postgresql.org; Wed, 28 Oct 2026 08:56:39 +0000 Received: from aye.elm.relay.mailchannels.net ([23.83.212.6]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xLzSW-00000001ODy-0Fvs for pgsql-hackers@postgresql.org; Wed, 28 Oct 2026 08:56:38 +0000 X-Sender-Id: hostingeremail|x-authuser|david@pgbackrest.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DCD7D7E2C0B; Wed, 28 Oct 2026 08:56:32 +0000 (UTC) Received: from fr-int-smtpout18.hostinger.io (100-96-5-161.trex-nlb.outbound.svc.cluster.local [100.96.5.161]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 34A6D7E2797; Wed, 28 Oct 2026 08:56:31 +0000 (UTC) X-Sender-Id: hostingeremail|x-authuser|david@pgbackrest.org X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|david@pgbackrest.org X-MailChannels-Auth-Id: hostingeremail X-Suffer-Arithmetic: 3414054c37d30dec_1793177792705_1013887005 X-MC-Loop-Signature: 1793177792704:2130787926 X-MC-Ingress-Time: 1793177792704 Received: from fr-int-smtpout18.hostinger.io (fr-int-smtpout18.hostinger.io [148.222.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.96.5.161 (trex/8.0.2); Wed, 28 Oct 2026 08:56:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgbackrest.org; s=hostingermail1; t=1793177789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=awboMEo5apz+HV4ReW2XdguLZs0mnsAwyF5FE16eN5E=; b=Y9yNBXXGXq8M8X0z9uU59+tVVKLdIwY/30gMgo+zTbUUELHfvlODOtWjFKhga9JUeQVo7S u+zdvyJKsDUTMGBssZZzELbtJVfwWaoI2bdyQkndOhoXLrAe/ZJlVjN6nw9IEo6GDfctES 1r+hoYr7Nn6p6ltAb/pzQ296WE09+MZ9SRUKirjnmKxvRTKetADzk7BYvC2Weml+7ZNPrQ ghrWUMmDyu6xixfIj0/7otcDLab9cQ7YEZ/uxqROKxLLw5BNMtbmDeMbNub3p298UGcHId Doc48TkJwHTQ+ypOdeMIS1S+x1k54VavSAnksdtND9YEpLnZdm+OUudEAIoN8Q== Received: from [10.3.0.2] (unknown [87.249.138.129]) (Authenticated sender: david@pgbackrest.org) by smtp.hostinger.com (smtp.hostinger.com) with ESMTPSA id 4jF1S94L6pz1xrP; Wed, 28 Oct 2026 08:56:25 +0000 (UTC) Message-ID: <86ab26ee-928d-4d58-b29d-e3ae7623a97b@pgbackrest.org> MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Return pg_control from pg_backup_stop(). To: Michael Paquier , Heikki Linnakangas Cc: Pg Hackers , Robert Haas , Andres Freund , Fujii Masao , solai v , hofstetter@jomasoft.ch References: <4193dcbc-591e-44bb-816c-43b4ae70d31c@pgbackrest.org> <86436ff9-eb98-4c8a-825e-3bcae022107b@pgbackrest.org> <9b37265e-8025-4e8a-9a9c-c4232eaf746f@pgbackrest.org> <50308898-7fad-40d5-88dd-fa657938c2fe@iki.fi> Content-Language: en-US From: David Steele In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 28 Oct 2026 08:56:25 +0000 (UTC) X-CM-Envelope: MS4xfK5xm4HhWJQ80kuOFXn5s9+R/yHCb4aBKmqqZKdr6FIMajE1RIg8PhwFqJLIXCbei3ox5Oi3bW0kvKqyDMqnwqsZd4bnnLzf5PacTHcb6anRd9lab5jn h3siwxqQ8wU7GTGfL5lrz/AehpoY3+097wIwXxZles0aKUIDLeekKGcpP0NMTRz/Nkgu5Of6wi3VdXFYkPqCvIGpwRGn1AbQZ+hbfeu25/b7q8PHr6v2k35J 7eSHLCb+MwxC/kdh1ZAsXSmytsJSsz8iWxYgK6VlwvEiAdcWFnKZoti9OQ5L3D2DFg7hmPR41FjpQ+QjFHSYb+HQcJgmJeQHiWEMv9arFaOZgPpAQJ09t4r2 QjwUl4/obNcTYf119R3FqV2Xg/GoXMtgM+aLcS3gjwUuQ40wH1PrxGUWAtwiFAaXfFqWmXTJ X-CM-Analysis: v=2.4 cv=P6tohTAu c=1 sm=1 tr=0 ts=6ae1b8bd a=BQQuLM3hWoeC1D9SHByaVQ==:117 a=BQQuLM3hWoeC1D9SHByaVQ==:17 a=IkcTkHD0fZMA:10 a=epTmVMiNAAAA:8 a=Rmdnu5ooSCNReIuPqAIA:9 a=QEXdDO2ut3YA:10 a=5JURzaxzF8IA:10 a=Z3ZzKiRzccAbQQSn0Y5v:22 X-AuthUser: david@pgbackrest.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/28/26 07:38, Michael Paquier wrote: > On Wed, Oct 28, 2026 at 09:00:44AM +0900, Michael Paquier wrote: >> Hearing nothing, I have added that into my own pipeline and applies >> the fix down to v15. v14 has been left out, the branch going EOL soon >> with a problem that is extremely going to happen in practice does not >> give me a warm feeling. For v15 and v16, I have backpatched >> d2c1e18de9d1 first. The fix has been applied as of 4a92c8c29bd0. > > Based on a sudden report from billbug, under Solaris 11, this gets > fun: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=billbug&dt=2026-10-28%2004%3A00%3A01 > > And we have a crash in a BASE_BACKUP command: > 2026-10-28 05:23:30.548 CET [1429:4] LOG: client backend (PID 1498) > was terminated by signal 11: Segmentation Fault > 2026-10-28 05:23:30.548 CET [1429:5] DETAIL: Failed process was > running: BASE_BACKUP ( LABEL 'pg_basebackup base backup', PROGRESS, > CHECKPOINT 'fast', WAIT 0, TABLESPACE_MAP, MANIFEST 'yes', TARGET > 'client') > > This runs under valgrind with -DRELCACHE_FORCE_RELEASE, and of course > I am not able to reproduce it with combinations of these three. Are you sure valgrind is running? I'm not too familiar with build farm configuration but it set 'use_valgrind' => undef, which seems to imply it is off even if -DUSE_VALGRIND is also set. > > The closest thing that I can see in recent history would be > 040932c31146. One possible explanation is PG_CONTROL_FILE_SIZE added > to the stack of perform_base_backup()? I'm still puzzled without more > information from valgrind, but if that's right we could try a > palloc0() instead. This was my first thought, but I can't see why 8KiB on the stack would be an issue. To me this looks a lot like a latent issue being exposed because we've pushed things around on the stack a bit. > My blind suggestion of fix would be the attached, that I cannot really > test. Thoughts or comments? The patch looks good to me but I'm concerned it would just be masking the real issue even if it works. I'd be curious to see if the back branches run green when they run. It would also be helpful to get a stack trace. 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. Regards, -David