Re: Weird test mixup
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-05-06T21:23:24Z
Lists: pgsql-hackers
Attachments
- inplace030-inj-exit-race-v1.patch (text/plain) patch v1
On Mon, May 06, 2024 at 10:03:37AM +0900, Michael Paquier wrote: > On Thu, May 02, 2024 at 12:35:55PM -0700, Noah Misch wrote: > > I should have given a simpler example: > > > > s1: local-attach to POINT > > s2: enter InjectionPointRun(POINT), yield CPU just before injection_callback() > > s1: exit > > s2: wake up and run POINT as though it had been non-local Here's how I've patched it locally. It does avoid changing the backend-side, which has some attraction. Shall I just push this? > Hmm. Even if you were to emulate that in a controlled manner, you > would need a second injection point that does a wait in s2, which is > something that would happen before injection_callback() and before > scanning the local entry. This relies on the fact that we're holding > CPU in s2 between the backend shmem hash table lookup and the callback > being called. Right. We would need "second-level injection points" to write a test for that race in the injection point system.
Commits
-
injection_points: Store runtime conditions in private area
- 267d41dc4f41 17.0 landed
-
Introduce private data area for injection points
- 33181b48fd0e 17.0 landed
-
injection_points: Fix incorrect spinlock acquisition
- 597f66942d0b 17.0 landed
-
Make GIN tests using injection points concurrent-safe
- 5105c9079681 17.0 landed
-
injection_points: Fix race condition with local injection point tests
- f4083c497510 17.0 landed
-
injection_points: Introduce runtime conditions
- f587338dec87 17.0 landed
-
Make GIN test using injection points repeatable
- 997db123c054 17.0 landed
-
Fix backstop in gin test if injection point is not reached
- d802ff06d021 17.0 landed
-
Try to unbreak injection-fault tests in the buildfarm
- 85f65d7a26fc 17.0 landed
-
Disable tests using injection points in installcheck
- e2e3b8ae9ed7 17.0 landed