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

From Andres Freund
Subject Re: IO in wrong state on riscv64
Date
Msg-id w3qc4gzqywinffeglpwyxbwocpsjvh3yqqy5d42zsqhciy3yr5@tb63f2ipdzrl
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
Hi,

On 2025-10-20 13:05:53 +1100, Thomas Munro wrote:
> Updating the list with some progress:  Alexander narrowed it down to
> pgaio_io_wait() being inlined into pgaio_io_was_recycled().  It seems
> to have some instructions in the wrong order, and that can be
> reproduced standalone, so I've asked about it here:
> 
> https://github.com/llvm/llvm-project/issues/164194
> 
> I'm not seeing how that could be our fault, but let's see...

This is some awesome work Alexander and Thomas. Thanks for doing all this
investigation.

Have you figured out if the LLVM bug is specific to riscv or is more general?
Afaict most of the MachineSink stuff mentioned in the llvm bug is generic, not
arch specific. But I'd be surprised if such a problem in a more widely used
arch hadn't been hit long ago...

It's also somewhat surprising that this hasn't caused issues more widely in PG
on riscv...

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: [PATCH] pg_get_domain_ddl: DDL reconstruction function for CREATE DOMAIN statement
Next
From: shveta malik
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart