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 1r9GEn-00FgkZ-FO for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Dec 2023 03:00:13 +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 1r9GEl-00ACpl-KX for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Dec 2023 03:00:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r9GEl-00ACpc-Ac for pgsql-hackers@lists.postgresql.org; Sat, 02 Dec 2023 03:00:11 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r9GEe-009ejH-B1 for pgsql-hackers@postgresql.org; Sat, 02 Dec 2023 03:00:10 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50bc22c836bso4034734e87.0 for ; Fri, 01 Dec 2023 19:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701486004; x=1702090804; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Ld/EholMUKfmksRyDEenp1zzoScJ5KsPcbXnqF11wts=; b=bERL9mPuq0MV1fXsVLqw9H3/eb1UGONd1fYWYGrZXbwVaQJZ7Z9vkr81LOWGhwNMRY PoJCeBF2lWAYKCNKlG2S0e+Rr8LDNCfjhApbkPvMV3WfrSeXxat69VMSno1djwc70D5g Bje6Vsq+n0z+KJ+7B66TJqZKLSIxLUU3MzgQ2sJtxxWzBKcnoqSDy197u3s6I4tc9DVq 00oZRoB8w9i0Wp1fdX/VUWe5rl4RTtGbbrXb0brg1awcOQ5wyGJPpAT3shZ1lDBPc/Yn MYuCmXCQDc23/NjH5wWRepGeFCsHhQu6jmV9drNR9YuRRSwPBWcv90kC2l2m2AVb3ZVz /sBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701486004; x=1702090804; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ld/EholMUKfmksRyDEenp1zzoScJ5KsPcbXnqF11wts=; b=IqlLAUBAPfaD7/16DBWAsCzSFNZiDBPWNSyv8NP3HCmTM3u16z2okevlTKldZnIESJ VhHgohFeuX1F6e6PQ7Zfm+DXDiuA4udbV6zUAoUIAOIyHqnnrr5d5BJVusOE8In9pb4X XOOkxzJT9CPvD+JCKt+1Do5hssTPrtLKop9Ie8kHkfaux0anUUd6suOFZmW7IAAePk9D 5s20H5AlKM9/V1HXlIz5xyQ+nUEBB7buyJG4qZrrzEXSuudtM7Br5p8RoBBT77JIHynm XcxcGUVKbhEoWzyPEo83KzbisikmY6TJszhaCrI80MSqY+xsfPFYtFKko8bdd0EIYHKn akuA== X-Gm-Message-State: AOJu0YzCXMC71hzT7pqDAxQc2EEDmhHhl0NuG77M2qsI9stcU+WDYRBQ TwiTJ3ChNiLDkcS5pyVu61M= X-Google-Smtp-Source: AGHT+IE7lz5GLJHzdgGsaHerF2FG327eWpqEEc7Fs5GRFEICqAzCIcfuLIFF/zm92XCIpkV18MFfYw== X-Received: by 2002:a05:6512:110c:b0:50b:b7fe:efa5 with SMTP id l12-20020a056512110c00b0050bb7feefa5mr1656069lfg.46.1701486003394; Fri, 01 Dec 2023 19:00:03 -0800 (PST) Received: from [1.0.0.7] ([178.155.27.119]) by smtp.gmail.com with ESMTPSA id c28-20020ac2531c000000b0050bc2f09261sm586834lfh.34.2023.12.01.19.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Dec 2023 19:00:02 -0800 (PST) Message-ID: <5e976369-2925-e0cc-b5a1-e9e356264596@gmail.com> Date: Sat, 2 Dec 2023 06:00:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Refactoring backend fork+exec code Content-Language: en-US To: Heikki Linnakangas , Tristan Partin , Andres Freund Cc: pgsql-hackers , Thomas Munro References: <7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi> <20230710225043.svl7fqxecwshwc7a@awork3.anarazel.de> <119551e6-60f6-49b2-ae04-a382a89f900c@iki.fi> <3b02a5a1-81ea-44e4-a09e-c0a594a4cef8@iki.fi> <014768ed-8b39-c44f-b07c-098c87b1644c@gmail.com> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Heikki, 01.12.2023 23:44, Heikki Linnakangas wrote: > >> With memset(param, 0, sizeof(*param)); added at the beginning of >> save_backend_variables(), server starts successfully, but then >> `make check` fails with other Valgrind error. > > That's actually a pre-existing issue, I'm seeing that even on unpatched 'master'. Thank you for fixing that! Yes, I had discovered it before, but yesterday I decided to check whether your patches improve the situation... What bothered me additionally, is an error detected after server start. I couldn't see it without the patches applied. I mean, on HEAD I now see `make check` passing, but with the patches it fails: ... # parallel group (20 tests):  interval date numerology polygon box macaddr8 macaddr multirangetypes line timestamp timetz timestamptz time circle strings lseg inet md5 path point not ok 22    + strings                                  1048 ms # (test process exited with exit code 2) not ok 23    + md5                                      1052 ms # (test process exited with exit code 2) ... src/test/regress/log/postmaster.log contains: ==00:00:00:30.730 1713480== Syscall param write(buf) points to uninitialised byte(s) ==00:00:00:30.730 1713480==    at 0x5245A37: write (write.c:26) ==00:00:00:30.730 1713480==    by 0x51BBF6C: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1180) ==00:00:00:30.730 1713480==    by 0x51BC84F: new_do_write (fileops.c:448) ==00:00:00:30.730 1713480==    by 0x51BC84F: _IO_new_file_xsputn (fileops.c:1254) ==00:00:00:30.730 1713480==    by 0x51BC84F: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1196) ==00:00:00:30.730 1713480==    by 0x51B1056: fwrite (iofwrite.c:39) ==00:00:00:30.730 1713480==    by 0x5540CF: internal_forkexec (postmaster.c:4526) ==00:00:00:30.730 1713480==    by 0x5543C0: bgworker_forkexec (postmaster.c:5624) ==00:00:00:30.730 1713480==    by 0x555477: do_start_bgworker (postmaster.c:5665) ==00:00:00:30.730 1713480==    by 0x555738: maybe_start_bgworkers (postmaster.c:5928) ==00:00:00:30.730 1713480==    by 0x556072: process_pm_pmsignal (postmaster.c:5080) ==00:00:00:30.730 1713480==    by 0x556610: ServerLoop (postmaster.c:1761) ==00:00:00:30.730 1713480==    by 0x557BE2: PostmasterMain (postmaster.c:1469) ==00:00:00:30.730 1713480==    by 0x47216B: main (main.c:198) ==00:00:00:30.730 1713480==  Address 0x1ffeffd8c0 is on thread 1's stack ==00:00:00:30.730 1713480==  in frame #4, created by internal_forkexec (postmaster.c:4482) ==00:00:00:30.730 1713480== ... 2023-12-02 05:14:30.751 MSK client backend[1713740] pg_regress/rangetypes FATAL:  terminating connection due to unexpected postmaster exit 2023-12-02 05:14:31.033 MSK client backend[1713734] pg_regress/numeric FATAL:  postmaster exited during a parallel transaction TRAP: failed Assert("!IsTransactionOrTransactionBlock()"), File: "pgstat.c", Line: 591, PID: 1713734 I haven't looked deeper yet, but it seems that we see two issues here (and Assert is not directly caused by the patches set.) Best regards, Alexander