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 1xNVAO-00000002ayJ-38hc for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Nov 2026 13:00:09 +0000 Received: from localhost ([127.0.0.1]:39858 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xNVAN-0000000GlLC-1GvB for pgsql-hackers@arkaria.postgresql.org; Sun, 01 Nov 2026 13:00:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:39982) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xNVAM-0000000GlL3-4AGK for pgsql-hackers@lists.postgresql.org; Sun, 01 Nov 2026 13:00:06 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xNVAK-000000020FZ-3TPV for pgsql-hackers@postgresql.org; Sun, 01 Nov 2026 13:00:06 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4a208d93758so22848825e9.3 for ; Sun, 01 Nov 2026 05:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793538002; x=1794142802; darn=postgresql.org; h=content-transfer-encoding:content-type:to:subject:content-language :from:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to:content-type; bh=v9pIZwCVqIQDPw/geVBfltBdnKvoD1gh2atP9Yd4JPY=; b=wHMKvZE8DKRB7JnWY8CmOX/YF/QBFx2bAQM3jKYipmeyEcLBCFrSz43I6271kG0Te6 zed8DhLYyNoHcSUZiiXM6ZS65gV9vg7VhcjApo+5H2xhksTlGYZsJJSh/vLtrG/dskXB l61+OTRQGKT/4MI0f1Ft80K2sQuYZP25FNOZBvdqjvCU1YAenskyFfFjPScXpdX4beZf +33goKu7XlDlyNBF0pwYRuIpf5AbMRqy+GftnRSLY7O6QajdUoX5tbEITgBjvzkZSd7Z PtcwcUtPaGKcHWbudxLHn2qb8rFfluXoM2zOGOpHWagybBzaHN6Lhr+kZFPkQ+enJTlY VLPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793538002; x=1794142802; h=content-transfer-encoding:content-type:to:subject:content-language :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=v9pIZwCVqIQDPw/geVBfltBdnKvoD1gh2atP9Yd4JPY=; b=Ms8HfttO4V33Uw4yPohLBheKIgIfbnipswekhKcMCJfwExl7MM7M9yeSZzlu9joV7h PboA1ZivaIyM10pEjaRoeSyUf69N9nNfTEoeGBh6KGqVUID/ngmCjSkHww5wkwy/xOfu CF3j3dMDj6EBaOwu7/JZgKYLoSVvT9S1DbCn3idsBNslDHIXlTy6DRBgtvs8qAAb7Ze7 0fIp45kv62XdJwDqfd6aU0E09AAWkKA5i31cey2u3KzfO617XLGU1cih9gCHDls2YD7n 823p6UyB6trcpxtkFB9kvIapIwGRMZKUkfoyVIm8vwADPvuiOkBPX40kq3nRzxO71uLM fqVw== X-Gm-Message-State: AFq9FYJKOKU0PJtoW0kPcf+Kppq414UPAkEUuzwpqlnyGhWDoMS0D5j/ Xa3xGhqjFliI26g1i7xTx05bPKVUOqq7QIeaVrS+6m+BVPVI3lXprip/qD/+vA== X-Gm-Gg: AYBFou2WtG18/TDiMubzhJBhJBCknD4lWMggTV2Q207hcjoGxFsIbN41EsyxKrmwZ5D 6M3tLI6AWJPRKmjLoVnqqxapibNf9BLopRqkQmK58FGHJImSxUMpj2QJ9nNuU8ZMcHpVoTwa3bI KqH1W/nMlBfncASahTI9fDkwGjBKN31JRzbmLAXM8kYoTmbyjEFyDWSvPmXM6ume+X3dT2Cv1Br kvWvXQwzZf7Jp4vvcUeXkCg2WFG+hNLeCtsE6EfZtQ2UYn6I0BgiiP/RI7u7hk9XmYN3QVo8jYI cdSo6v8hkZz6I55U8ucIpYYeIesvMl1G4a/95QeeBlbIDCx8h7pQaM29VkB+UFMQIR30M3R/syr kko7ymxpfnzeHWjT4rPm497mewSp7pxMIIaQVEctwvokj4cQTykJRwaDpmZTzhEgtPySMff6wyM kjLVv4dBJuZt4LR15r7GJC6gt0khoPTB8usQuklf5mgrMp79YZEiDdjIxptRB7egpIcPPf8KHlE ex/lFf+a6VXJmRxtxG6BXNFr7FKfoQya7RtiQ2E+7v2SHedovYVI9wJIQMFs8bxEctpm0EIMll9 IeinIH1h4mkrms5JIF887Sq3AQs8uw== X-Received: by 2002:a05:600c:4f86:b0:4a7:669c:c988 with SMTP id 5b1f17b1804b1-4ac18b7df2cmr171922455e9.23.1793538001957; Sun, 01 Nov 2026 05:00:01 -0800 (PST) Received: from [192.168.0.50] ([89.149.93.246]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4abe77053fesm92469925e9.0.2026.11.01.05.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Nov 2026 05:00:01 -0800 (PST) Message-ID: Date: Sun, 1 Nov 2026 15:00:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Alexander Lakhin Content-Language: en-US Subject: 007_pre_auth.pl fails if injection_points_wakeup hits unintended process To: pgsql-hackers , Michael Paquier 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, A recent failure of auth, pre_auth test produced by culicidae: [19:20:02.147](0.003s) ok 1 - authenticating connections are recorded in pg_stat_activity [19:20:02.147](0.000s) # issuing query 4 via background psql: SELECT injection_points_wakeup('init-pre-auth'); [19:20:02.151](0.004s) # results query 4: # { #   'stderr' => 'background_psql: QUERY_SEPARATOR 4: # ', #   'stdout' => ' # background_psql: QUERY_SEPARATOR 4: # ' # } [19:23:02.313](180.162s) # die: IPC::Run: timeout on timer #2 at /usr/share/perl5/IPC/Run.pm line 3361. [19:23:02.319](0.006s) 1..1 IPC::Run: timeout on timer #2 at /usr/share/perl5/IPC/Run.pm line 3361. indicates that the test is not bulletproof. I reproduced this locally when running multiple tests in parallel, and with the following diagnostic added: @@ -753,3 +753,5 @@ InitPostgres(const char *in_dbname, Oid dboid,                 pgstat_bestart_initial(); +elog(LOG, "!!!before injection_point init-pre-auth");                 INJECTION_POINT("init-pre-auth", NULL); +elog(LOG, "!!!after injection_point init-pre-auth");         } observed: 23      t/007_pre_auth.pl (Wstat: 7424 (exited 29) Tests: 1 Failed: 0) 23        Non-zero exit status: 29 23      Files=1, Tests=1, 236 wallclock secs ( 0.07 usr  0.02 sys + 0.55 cusr  2.25 csys =  2.89 CPU) 23      Result: FAIL 23      # die: IPC::Run: timeout on timer #2 at /usr/share/perl5/IPC/Run.pm line 3361. 23      # Looks like your test exited with 29 just after 1. 23      make: *** [Makefile:21: check] Error 1 2026-11-01 11:20:41.510 UTC [478942][client backend][2/0:0] LOG: !!!before injection_point init-pre-auth 2026-11-01 11:20:41.510 UTC [478942][client backend][2/0:0] LOG: !!!after injection_point init-pre-auth 2026-11-01 11:20:44.597 UTC [478942][client backend][2/2:0] LOG: statement: SELECT injection_points_attach('init-pre-auth', 'wait') 2026-11-01 11:20:45.539 UTC [479057][autovacuum worker][101/0:0] LOG:  !!!before injection_point init-pre-auth 2026-11-01 11:20:47.346 UTC [479096][client backend][3/0:0] LOG: !!!before injection_point init-pre-auth 2026-11-01 11:20:50.028 UTC [478942][client backend][2/11:0] LOG: statement: SELECT injection_points_wakeup('init-pre-auth'); 2026-11-01 11:20:50.029 UTC [479057][autovacuum worker][101/0:0] LOG:  !!!after injection_point init-pre-auth 2026-11-01 11:21:13.777 UTC [479226][autovacuum worker][102/0:0] LOG:  !!!before injection_point init-pre-auth or: 2026-11-01 07:19:21.187 UTC [426308][autovacuum launcher][100/0:0] LOG:  !!!before injection_point init-pre-auth 2026-11-01 07:19:21.187 UTC [426308][autovacuum launcher][100/0:0] LOG:  !!!after injection_point init-pre-auth 2026-11-01 07:19:21.244 UTC [426365][client backend][2/2:0] LOG: statement: SELECT injection_points_attach('init-pre-auth', 'wait') 2026-11-01 07:19:21.612 UTC [426309][logical replication launcher][118/0:0] LOG:  !!!before injection_point init-pre-auth 2026-11-01 07:19:23.750 UTC [426479][client backend][3/0:0] LOG: !!!before injection_point init-pre-auth 2026-11-01 07:19:25.194 UTC [426365][client backend][2/5:0] LOG: statement: SELECT injection_points_wakeup('init-pre-auth'); 2026-11-01 07:19:25.232 UTC [426309][logical replication launcher][118/0:0] LOG:  !!!after injection_point init-pre-auth 2026-11-01 07:19:52.568 UTC [427022][autovacuum worker][101/0:0] LOG:  !!!before injection_point init-pre-auth That is, the wakeup can hit autovacuum worker or logical replication launcher, not the intended client backend. This test failure can be easily reproduced with: @@ -753,2 +753,3 @@ InitPostgres(const char *in_dbname, Oid dboid,          pgstat_bestart_initial(); +if (AmRegularBackendProcess()) pg_usleep(1000000);          INJECTION_POINT("init-pre-auth", NULL); and echo "autovacuum_naptime = 1s" >/tmp/temp.config TEMP_CONFIG=/tmp/temp.config PROVE_TESTS="t/007*" make -s check -C src/test/authentication Reproduced starting from e2080261c. [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=culicidae&dt=2026-10-30%2018%3A10%3A12 Best regards, Alexander