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 1v0nAm-000e85-Aq for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Sep 2025 20:30:08 +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 1v0nAk-001zUL-VX for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Sep 2025 20:30:06 +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 1v0nAk-001zUD-IZ for pgsql-hackers@lists.postgresql.org; Mon, 22 Sep 2025 20:30:06 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v0nAg-002Ffb-12 for pgsql-hackers@lists.postgresql.org; Mon, 22 Sep 2025 20:30:05 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-3613574aecdso36718051fa.3 for ; Mon, 22 Sep 2025 13:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758573002; x=1759177802; darn=lists.postgresql.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=4TsaIGkB0F04cH/oNIT5Zyqb2s833x7duZ6m8w0I4dM=; b=WnYqX57uweat+azWBvf4mRIE6pTXcewXjulBrd7SsXRA+dJamgp2vRVfUdLJaSzdJ7 AZtjqbz6PA8enuddrxUfINQWGakR8owoZid+9WLu4jbpUmFyao5eVkQk7MT2i8wVhMDR orinhHBJo1dnJrg+gtt2dznxOGZqsNhd8rPPOoGaDtqCKgiahCYZ9Qv+jpxjmKvIfW9g EbwfMFJsn3jv9vn5EVxP4wCaB6AD+az1PftJ4drqYZltKOT304IqxdNhW4f9FNSfD8Xl 41oIs4IRwbTW8KyBDj1mDZJqwPXitJJ7QdbT4v9v2Z9OaM/Esg1UGDZUe/0W/775AK0Z QhKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758573002; x=1759177802; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4TsaIGkB0F04cH/oNIT5Zyqb2s833x7duZ6m8w0I4dM=; b=fAPNgROppqd3X7N8WzBpfbOwwM62iYcY2SlqgjfrR8iWn25id+FrqyE2gJTLssKrPi mSEWLSIVRKjb0/XGWOzfkwlshXJ8z4JMgq9qTIZbwhW+YCfiIrs74wyz2bIVToa0qu9P /BIwtepRHYD8JCQQpIF01QQaiVlk1kL2hr7Zw6Q2IZjPAoC3ZsVMA98WipfXjaPBO7Q2 i6h2Xb5qJwZTixhp4l5/G+1/OaK63S6epUfFvqrGcq+hMmNqXpN1uT9lZn7wYQUWHiI3 PDmzixcZtfALtCpoMeVzabCn/rKNto0Lub0ZnxyjEAFZVPfJQqGCSQhx6gktQqFVeMce YFmA== X-Forwarded-Encrypted: i=1; AJvYcCW0dKEHjAucK0HUnqaP2D1COdVTesynTnG0Ob5EJ5zrUQWta4xmEAx1r8I2wZ9Jk5J0yEcZwUGPm66I1UBt@lists.postgresql.org X-Gm-Message-State: AOJu0Yz7sa9tI131X09/5BdDfa7vEzr4K1sQm5MfeXFkoV6lKdagzXIs BF3ZQm7Kn1BnTAblEGz2Li8Y/MQsjqOGdYux1iIsgIUFGZHCekzcn6Wv X-Gm-Gg: ASbGnct+N3SgbHMldNgKk455N3UpvC2sA2JH1NyBoIqUBH5WvonDxzOnogeAmIpAfO+ AIi5xQMRwU55WY/UhGr01ZxW4Ss81bXAwIMNx9+1J0w/i8xeulNtuFxHGgSDpdLjwvvMPzlRBYg 9a4Xt5rN13oL0o+VT/vz4MS3tC4eiPoyzc3gyQa+qiZwd4FzZaGsYpmtFWrocTe/PjeB4AQHoe4 uBbuD0ifXEHKT0AMXgC40MBecPWz6rRIBZm+zgVKGnBpX/MN6NS9D5IOVj+qhGui6Jbe+f1T0vu SiPg8AZeInhc/z3bsp5wDfyN7hYDdTFRsQPkZxkU0nllSqB7j7Vov0PUwhXAW9bDQkSB4pneG7b m2VqoyWmrBcRWUmsfQP6AGxh2rw== X-Google-Smtp-Source: AGHT+IHBe8yT4kotNgW0Fl5+gMgq4i1/+54MWEf92q+7fzx0LtaRErzuhrVlvZG7FNXvB6BRAcKBIA== X-Received: by 2002:a2e:a594:0:b0:36a:d9f1:ab13 with SMTP id 38308e7fff4ca-36d14cc4701mr198311fa.7.1758573002046; Mon, 22 Sep 2025 13:30:02 -0700 (PDT) Received: from [192.168.0.50] ([89.149.120.198]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-361a904bd62sm31724321fa.36.2025.09.22.13.30.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Sep 2025 13:30:01 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------BN4ENl4hSifYkoa9ohKP6kxx" Message-ID: <283c3d69-ef32-4391-9ea3-68e47c9dea31@gmail.com> Date: Mon, 22 Sep 2025 23:30:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: GNU/Hurd portability patches To: Michael Banck Cc: Tom Lane , Michael Paquier , pgsql-hackers@lists.postgresql.org, Thomas Munro References: <6862e8d1.050a0220.194b8d.76fa@mx.google.com> <3245994.1751388110@sss.pgh.pa.us> <68643ea2.050a0220.128f53.3f77@mx.google.com> <2874644f-6431-41f4-abe2-99e5ab052606@gmail.com> <68d0f931.050a0220.3185e0.19ae@mx.google.com> Content-Language: en-US From: Alexander Lakhin In-Reply-To: <68d0f931.050a0220.3185e0.19ae@mx.google.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------BN4ENl4hSifYkoa9ohKP6kxx Content-Type: multipart/alternative; boundary="------------8mk6nGah06Ka7BP84dIWAtgp" --------------8mk6nGah06Ka7BP84dIWAtgp Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello Michael, Thank you for paying attention to this! Maybe I was wrong and we can at least categorize these failures -- I hope their number is finite, but my point was that it's hardly possible to use the information, that fruitcrow gives us, to improve Postgres. 22.09.2025 10:22, Michael Banck wrote: > On Mon, Sep 22, 2025 at 07:02:25AM +0900, Michael Paquier wrote: > >> However, failures like the one you are reporting here bring noise in >> the buildfarm, meaning that we would perhaps tend to ignore reports >> that are in fact legit because we don't really know what would be >> Hurd-related or Postgres-related. > I will keep an eye on it. > > There have been two (infrequent) failures in the isoloation tests as > well, which I haven't had time to investigate further: > > > In PG17: > > |not ok 98 - stats 2100 ms > > |diff -U3 buildroot/REL_17_STABLE/pgsql.build/src/test/isolation/expected/stats_1.out buildroot/REL_17_STABLE/pgsql.build/src/test/isolation/output_iso/results/stats.out > |--- buildroot/REL_17_STABLE/pgsql.build/src/test/isolation/expected/stats_1.out 2025-09-15 22:06:24.000000000 +0100 > |+++ buildroot/REL_17_STABLE/pgsql.build/src/test/isolation/output_iso/results/stats.out 2025-09-15 22:23:05.000000000 +0100 > |@@ -1445,7 +1445,7 @@ > | > | name |pg_stat_get_function_calls|total_above_zero|self_above_zero > | --------------+--------------------------+----------------+--------------- > |-test_stat_func| 1|t |t > |+test_stat_func| 1|f |f > | (1 row) > > This one happened twice as well, and so far only on REL_17_STABLE: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fruitcrow&dt=2025-09-15%2021%3A06%3A17 > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fruitcrow&dt=2025-09-13%2008%3A04%3A05 > > This might be due to the HPET timer not always being monotonic - there > has been an independent report via the Debian autobuilder and a GNU Mach > fix was committed last night, I'll check whether this can be > reproduced/confirmed-fixed with this change: > > https://lists.gnu.org/archive/html/bug-hurd/2025-09/msg00020.html > https://salsa.debian.org/hurd-team/gnumach/-/commit/06079a8d212817ee0365f318bd90b67bf56bfb06 I reproduced the issue locally and found that         /* total elapsed time in this function call */         INSTR_TIME_SET_CURRENT(total);         INSTR_TIME_SUBTRACT(total, fcu->start); sometimes gives total.ticks = 0. I tried the test program from [2] and got on my VM: went backwards 0 out of 10000000 times (three times) But I've created my own test program (see attached), which shows: for i in {1..1000}; do printf "ITERATION $i "; ./tt 100 || break; done  ITERATION 1 t1: 55873639081080, t2: 55873639084090, t2 - t1: 3010 (r: 4950)  ITERATION 2 t1: 55873641019440, t2: 55873641025700, t2 - t1: 6260 (r: 4950)  ITERATION 3 t1: 55873642794200, t2: 55873642797130, t2 - t1: 2930 (r: 4950) ...  ITERATION 23 t1: 55873675001590, t2: 55873675001590, t2 - t1: 0 (r: 4950) I don't know how to test the patch committed, but if you can, that would be nice. Best regards, Alexander --------------8mk6nGah06Ka7BP84dIWAtgp Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hello Michael,

Thank you for paying attention to this!

Maybe I was wrong and we can at least categorize these failures -- I hope
their number is finite, but my point was that it's hardly possible to use
the information, that fruitcrow gives us, to improve Postgres.

22.09.2025 10:22, Michael Banck wrote:
On Mon, Sep 22, 2025 at 07:02:25AM +0900, Michael Paquier wrote:

However, failures like the one you are reporting here bring noise in
the buildfarm, meaning that we would perhaps tend to ignore reports
that are in fact legit because we don't really know what would be
Hurd-related or Postgres-related. 
I will keep an eye on it.

There have been two (infrequent) failures in the isoloation tests as
well, which I haven't had time to investigate further:


In PG17:

|not ok 98    - stats                                    2100 ms

|diff -U3 buildroot/REL_17_STABLE/pgsql.build/src/test/isolation/expected/stats_1.out buildroot/REL_17_STABLE/pgsql.build/src/test/isolation/output_iso/results/stats.out
|--- buildroot/REL_17_STABLE/pgsql.build/src/test/isolation/expected/stats_1.out	2025-09-15 22:06:24.000000000 +0100
|+++ buildroot/REL_17_STABLE/pgsql.build/src/test/isolation/output_iso/results/stats.out	2025-09-15 22:23:05.000000000 +0100
|@@ -1445,7 +1445,7 @@
| 
| name          |pg_stat_get_function_calls|total_above_zero|self_above_zero
| --------------+--------------------------+----------------+---------------
|-test_stat_func|                         1|t               |t              
|+test_stat_func|                         1|f               |f              
| (1 row)

This one happened twice as well, and so far only on REL_17_STABLE:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fruitcrow&dt=2025-09-15%2021%3A06%3A17
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fruitcrow&dt=2025-09-13%2008%3A04%3A05

This might be due to the HPET timer not always being monotonic - there
has been an independent report via the Debian autobuilder and a GNU Mach
fix was committed last night, I'll check whether this can be
reproduced/confirmed-fixed with this change:

https://lists.gnu.org/archive/html/bug-hurd/2025-09/msg00020.html
https://salsa.debian.org/hurd-team/gnumach/-/commit/06079a8d212817ee0365f318bd90b67bf56bfb06

I reproduced the issue locally and found that
        /* total elapsed time in this function call */
        INSTR_TIME_SET_CURRENT(total);
        INSTR_TIME_SUBTRACT(total, fcu->start);
sometimes gives total.ticks = 0.

I tried the test program from [2] and got on my VM:
went backwards 0 out of 10000000 times
(three times)

But I've created my own test program (see attached), which shows:
for i in {1..1000}; do printf "ITERATION $i "; ./tt 100 || break; done
 ITERATION 1 t1: 55873639081080, t2: 55873639084090, t2 - t1: 3010 (r: 4950)
 ITERATION 2 t1: 55873641019440, t2: 55873641025700, t2 - t1: 6260 (r: 4950)
 ITERATION 3 t1: 55873642794200, t2: 55873642797130, t2 - t1: 2930 (r: 4950)
...
 ITERATION 23 t1: 55873675001590, t2: 55873675001590, t2 - t1: 0 (r: 4950)

I don't know how to test the patch committed, but if you can, that would
be nice.

Best regards,
Alexander
--------------8mk6nGah06Ka7BP84dIWAtgp-- --------------BN4ENl4hSifYkoa9ohKP6kxx Content-Type: text/x-csrc; charset=UTF-8; name="tt.c" Content-Disposition: attachment; filename="tt.c" Content-Transfer-Encoding: base64 I2luY2x1ZGUgPHRpbWUuaD4KI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIu aD4KCiNkZWZpbmUgUEdfSU5TVFJfQ0xPQ0sgIENMT0NLX01PTk9UT05JQwojZGVmaW5lIE5T X1BFUl9TICAgMTAwMDAwMDAwMEwKCnN0YXRpYyBpbmxpbmUgbG9uZyBpbnQKcGdfY2xvY2tf Z2V0dGltZV9ucyh2b2lkKQp7CiAgICBsb25nIGludCAgICAgIG5vdzsKICAgIHN0cnVjdCB0 aW1lc3BlYyB0bXA7CgogICAgY2xvY2tfZ2V0dGltZShQR19JTlNUUl9DTE9DSywgJnRtcCk7 CiAgICBub3cgPSB0bXAudHZfc2VjICogTlNfUEVSX1MgKyB0bXAudHZfbnNlYzsKICAgIHJl dHVybiBub3c7Cn0KCmludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pCnsKICAgICBs b25nIGludCB0MSwgdDI7CiAgICAgbG9uZyBpbnQgciA9IDA7CiAgICAgaW50IG4gPSAoYXJn YyA+IDEpID8gYXRvbChhcmd2WzFdKSA6IDA7CgogICAgIHQxID0gcGdfY2xvY2tfZ2V0dGlt ZV9ucygpOwoKICAgICBmb3IgKGxvbmcgaW50IGkgPSAwOyBpIDwgbjsgaSsrKSByICs9IGk7 CgogICAgIHQyID0gcGdfY2xvY2tfZ2V0dGltZV9ucygpOwoKICAgICBwcmludGYoInQxOiAl bGQsIHQyOiAlbGQsIHQyIC0gdDE6ICVsZCAocjogJWxkKVxuICIsIHQxLCB0MiwgdDIgLSB0 MSwgcik7CgogICAgIGlmICh0MiAtIHQxID09IDApIHJldHVybiAxOwogICAgIHJldHVybiAw Owp9Cg== --------------BN4ENl4hSifYkoa9ohKP6kxx--