self-deadlock at FATAL exit of boostrap process on read error
От | Qingqing Zhou |
---|---|
Тема | self-deadlock at FATAL exit of boostrap process on read error |
Дата | |
Msg-id | e66cfj$2l8q$1@news.hub.org обсуждение исходный текст |
Ответы |
Re: self-deadlock at FATAL exit of boostrap process on read error
|
Список | pgsql-hackers |
I encounter a situation that the server can't shutdown when a boostrap process does ReadBuffer() but gets an read error. I guess the problem may be like this - the boostrap process can't read at line: smgrread(reln->rd_smgr, blockNum, (char *) bufBlock); So it does a FATAL exit and shmem_exit() is called: while (--on_shmem_exit_index >= 0) (*on_shmem_exit_list[on_shmem_exit_index].function) (code, on_shmem_exit_list[on_shmem_exit_index].arg); Where on_shmem_exit_list[0] = DummyProcKill on_shmem_exit_list[1] = AtProcExit_Buffers The above callback is called in a stack order, so AtProcExit_Buffers() will call AbortBufferIO() which is blocked by itself on "io_in_progress_lock" (which is not the case as the comment says "since LWLockReleaseAll has already been called, we're not holding the buffer's io_in_progress_lock"). There may other similar problems for bootstrap process like this, so I am not sure the best fix for this ... Regards, Qingqing
В списке pgsql-hackers по дате отправления: