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 1v1N0j-007o34-Kd for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Sep 2025 10:46:09 +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 1v1N0i-00CKZz-9v for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Sep 2025 10:46:08 +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 1v1N0i-00CKZq-0C for pgsql-hackers@lists.postgresql.org; Wed, 24 Sep 2025 10:46:08 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v1N0c-002ALI-0q for pgsql-hackers@lists.postgresql.org; Wed, 24 Sep 2025 10:46:07 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3f3a47b639aso2365905f8f.2 for ; Wed, 24 Sep 2025 03:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758710761; x=1759315561; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:from:to:cc:subject:date :message-id:reply-to; bh=TnpbSUlM8ZtrpFqWTFNtBNIf7aPAAw2/NaqjX9N6GV8=; b=mR+Q0PlGcVDHrrlm9JTVw+mH7kWPuGwBxv3BZM0XtVvAxM3WXOc14j2w5hwcQBBjWs 5vsoW4loCTT0qnvbDAcKQruDgPDH0pzvgJQnqcuQC3+j1UNjPOFEEpMT1SgQHPqqa5vB 1+KXuSEVNj4BKA2HosbNRKampmmRbsbL6dhQSaR4iqNYikHk2jezQA3PS2EB95vfgHpB E8ctpJlVdB3+S+QwSJNjuhlEt/+h5WS8XypsHub0dPzmF3CQPi5b1Cy/Hb0uACIA7fyc 1L6l4D8n5Rh2DKvtEJ1lZ8EpLz3D5PIilijADfm0HIFZyxMJpA3ZFjLHDp4MqfyRZGeP R99A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758710761; x=1759315561; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TnpbSUlM8ZtrpFqWTFNtBNIf7aPAAw2/NaqjX9N6GV8=; b=TYO0PBMIr85OzN/Z4UpuJSSFr3z2583UyYjtdwgyqWiGwEvziweZ9PdGmyJBkE67Q5 dDPZE72xu4tseM3vru739EznP9jxn0O5kZb7N4mgRJ4V36OfHrZO/MP1B9sr+9UBvPhn OcU9P+HAppW/cvIduY2Pr6GFHZz/+g+6VB1geWbHbNVxTt54W+IzfCeahTZSwqzRYGrW jA4yD4sDD8SS1PnoTDdYsp/qUwmGHsm58ZRNoKLUZldivWWbm42scLP8QjNDPESxJ4pe UfD1+N+G42k1R+Csyoyi9kXIikHGMXxlRAnFOOETZCd3L4DM75ySXB/zCcqKgX9e7UlB Pq+Q== X-Forwarded-Encrypted: i=1; AJvYcCWVgePlxnYt+rE3t0+ecEPUYD7npiDC3xHC67A29+mqD91RqTFKyGHxJbtnZ7KBv/qN4raqzHPw8Inny1M1@lists.postgresql.org X-Gm-Message-State: AOJu0Yzh4olGIR0m8x3eBQnrPCKf/iI0S0VltdZlWMHQT/wlLYZslHQ9 yodAIZJmez4TGZSWOE8/SHYXE7oS0dkMfBYpXUPq8EK1v5qN5VsBD/LI X-Gm-Gg: ASbGncv+T1YmEZ4i56k5z0P+kCE2/+CKmYKGYB5c3SagQYFjVhUEN+ES3GPA9wadXOX Rdcls11ulmLiSzv+epXYyIc8YA4hbcpO+WaEAltbT/RM9P/R535BZCOoX0wQzWnffSU4cTSlsk3 F8UPxs7N73yfm1JYkmDfMliyy/BLijgyLTgzFBXzbW/TETInAkXpuuudTcx8m0Hp8yW0Xe0ZoTE kPeJjnOuW9L2dkx9IHMHPDFmqjrNnZroqk1E/ayGxhgAB9OZ5BHbOVlsaw5l+atOPBNXXnqU1oB zCe7uqMlrZb0eNzj6alJKzelvrBxpBw3T73/WCU0Et95C6+pJOdICFRWbN5JS1Ofy4/voHxm/rx hBQq0PANIZpeNHFTBu02rsa9UGGWbbPdstITsR00H8j6P8vYxEbro8Qg= X-Google-Smtp-Source: AGHT+IFwUdYGGOfQKCKszZdufjeURzAYs23Roq3XpYqXvbCRNXqpMGFCYerx7FULisZdpOWXDS5dPA== X-Received: by 2002:a05:6000:268a:b0:3e8:b4cb:c3a0 with SMTP id ffacd0b85a97d-405c5bd82d5mr4007440f8f.8.1758710760889; Wed, 24 Sep 2025 03:46:00 -0700 (PDT) Received: from lightning.caipicrew.dd-dns.de ([2001:a61:a7f:9701:6ac6:edd8:569:5ec9]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3ee07412111sm27245293f8f.28.2025.09.24.03.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Sep 2025 03:46:00 -0700 (PDT) Message-ID: <68d3cbe8.5d0a0220.65f10.da5f@mx.google.com> X-Google-Original-Message-ID: <20250924104559.GB10642@caipicrew.dd-dns.de;lightning.caipicrew.dd-dns.de> Sender: Michael Banck Received: from mbanck by lightning.caipicrew.dd-dns.de with local (Exim 4.92) (envelope-from ) id 1v1N0Z-0002wL-Fh; Wed, 24 Sep 2025 12:45:59 +0200 Date: Wed, 24 Sep 2025 12:45:59 +0200 From: Michael Banck To: Michael Paquier Cc: Alexander Lakhin , Tom Lane , pgsql-hackers@lists.postgresql.org, Thomas Munro Subject: Re: GNU/Hurd portability patches 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> <283c3d69-ef32-4391-9ea3-68e47c9dea31@gmail.com> <68d3a0a0.050a0220.167290.bcf3@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68d3a0a0.050a0220.167290.bcf3@mx.google.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Sep 24, 2025 at 09:41:19AM +0200, Michael Banck wrote: > On Wed, Sep 24, 2025 at 08:31:27AM +0900, Michael Paquier wrote: > > So yes, this random factor would be annoying in the buildfarm. > > How much timer resolution do we require from the system? GNU Mach seems > to (at least try to) guarantee that the timer won't go backwards, but it > does not guarantee (currently) that two consecutive clock_gettime() > calls will return something different in all cases. This is the pg_test_timing output on my hurd-i386 VM with pg_test_timing from HEAD: Average loop time including overhead: 13866,64 ns Histogram of timing durations: <= ns % of total running % count 0 0,0510 0,0510 122 1 0,0000 0,0510 0 3 0,0000 0,0510 0 7 0,0000 0,0510 0 15 0,0000 0,0510 0 31 0,0000 0,0510 0 63 0,0000 0,0510 0 127 0,0000 0,0510 0 255 0,0000 0,0510 0 511 0,0000 0,0510 0 1023 0,0004 0,0514 1 2047 0,0000 0,0514 0 4095 98,9320 98,9834 236681 8191 0,8845 99,8679 2116 16383 0,0393 99,9072 94 32767 0,0343 99,9415 82 [...] Observed timing durations up to 99,9900%: ns % of total running % count 0 0,0510 0,0510 122 729 0,0004 0,0514 1 3519 0,0004 0,0518 1 3630 0,0130 0,0648 31 3640 0,1651 0,2299 395 3650 0,7449 0,9748 1782 3660 2,3395 3,3143 5597 Clearly those aren't very precise (running Debian 13 GNU/Linux on the same host in the same qemu/kvm fashion, I get an average loop time including overhead of around 30ns), but I assumed that the 122 0ns entries would be the problem; however Hannu reported back in 2024 that he saw something similar on his Macbook Air M1: https://www.postgresql.org/message-id/CAMT0RQSbzeJN+nPo_QXib-P62rgez=dJxoaTURcN1FYPoLpQPg@mail.gmail.com |Per loop time including overhead: 21.54 ns |Histogram of timing durations: | <= ns % of total running % count | 0 49.1655 49.1655 68481688 | 1 0.0000 49.1655 0 | 3 0.0000 49.1655 0 | 7 0.0000 49.1655 0 | 15 0.0000 49.1655 0 | 31 0.0000 49.1655 0 | 63 50.6890 99.8545 70603742 | 127 0.1432 99.9976 199411 | 255 0.0015 99.9991 2065 I wonder what is going on here, was that a fluke or is that not related to the stats isolation test failure after all? Anybody else tried the updated pg_test_timing on Apple hardware and could possibly run the tt.c test case from Alexander? btw, the stats test failed in a similar way on hamerkop (Windows Server 2016) once, 35 days ago: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hamerkop&dt=2025-08-19%2013%3A56%3A17 Michael