ERROR: invalid spinlock number: 0
| От | Fujii Masao |
|---|---|
| Тема | ERROR: invalid spinlock number: 0 |
| Дата | |
| Msg-id | 7ef8708c-5b6b-edd3-2cf2-7783f1c7c175@oss.nttdata.com обсуждение |
| Ответы |
Re: ERROR: invalid spinlock number: 0
|
| Список | pgsql-hackers |
Hi,
Commit 3b733fcd04 caused the buildfarm member "rorqual" to report
the following error and fail the regression test. The cause of this issue
is a bug in that commit.
ERROR: invalid spinlock number: 0
But while investigating the issue, I found that this error could happen
even in the current master (without commit 3b733fcd04). The error can
be easily reproduced by reading pg_stat_wal_receiver view before
walreceiver starts up, in the server built with --disable-atomics --disable-spinlocks.
Furthermore if you try to read pg_stat_wal_receiver again,
that gets stuck. This is not good.
ISTM that the commit 2c8dd05d6c caused this issue. The commit changed
pg_stat_get_wal_receiver() so that it reads "writtenUpto" by using
pg_atomic_read_u64(). But since "writtenUpto" is initialized only when
walreceiver starts up, reading "writtenUpto" before the startup of
walreceiver can cause the error.
Also pg_stat_get_wal_receiver() calls pg_atomic_read_u64() while
a spinlock is being held. Maybe this may cause the process to get stuck
in --disable-atomics case, I guess.
Thought?
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: