Re: [bug fix] Produce a crash dump before main() on Windows

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема Re: [bug fix] Produce a crash dump before main() on Windows
Дата
Msg-id CAJrrPGfrtFn5+uTYxhekYA25GBMcr8jXKQd-e=CpEYxPnxgQ7Q@mail.gmail.com
обсуждение исходный текст
Ответ на RE: [bug fix] Produce a crash dump before main() on Windows  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Список pgsql-hackers

On Wed, Jul 18, 2018 at 6:39 PM Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com> wrote:
From: Haribabu Kommi [mailto:kommi.haribabu@gmail.com]
> May be I can give a try by modifying the source code to get the crash.


Thank you, that would be great if you could come up with a good way!

+       if (argc > 1 && strncmp(argv[1], "--fork", 6) == 0)
+       {
+               char *ptr = NULL;
+
+               printf ("%s",*ptr);
+       }
+

I added the above code as first execution code in main() function and I am able to
reproduce the WER popup.

 
> My point is, With this patch, in case if the postgres crashses
> before reaching main(), does it generate a popup?
>
> If the answer to the above question is yes, then if the popup is
> not attended by the DBA, I feel the postmaster is not able to
> restart all the processes because it is waiting for the crash process
> to close. Am I Correct?

IIRC, the pop up doesn't appear under Windows service.  If you start the database server with pg_ctl start on the command prompt, the pop up will appear, which I think is not bad.

Yes, the popup doesn't appear when it is started as service and appear when it is started from command prompt.
I also think that scenarios of starting the server from command prompt may be less, so this patch can be useful
to find out the issue by the starting the server from command prompt. 

I marked the patch as "ready for committer".

Regards,
Haribabu Kommi
Fujitsu Australia

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] plpgsql - additional extra checks
Следующее
От: Haribabu Kommi
Дата:
Сообщение: Re: Libpq support to connect to standby server as priority