Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Cristian Bittel <cbittel(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Chris Travers <chris(at)metatrontech(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session
Date: 2010-08-31 13:18:15
Message-ID: AANLkTimjBjegGH3KSihTKuQcwEUL6n7keG+hfMfLsGmx@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
On Sun, Aug 29, 2010 at 12:05 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Thu, Aug 26, 2010 at 22:59, Cristian Bittel <cbittel(at)gmail(dot)com> wrote:
>> I still believe this "exit code 128" is related to pgAdmin opened during the
>> clossing session on Remote Desktop. I have a Windows user login wich is not
>> administrator just no privileged user, it cannot start/stop services, just
>> monitoring. With pgAdmin window opened inside my disconected session, as
>> Administrator if I "close" the another disconnected session, Postgres exit
>> with 128 code.
>
> If the closing of a session on the remote desktop can affect a
> *service* then frankly that sounds like a serious isolation bug in
> Windows itself. The postmaster grabs the handle of the process when
> it's started and waits on that - that should never be affected by
> something in a different session.
>
> I think it's more likely that Windows just looses track when you
> terminate a lot of processes at once, and randomly kills off something
> - or at least *indicates* that something has been killed off.
>
>> Did you reproduce this behavior?
>
> No, AFAIK nobody has managed to reproduce this behavior in any kind of
> consistent way. It's certainly been seen more than once in many
> places, but not consistently reproducible.

This behaviour, no - but desktop heap exhaustion is very easy to
reproduce. That's because the heap usage is caused by user32.dll which
uses a consistent amount with each process started, which is allocated
as the process is created. When I was working on the issue a couple of
years ago, it was entirely predictable - user32.dll allocates N bytes
and as soon as N * numbackends exceeds the allocated heap size, we
fall over.

It shouldn't matter as desktop heap is allocated on a per-session
basis, but are you logging on using the service account to run your
admin tasks Cristian? If so, do you see the problem if you login
interactively using a different account?

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-08-31 13:51:31
Subject: Re: huia and moa versus old PG branches
Previous:From: Fujii MasaoDate: 2010-08-31 12:47:51
Subject: Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)

pgsql-bugs by date

Next:From: Cristian BittelDate: 2010-08-31 14:40:33
Subject: Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session
Previous:From: Fabien COELHODate: 2010-08-31 12:03:43
Subject: issue about information_schema REFERENTIAL_CONSTRAINTS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group