Thread: Adding a user without expiration date using pgAdmin III causes postgresql Beta1 to crash

Hoi,

I have just installed Postgresql Beta 1 on a new Windows 7 64-bit system
(without a previously installed PostgreSQL).

When using pgAdmin III (included in the installer package) to create a
user (Login Role) postgresql crashes.

This does not occur when I also set an expiration date on that user.

OS: Windows 7 64-bit
PostgreSQL version: PostgreSQL 9.1beta1, compiled by Visual C++ build
1500, 64-bit

Steps to reproduce:
- Download PostgreSQL via Download 9.1 Beta 1 installers
<http://www.enterprisedb.com/products-services-training/pgdevdownload>(offsite
link) on the PostgreSQL website
- install PostgreSQL (not upgrade)
- start pgAdmin
- connect to the server
- right-click on Login Roles
- select New login role...
- fill in
    Role name
    Password
    Password (again)
- OK can now be clicked - click OK

You now see an error dialog (server closed the connection unexpectedly)
This is because the server has crashed.

Even though it's probably pgAdmin sending an illegal statement to the
server I think the major problem
here is that it causes the server to crash.

Regards,
Leon Widdershoven

Logs (verbose):
2011-05-05 21:07:33 CEST LOG:  00000: database system was shut down at
2011-05-05 21:06:15 CEST
2011-05-05 21:07:33 CEST LOCATION:  StartupXLOG,
.\src\backend\access\transam\xlog.c:6005
2011-05-05 21:07:33 CEST LOG:  00000: database system is ready to accept
connections
2011-05-05 21:07:33 CEST LOCATION:  reaper,
.\src\backend\postmaster\postmaster.c:2435
2011-05-05 21:07:33 CEST LOG:  00000: autovacuum launcher started
2011-05-05 21:07:33 CEST LOCATION:  AutoVacLauncherMain,
.\src\backend\postmaster\autovacuum.c:404
2011-05-05 21:08:29 CEST LOG:  00000: server process (PID 2700) was
terminated by exception 0xC0000005
2011-05-05 21:08:29 CEST HINT:  See C include file "ntstatus.h" for a
description of the hexadecimal value.
2011-05-05 21:08:29 CEST LOCATION:  LogChildExit,
.\src\backend\postmaster\postmaster.c:2871
2011-05-05 21:08:29 CEST LOG:  00000: terminating any other active
server processes
2011-05-05 21:08:29 CEST LOCATION:  HandleChildCrash,
.\src\backend\postmaster\postmaster.c:2695
2011-05-05 21:08:29 CEST WARNING:  57P02: terminating connection because
of crash of another server process
2011-05-05 21:08:29 CEST 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-05-05 21:08:29 CEST HINT:  In a moment you should be able to
reconnect to the database and repeat your command.
2011-05-05 21:08:29 CEST LOCATION:  quickdie,
.\src\backend\tcop\postgres.c:2592
2011-05-05 21:08:29 CEST LOG:  00000: all server processes terminated;
reinitializing
2011-05-05 21:08:29 CEST LOCATION:  PostmasterStateMachine,
.\src\backend\postmaster\postmaster.c:3116
2011-05-05 21:08:39 CEST FATAL:  XX000: pre-existing shared memory block
is still in use
2011-05-05 21:08:39 CEST HINT:  Check if there are any old server
processes still running, and terminate them.
2011-05-05 21:08:39 CEST LOCATION:  PGSharedMemoryCreate,
.\src\backend\port\win32_shmem.c:194
Leon Widdershoven <qaz@dds.nl> writes:
> I have just installed Postgresql Beta 1 on a new Windows 7 64-bit system
> (without a previously installed PostgreSQL).

> When using pgAdmin III (included in the installer package) to create a
> user (Login Role) postgresql crashes.

Hm, this sounds like it's probably the same thing as bug #6005
http://archives.postgresql.org/pgsql-bugs/2011-05/msg00009.php

which I couldn't reproduce.  But both you and that person are using
Windows, so a Windows-only bug is looking more probable.  Could someone
reproduce this and get a stack trace?
http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Windows

            regards, tom lane
On Thu, May 5, 2011 at 5:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Leon Widdershoven <qaz@dds.nl> writes:
>> I have just installed Postgresql Beta 1 on a new Windows 7 64-bit system
>> (without a previously installed PostgreSQL).
>
>> When using pgAdmin III (included in the installer package) to create a
>> user (Login Role) postgresql crashes.
>
> Hm, this sounds like it's probably the same thing as bug #6005
> http://archives.postgresql.org/pgsql-bugs/2011-05/msg00009.php
>
> which I couldn't reproduce. =A0But both you and that person are using
> Windows, so a Windows-only bug is looking more probable. =A0Could someone
> reproduce this and get a stack trace?
> http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_Postgr=
eSQL_backend_on_Windows

Based on Tom's recent commits, this might now be fixed in the latest source=
s.

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company