Re: [bug fix] postgres.exe crashes with access violation on Windows while starting up

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] postgres.exe crashes with access violation on Windows while starting up
Date: 2017-10-27 02:51:00
Message-ID: 0A3221C70F24FB45833433255569204D1F80CD13@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Tsunakawa,
> Takayuki
> The reason is for not outputing the crash dump is a) the crash occurred
> before installing the Windows exception handler
> (pgwin32_install_crashdump_handler() call) and b) the effect of the
> following call in postmaster is inherited in the child process.
>
> /* In case of general protection fault, don't show GUI popup
> box */
> SetErrorMode(SEM_FAILCRITICALERRORS |
> SEM_NOGPFAULTERRORBOX);
>
> But I'm not sure in what order we should do
> pgwin32_install_crashdump_handler(), startup_hacks() and steps therein,
> MemoryContextInit(). I think that's another patch.

Just installing the handler at the beginning of main() seems fine. Patch attached.

Regards
Takayuki Tsunakawa

Attachment Content-Type Size
crash_dump_before_installing_handler.patch application/octet-stream 1.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-10-27 04:57:22 Re: path toward faster partition pruning
Previous Message Tsunakawa, Takayuki 2017-10-27 02:10:21 [bug fix] postgres.exe crashes with access violation on Windows while starting up