Re: Missed condition-variable wakeups on FreeBSD

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Missed condition-variable wakeups on FreeBSD
Дата
Msg-id CA+hUKGJdbn0e_eJsfm1-PucUgpFrrKWczDvvw8PjV6UQjOURyg@mail.gmail.com
обсуждение исходный текст
Ответ на Missed condition-variable wakeups on FreeBSD  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Feb 27, 2022 at 8:07 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I don't know much about how gdb interacts with kernel calls on
> FreeBSD, but I speculate that the poll(2) call returns with EINTR
> after gdb releases the process, and then things resume fine,

Yeah, at least FreeBSD and macOS interrupt system calls when you send
SIGSTOP + SIGCONT directly, or when gdb and lldb do something similar
via ptrace.  The same applies on Linux, except that Linux restarts the
system call automatically (even though the man page has this in the
list of system calls that never restart) so you don't usually notice
(though you can see it with strace).  It's not really clear to me what
should happen given the language around restarts is all about signal
handlers, and stop + cont are system magic, not signal handlers.
Anyway...

> suggesting that we lost an interrupt somewhere.

So it's happening on an i386 kernel, with WAIT_USE_POLL (not
WAIT_USE_KQUEUE), but only under the build farm script (not when you
ran it manually in loop)....  hmmm.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Proposal: Support custom authentication methods using hooks
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad