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.94.2) (envelope-from ) id 1sWMfr-00Eiyv-4Y for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jul 2024 21:03:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sWMfp-00Gc53-70 for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jul 2024 21:03:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWMcm-00GZFU-TJ for pgsql-bugs@lists.postgresql.org; Tue, 23 Jul 2024 21:00:45 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWMcc-0015pM-6l for pgsql-bugs@lists.postgresql.org; Tue, 23 Jul 2024 21:00:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 46NL0WlA1106080; Tue, 23 Jul 2024 17:00:33 -0400 From: Tom Lane To: 1165125080@qq.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18533: pg_basebackup uses out-of-bounds memory and a segment error occurs during backup In-reply-to: <18533-7c9fe722cf1351f6@postgresql.org> References: <18533-7c9fe722cf1351f6@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 12 Jul 2024 07:58:27 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1106078.1721768432.1@sss.pgh.pa.us> Date: Tue, 23 Jul 2024 17:00:32 -0400 Message-ID: <1106079.1721768432@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > The following bug has been logged on the website: > Bug reference: 18533 > Logged by: ji xiaohang > Email address: 1165125080@qq.com > PostgreSQL version: 16.3 > Operating system: centos 7 > Description: > pg_basebackup uses out-of-bounds memory and a segment error occurs during > backup > Run the following command to back up the pg11 database using the > pg_basebackup backup tool of the pg16 version: > pg_basebackup -h 127.0.0.1 -p 56100 -U Backup -F tar -X f -z -c fast -P -v > -D - > base.tar.gz > The segmentation fault does not recur after I run commands. It seems that > this problem recurs only in my service invoking scenario. FWIW, I tried and failed to reproduce this problem. I don't see any segfault, nor does running pg_basebackup under Valgrind report any invalid accesses. Perhaps it's dependent on the contents of the source installation? (My test was with v11's core regression database and not much else.) It's going to be hard to convince people that we should change anything if we can't duplicate the problem, so I'd suggest working harder to make a self-contained reproducer. regards, tom lane