model-writtenrun 1928 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Apr - Sep 2025 ยท 20 entries
- Tom Lane opened the thread after sifaka hit an intermittent unknown-AIO-result assertion in WaitReadBuffers(), with no reliable reproducer or usable saved core #1.
- When another buildfarm failure appeared, Thomas Munro suggested weak ARM memory ordering, while Alexander Lakhin reproduced a different assertion involving an unexpectedly nonzero operation field on macOS #4 #6 #7.
- Reproduction depended strongly on concurrency and machine conditions, and unreliable macOS core inspection pushed the investigation toward repeated recovery tests and logging; Alexander shared his parallel-test recipe and initial instrumentation #10 #16 #25.
- Alexander's successive diagnostic attachments traced handle reclamation and reuse, then added generation numbers, showing an operation field apparently reverting after being cleared #26 #27.
- Thomas suggested distinctive operation values to distinguish stale AIO data from arbitrary corruption, and Alexander's experiment showed the unexpected value followed the changed READV constant #29 #30.
- Matthias van de Meent identified compiler-generated accesses spanning adjacent enum bitfields, Tom proposed uint8 fields, and Andres agreed the generated code justified that change while questioning whether it explained the failures #31 #32 #37 #38.
- Alexander found that separating the bitfields prevented failures in his trial, but Andres still reproduced the original unknown-result assertion after removing bitfields, revealing that the thread was investigating more than one defect #39 #43.
- Andres isolated the original failure to reclaiming handles while waiting for a free handle: the issuer could observe completion before the worker's distilled result because this path lacked a read barrier #52 #54 #56.
- By setting io_max_concurrency and io_combine_limit to one, Andres produced a concurrent-scan test that failed within seconds and stopped failing with two added read barriers; he proposed a future I/O stress test but left it outside the attached fix #57 #58.
- Konstantin reviewed and successfully stress-tested the barrier patch, then encountered the separate operation-field assertion and experimented with an extra write barrier plus uint8 fields #59 #60 #61 #62.
- Andres rejected the extra write barrier because ConditionVariableBroadcast() already supplied ordering, distinguished the remaining assertion from the stale-result bug, and committed #58 unchanged as e9a3615a52 #63 #64.
- After that commit, Tom confirmed the original failure disappeared in his comparison tests, while Konstantin continued to reproduce the operation-field failure and Andres explained why interrupt-driven AIO reentry required care #65 #66 #76.
- Weeks of unsuccessful reproduction across additional machines left the second problem unresolved, so Andres reported the original bug fixed and Nathan Bossart marked the release open item fixed with a caveat about the remaining unreproducible issue #83 #84.
- Alexander reopened the investigation with an expanded diagnostic patch and a repeatable workload on an M4 Pro using Homebrew clang 17, undermining the earlier suspicion that the failure required older hardware or operating systems #85.
- Thomas analyzed how separate stores generated for one bitfield assignment could expose completion before an old operation value was written back, and recommended replacing the fields with uint8 #87 #89.
- Nico Williams proposed wrapping individual bitfields in structures to retain their types, but Thomas found this added padding and rejected other layout tricks as relying too heavily on compiler behavior #90 #91 #92.
- Andres posted the uint8 replacement with explicit enum casts, initially describing it chiefly as a code-generation improvement; Thomas and Konstantin endorsed it and corrected his mistaken recollection that the remaining failure had occurred without bitfields #94 #97 #99.
- Andres corrected the commit message and landed the code from #94 as 5865150b6d, also backpatching it to PostgreSQL 18, while retaining uncertainty about the exact failure mechanism #101 #102.
- After the second landing, Thomas elaborated the delayed-store explanation and Konstantin found it convincing, but this remained explanatory discussion rather than another attached fix #103 #104.
- The thread ended with both production patches committed and no further patch awaiting review; discussion concerned avoiding explicit casts versus keeping handles compact, with Andres defending uint8 fields because ordinary enums would add about eight percent to a potentially large allocation #105 #106 #107.