Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A4B71B5DC59 for ; Fri, 9 Sep 2011 17:59:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 60231-06 for ; Fri, 9 Sep 2011 20:59:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id D6E08B5DC57 for ; Fri, 9 Sep 2011 17:59:50 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p89KxobE078698 for ; Fri, 9 Sep 2011 20:59:50 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p89KxoVr078697; Fri, 9 Sep 2011 20:59:50 GMT (envelope-from www) Date: Fri, 9 Sep 2011 20:59:50 GMT Message-Id: <201109092059.p89KxoVr078697@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #6201: Windows User Log Off Causes Backend Exception 0xC0000142 From: "Jerome Schulteis" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201109/62 X-Sequence-Number: 31079 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): 2011-09-09 10:34:01 CDT LOG: server process (PID 3260) was terminated by exception 0xC0000142 2011-09-09 10:34:01 CDT HINT: See C include file "ntstatus.h" for a description of the hexadecimal value. 2011-09-09 10:34:01 CDT LOG: terminating any other active server processes [...] 2011-09-09 10:34:02 CDT WARNING: terminating connection because of crash of another server process 2011-09-09 10:34:02 CDT DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 2011-09-09 10:34:02 CDT HINT: In a moment you should be able to reconnect to the database and repeat your command. 2011-09-09 10:34:02 CDT LOG: all server processes terminated; reinitializing 2011-09-09 10:34:12 CDT FATAL: pre-existing shared memory block is still in use 2011-09-09 10:34:12 CDT HINT: Check if there are any old server processes still running, and terminate them. Originally encountered with our web app running a stress test on PostgreSQL 8.4.2; I reproduced it on a default one-click install of 9.0.4. I run the following Java on a separate machine to get a new connection every 100 ms: class ConnectionHog { static public void main(String[] args) { try { while (true) { java.sql.DriverManager.getConnection(args[0], args[1], args[2]); Thread.sleep(Long.parseLong(args[3])); } } catch (Throwable t) { System.err.println(t); } } } I then log on and off the server from a separate user account (that is, not the postgres account); the error shows up after at most 3 log offs. As long as no log offs happen on the server, no problem.