Re: Backends stunk in wait event IPC/MessageQueueInternal

2023-04-13 Thread Thomas Munro
On Sun, Aug 28, 2022 at 11:03 AM Thomas Munro wrote: > On Sun, Jun 26, 2022 at 11:18 AM Thomas Munro wrote: > > On Tue, May 17, 2022 at 3:31 PM Thomas Munro wrote: > > > On Mon, May 16, 2022 at 3:45 PM Japin Li wrote: > > > > Maybe use the __illumos__ macro more accurity. > > > > > > > > +#elif

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-08-27 Thread Thomas Munro
On Sun, Jun 26, 2022 at 11:18 AM Thomas Munro wrote: > On Tue, May 17, 2022 at 3:31 PM Thomas Munro wrote: > > On Mon, May 16, 2022 at 3:45 PM Japin Li wrote: > > > Maybe use the __illumos__ macro more accurity. > > > > > > +#elif defined(WAIT_USE_EPOLL) && defined(HAVE_SYS_SIGNALFD_H) && \ > >

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-06-25 Thread Thomas Munro
On Tue, May 17, 2022 at 3:31 PM Thomas Munro wrote: > On Mon, May 16, 2022 at 3:45 PM Japin Li wrote: > > Maybe use the __illumos__ macro more accurity. > > > > +#elif defined(WAIT_USE_EPOLL) && defined(HAVE_SYS_SIGNALFD_H) && \ > > + !defined(__sun__) > > Thanks, updated, and with a new co

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-16 Thread Thomas Munro
On Mon, May 16, 2022 at 3:45 PM Japin Li wrote: > Maybe use the __illumos__ macro more accurity. > > +#elif defined(WAIT_USE_EPOLL) && defined(HAVE_SYS_SIGNALFD_H) && \ > + !defined(__sun__) Thanks, updated, and with a new commit message. I don't know much about these OSes (though I used l

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-15 Thread Japin Li
On Sat, 14 May 2022 at 11:01, Thomas Munro wrote: > On Sat, May 14, 2022 at 10:25 AM Thomas Munro wrote: >> Japin, are you able to reproduce the problem reliably? Did I guess >> right, that you're on illumos? Does this help? I used >> defined(__sun__) to select the option, but I don't rememb

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-14 Thread Japin Li
On Fri, 13 May 2022 at 22:08, Robert Haas wrote: > On Fri, May 13, 2022 at 6:16 AM Japin Li wrote: >> The process cannot be terminated by pg_terminate_backend(), although >> it returns true. > > pg_terminate_backend() just sends SIGINT. What I'm wondering is what > happens when the stuck proces

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-14 Thread Japin Li
On Sat, 14 May 2022 at 11:01, Thomas Munro wrote: > On Sat, May 14, 2022 at 10:25 AM Thomas Munro wrote: >> Japin, are you able to reproduce the problem reliably? Did I guess >> right, that you're on illumos? Does this help? I used >> defined(__sun__) to select the option, but I don't rememb

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-13 Thread Thomas Munro
On Sat, May 14, 2022 at 10:25 AM Thomas Munro wrote: > Japin, are you able to reproduce the problem reliably? Did I guess > right, that you're on illumos? Does this help? I used > defined(__sun__) to select the option, but I don't remember if that's > the right way to detect that OS family, cou

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-13 Thread Thomas Munro
On Sat, May 14, 2022 at 9:25 AM Thomas Munro wrote: > In short, I'd recommend -DWAIT_USE_POLL for now. It's possible that > we could do something to prevent the selection of WAIT_USE_EPOLL on > that platform, or that we should have a halfway option epoll() but not > signalfd() (= go back to using

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-13 Thread Thomas Munro
On Sat, May 14, 2022 at 2:09 AM Robert Haas wrote: > On Fri, May 13, 2022 at 6:16 AM Japin Li wrote: > > The process cannot be terminated by pg_terminate_backend(), although > > it returns true. > One thing I find a bit curious is that the top of the stack in your > case is ioctl(). And there ar

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-13 Thread Robert Haas
On Fri, May 13, 2022 at 6:16 AM Japin Li wrote: > The process cannot be terminated by pg_terminate_backend(), although > it returns true. pg_terminate_backend() just sends SIGINT. What I'm wondering is what happens when the stuck process receives SIGINT. It would be useful, I think, to check the

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-13 Thread Japin Li
On Fri, 13 May 2022 at 19:41, Justin Pryzby wrote: > On Fri, May 13, 2022 at 06:16:23PM +0800, Japin Li wrote: >> I had an incident on my Postgres 14 that queries hung in wait event >> IPC / MessageQueueInternal, MessageQueueReceive. It likes [1], >> however, it doesn't have any discussions. >

Re: Backends stunk in wait event IPC/MessageQueueInternal

2022-05-13 Thread Justin Pryzby
On Fri, May 13, 2022 at 06:16:23PM +0800, Japin Li wrote: > I had an incident on my Postgres 14 that queries hung in wait event > IPC / MessageQueueInternal, MessageQueueReceive. It likes [1], > however, it doesn't have any discussions. If the process is still running, or if the problem recurs, I