Re: IO in wrong state on riscv64 - Mailing list pgsql-hackers

From Alexander Lakhin
Subject Re: IO in wrong state on riscv64
Date
Msg-id f2378a85-c968-4ccf-acf3-bca6f5c50c87@gmail.com
Whole thread Raw
In response to Re: IO in wrong state on riscv64  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: IO in wrong state on riscv64
List pgsql-hackers
Hello Thomas,

13.10.2025 08:40, Thomas Munro wrote:
> Thanks.  All seems to have something plausible in the right places,
> but I know nothing about RISC-V... hmm, what happens if you replace
> pg_{read,write}_barrier() with pg_memory_barrier(), in those three
> functions?  And if it happens to help, perhaps you could try to figure
> out which one(s) help?  Not that it should be necessary but as a clue
> or to rule out this line of enquiry... I guess that should generate
> FENCE RW,RW, meaning wait for all preceding reads and writes to
> complete and don't let any following reads or writes begin, but that's
> just from googling...

The replacements doesn't work for me, unfortunately: I have 3 out of 30
027_stream_regress test runs failed:
2025-10-13 21:27:26.161 UTC [4181290:5] pg_regress/brin ERROR:  IO in wrong state: 0
2025-10-13 21:27:26.161 UTC [4181290:6] pg_regress/brin STATEMENT: CREATE TABLE brintest (byteacol bytea,

Disassembly of those three functions is attached.

I'll try to find some simple C programs to test memory barriers outside of
postgres...

Best regards,
Alexander
Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Next
From: Philip Alger
Date:
Subject: Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement