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 1xEIp8-000000012E2-1JDW for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Oct 2026 04:00:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xEIp7-00000004KQQ-1MOd for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Oct 2026 04:00:09 +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.98.2) (envelope-from ) id 1xEIp7-00000004KQI-0AtR for pgsql-hackers@lists.postgresql.org; Wed, 07 Oct 2026 04:00:09 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xEIp2-00000000lED-1dJf for pgsql-hackers@postgresql.org; Wed, 07 Oct 2026 04:00:08 +0000 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-48b02b1b4cfso932928f8f.0 for ; Tue, 06 Oct 2026 21:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791345602; x=1791950402; darn=postgresql.org; h=content-transfer-encoding:content-type:content-language:to:subject :from:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to:content-type; bh=yj6OVNp4Sj7szsCcDXOFunTCMVfiX49erMnI/DLwT+k=; b=N+7UAJvzAUg+omzpmFJEuxrWhd2B+WBECRp1QR907aFYAdOoAnfwwmi5HnbqPLvqcK jbg+WJGfPt7W9RXLJCV0lupAkz1K/P6nl/tMW53TUo4jbAjpQGDGZ7fdN5hkXf2xm5Ke Qb7Y554WUwBQBcpMzIN+4SL4EwaV0f0RzaKTecn3pR0FdE+bW7LPoI4Vfj9YOzztEoc1 75p8iw6YUKg/E+SSgLayk9f4CpohdP4p/JuC425kcHizSyb1R6MYZk+Es9ULbk8xtnmY KKpWyONP1W8vskGc4XIqyelO4S57ezzX7yF8RdS+rEFcGxczifA1iC4+2eaj4iwYv5K7 DZ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791345602; x=1791950402; h=content-transfer-encoding:content-type:content-language:to:subject :from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yj6OVNp4Sj7szsCcDXOFunTCMVfiX49erMnI/DLwT+k=; b=JF2nRLvqrFE9qCsN+a1iGd1WmK6BmTmJMKPIxhy7vkNnXZFIsMm1EzPrijVgrl4grf ahO4aKVusBmIhpOT6GjMnNG+a1g0ogf6L6L0/RAfOwf9YT6Vb68rKLOUWZMCLO+uEki/ BlJTG/i8+4fGi8c8KL/Zir2AqoPLLt1nAMRc2/MDajIu8KaUh4lRdNhFEgmsF5Af9luO Hh/7btxzOHR+NweVCKb9ViX2WkwvgsVXpWeXmiskJWVCwIp4DKDoN/OzGQZMeRDgpdE1 sJG51ifxobIum146vCVGzMRRBZv3peBFWH6h9Ga+I3SAWOpFhd3M7akToI0uhFCDF9aL MqbQ== X-Forwarded-Encrypted: i=1; AKwUvBxieZpvNKQkxRWkqjwc3Ey5zHfAhSef03iIyCuLyZ7XFtQQS5W/gwiPqHzlub0gjVd/OHcjB0Czokr6QbdO@postgresql.org X-Gm-Message-State: AFq9FYLmbKJSzRLWwULMAR3bkZ7MTxd9l4uTMIIsJeKY66+CPPRRs/ci kPQSOeEiZfi2oWhygoDmehU7qDT2MBvqipN/W5JXPP293J3bkvsKQgxS/i39VA== X-Gm-Gg: AYBFou2U856hC3QWP6CRGiXIRrQ06UuU8PJGm+yVoCaCzwQ3aiOnyRkOiZ9ceJWKxDs tYggI+r9Sls/TiE2WDqPbsA3+F4Expsxj7ysepvgdm1qcO9HE7fZuGzuyo5kAdmIkuRbwqlAeA8 D1bvwZ6SgU5Vz5wqujquniFDMGy0D8sPvA09Vc4rawJfxfwa7GagmamPZM37Mxy5CFP1pS8noXk YBl6obfEvKiqm0o2KDV+mB2/Cy+FTI4Fs0r311DC3v0UzaJJfUC8pA+ytZiRx4R+vdi6UEfCw7T 0nrWG0ex1KkeWDYHOOrWHyxki3zMwyu7Ovp0Lft8lM/DAY8puXGSPJ2C0KAeQZPSMtHSuX1qXhy XAuNOBhR9qkm35DaRqPS835VZOgkKXmQt+ChAAro+30+Mkbvb2c7PxqHpwl1NVusYNUkIBzAdY8 uzgQsqp0637XUEsJNLYn0mPZ/hahITjTGbRdZE1h8laY5TfhndTlvQCRv50wObwp62YCC+jX0vr w== X-Received: by 2002:a05:6000:2583:b0:485:8226:c69c with SMTP id ffacd0b85a97d-48c688f7b85mr8355376f8f.27.1791345602099; Tue, 06 Oct 2026 21:00:02 -0700 (PDT) Received: from [192.168.0.50] ([89.149.120.141]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48c71d3f05asm4084647f8f.55.2026.10.06.21.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Oct 2026 21:00:01 -0700 (PDT) Message-ID: Date: Wed, 7 Oct 2026 07:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Alexander Lakhin Subject: 041_checkpoint_at_promote.pl might fail due to race condition on child kill To: Michael Paquier , pgsql-hackers Content-Language: en-US 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 hackers, Please look at a new failure of 041_checkpoint_at_promote.pl produced by bushmaster, [1]: [23:56:13.841](0.002s) ok 4 - psql query died successfully after SIGKILL [23:56:13.902](0.061s) not ok 5 - psql connect success [23:56:13.902](0.000s) [23:56:13.902](0.000s) #   Failed test 'psql connect success' #   at t/041_checkpoint_at_promote.pl line 168. [23:56:13.902](0.000s) #          got: '2' #     expected: '0' [23:56:13.902](0.000s) not ok 6 - psql select 1 [23:56:13.902](0.000s) [23:56:13.902](0.000s) #   Failed test 'psql select 1' #   at t/041_checkpoint_at_promote.pl line 169. [23:56:13.902](0.000s) #          got: '' #     expected: '1' [23:56:13.902](0.000s) 1..6 pgsql.build/src/test/recovery/tmp_check/log/041_checkpoint_at_promote_standby1.log 2026-10-03 23:56:13.852 CEST [4159149][postmaster][:0] LOG:  client backend (PID 4159398) was terminated by signal 9: Killed 2026-10-03 23:56:13.852 CEST [4159149][postmaster][:0] DETAIL: Failed process was running: SELECT pg_backend_pid(); 2026-10-03 23:56:13.852 CEST [4159149][postmaster][:0] LOG: terminating any other active server processes 2026-10-03 23:56:13.855 CEST [4159149][postmaster][:0] LOG:  all server processes terminated; reinitializing 2026-10-03 23:56:13.899 CEST [4159414][startup][:0] LOG:  database system was interrupted; last known up at 2026-10-03 23:56:13 CEST 2026-10-03 23:56:13.899 CEST [4159414][startup][:0] LOG:  database system was not properly shut down; automatic recovery in progress 2026-10-03 23:56:13.899 CEST [4159414][startup][:0] LOG:  crash recovery starts in timeline 1 and has target timeline 2 2026-10-03 23:56:13.900 CEST [4159414][startup][:0] LOG:  redo starts at 0/3000028 2026-10-03 23:56:13.900 CEST [4159417][not initialized][:0] LOG: connection received: host=[local] 2026-10-03 23:56:13.900 CEST [4159417][client backend][:0] FATAL: the database system is in recovery mode I've reproduced this failure locally, running multiple tests concurrently inside a 4-core VM, in a loop: for i in {1..50}; do echo "Iteration $i"; parallel -j40 --linebuffer --tag PROVE_TESTS="t/041*" NO_TEMP_INSTALL=1 TEMP_CONFIG=~/extra.config make -s check -s -C src/test/recovery_{} PROVE_FLAGS="--timer" ::: `seq 25` || break; done; (with bushmaster's parameters put in ~/extra.config) This failed for me on iterations 14, 30, 10: ... Iteration 10 ... 10 10      #   Failed test 'psql connect success' 10      #   at t/041_checkpoint_at_promote.pl line 168. 10      #          got: '2' 10      #     expected: '0' 10 10      #   Failed test 'psql select 1' 10      #   at t/041_checkpoint_at_promote.pl line 169. 10      #          got: '' 10      #     expected: '1' 10      # Looks like you failed 2 tests of 6. 10      [03:51:18] t/041_checkpoint_at_promote.pl .. 10      Dubious, test returned 2 (wstat 512, 0x200) 10      Failed 2/6 subtests 10      [03:51:18] 10 10      Test Summary Report 10      ------------------- 10      t/041_checkpoint_at_promote.pl (Wstat: 512 (exited 2) Tests: 6 Failed: 2) 10        Failed tests:  5-6 10        Non-zero exit status: 2 It looks like the same race condition was fixed in 022_crash_temp_files.pl by e37ad5fa4 two years before 041_checkpoint_at_promote.pl appeared: [2]. [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bushmaster&dt=2026-10-03%2021%3A37%3A08 [2] https://postgr.es/m/1801850.1649047827@sss.pgh.pa.us Best regards, Alexander