Re: stats.sql might fail due to shared buffers also used by parallel tests

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Subject: Re: stats.sql might fail due to shared buffers also used by parallel tests
Date: 2025-07-23 04:00:00
Message-ID: d32b203d-ca4f-41d3-a89b-57555cf57ca4@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Kuroda-san,

20.07.2025 11:00, Alexander Lakhin wrote:
>
> Yeah, I made a simple test for GetSystemTimePreciseAsFileTime() and
> confirmed that in my VM it provides sub-microsecond precision. Regarding
> NTP, I think the second failure of this ilk [1] makes this cause close to
> impossible. (Can't wait for the third one to gather more information.)

And here it is [1]:
diff --strip-trailing-cr -U3 c:/build-farm-local/buildroot/HEAD/pgsql/src/test/isolation/expected/stats.out
c:/build-farm-local/buildroot/HEAD/pgsql.build/testrun/isolation/isolation/results/stats.out
--- c:/build-farm-local/buildroot/HEAD/pgsql/src/test/isolation/expected/stats.out 2025-07-22 20:08:30 +0900
+++ c:/build-farm-local/buildroot/HEAD/pgsql.build/testrun/isolation/isolation/results/stats.out 2025-07-22 20:30:47 +0900
@@ -3729,7 +3729,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)

Not related to subscriptions this time, but still related to pg_stat and
time measurement.

There was the same looking failure on caiman, which is running on
continuously updated Fedora: [2].

I could not reproduce that one either, but suspected the OS kernel:
It had 6.14.0-0.rc3.20250219git6537cfb395f3.31.fc43.x86_64 at the moment
of the failure and updated to 6.14.0-0.rc4.36.fc43.x86_64 on 2025-02-27.
There was no failures of this kind since then.

So I think we could observe such anomalies if, say, the OS kernel can't
read system clock in time (stalls for a millisecond when accessing it)...

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hamerkop&dt=2025-07-22%2011%3A02%3A15
[2] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=caiman&dt=2025-02-23%2006%3A54%3A54

Best regards,
Alexander

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-07-23 04:07:55 Re: Conflict detection for update_deleted in logical replication
Previous Message Japin Li 2025-07-23 03:58:31 Re: [WIP]Vertical Clustered Index (columnar store extension) - take2