Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 3D7E8B5DC44 for ; Fri, 9 Sep 2011 21:53:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 59060-07 for ; Sat, 10 Sep 2011 00:53:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vw0-f50.google.com (mail-vw0-f50.google.com [209.85.212.50]) by mail.postgresql.org (Postfix) with ESMTP id BDAC8B5DC14 for ; Fri, 9 Sep 2011 21:53:25 -0300 (ADT) Received: by vws14 with SMTP id 14so2276088vws.23 for ; Fri, 09 Sep 2011 17:53:25 -0700 (PDT) Received: by 10.52.26.197 with SMTP id n5mr408086vdg.462.1315616005641; Fri, 09 Sep 2011 17:53:25 -0700 (PDT) Received: from [10.1.1.6] (124-148-242-247.dyn.iinet.net.au [124.148.242.247]) by mx.google.com with ESMTPS id du1sm5828934vdb.11.2011.09.09.17.53.23 (version=SSLv3 cipher=OTHER); Fri, 09 Sep 2011 17:53:25 -0700 (PDT) Message-ID: <4E6AB4F9.4090709@ringerc.id.au> Date: Sat, 10 Sep 2011 08:53:13 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Jerome Schulteis CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6201: Windows User Log Off Causes Backend Exception 0xC0000142 References: <201109092059.p89KxoVr078697@wwwmaster.postgresql.org> In-Reply-To: <201109092059.p89KxoVr078697@wwwmaster.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201109/63 X-Sequence-Number: 31080 On 10/09/2011 4:59 AM, Jerome Schulteis wrote: > The following bug has been logged online: > > Bug reference: 6201 > Logged by: Jerome Schulteis > Email address: jerome.schulteis@edstrom.com > PostgreSQL version: 9.0.4 > Operating system: Windows XP Pro SP3 > Description: Windows User Log Off Causes Backend Exception 0xC0000142 > Details: > > It does not happen on every log off, but if the Windows console user logs > off > of the server at just the wrong time while a backend is starting up, the > backend terminates with exception 0xC0000142 (STATUS_DLL_INIT_FAILED), and > the > PostgreSQL Windows service stops (shared memory block is still in use): I wonder which DLL failed? It seems that PostgreSQL doesn't print the message the operating system generates for these errors. For example, it should be printing: "{DLL Initialization Failed} Initialization of the dynamic link library %hs failed. The process is terminating abnormally." ... where %hs is the DLL name or path. I should have a play with that once I finish moving house... Do you have any antivirus or antimalware products on the system? Do you have a Logitech webcam? Their webcam effects app adds a hook DLL to every process on the system, and I've seen it cause issues with MinGW among other things before. If you launch a trivial process like "notepad.exe" then launch Process Explorer from SysInternals, select notepad.exe and press control-D to show the DLL list, what non-Microsoft DLLs are shown? You can copy and paste the list. If you examine a running postgres.exe backend (one of the processess listed UNDER the main "postgres.exe" which is the postmaster) the same way, what non-Microsoft DLLs are shown there? Note that you may have to run Process Explorer as administrator to view the DLL list for postgres.exe. Ignore any DLLs ending in ".NLS" . For bonus points, verify each Microsoft DLL as having a valid signature by double-clicking on it in the list, and report any DLLs that fail verification. -- Craig Ringer