Re: [XP SP2/SP3] FATAL: could not reattach to shared memory

Lists: pgsql-general
From: Łukasz Czerpak <lukasz(dot)czerpak(at)softnet(dot)com(dot)pl>
To: pgsql-general(at)postgresql(dot)org
Subject: [XP SP2/SP3] FATAL: could not reattach to shared memory
Date: 2008-06-25 07:30:29
Message-ID: 4861F415.1040501@softnet.com.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,

We have problems with PostgreSQL on Windows.

PostgreSQL: 8.3.1
System: Windows XP (SP3)
FS: NTFS
Hardware: IBM x3650, 1x Xeon Quad, 2GB RAM

The database is accessed from multiple windows apps. One of them has a
connection pool, the others use single connection per app.
Somethimes when I start PgAdmin and then our app, the second one freeze
(not a PgAdmin bug, the same issue is with other apps).
The log contains:

FATAL: could not reattach to shared memory (key=1808, addr=01CC0000): 487
FATAL: could not reattach to shared memory (key=1808, addr=01CC0000): 487
2008-06-24 06:36:11 CEST WARNING: worker took too long to start; cancelled

Errors appears on Windows XP SP2 too.

On Windows 2000 we have never noticed memory errors like above - on very
similar configuration (but with win2k) the PostgreSQL works perfectly.

Anybody have any idea about this?

Thanks,

--
Łukasz Czerpak | PGP: 0xCBEAA46D [subkeys.pgp.net]
Bankowość Elektroniczna
SoftNet Sp. z o.o.
http://www.softnet.pl/

Attachment Content-Type Size
lukasz_czerpak.vcf text/x-vcard 432 bytes

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Łukasz Czerpak <lukasz(dot)czerpak(at)softnet(dot)com(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [XP SP2/SP3] FATAL: could not reattach to shared memory
Date: 2008-06-25 08:04:04
Message-ID: 4861FBF4.1060208@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Łukasz Czerpak wrote:
> Hi,
>
> We have problems with PostgreSQL on Windows.
>
> PostgreSQL: 8.3.1
> System: Windows XP (SP3)
> FS: NTFS
> Hardware: IBM x3650, 1x Xeon Quad, 2GB RAM
>
>
> The database is accessed from multiple windows apps. One of them has a
> connection pool, the others use single connection per app.
> Somethimes when I start PgAdmin and then our app, the second one freeze
> (not a PgAdmin bug, the same issue is with other apps).
> The log contains:
>
> FATAL: could not reattach to shared memory (key=1808, addr=01CC0000): 487
> FATAL: could not reattach to shared memory (key=1808, addr=01CC0000): 487
> 2008-06-24 06:36:11 CEST WARNING: worker took too long to start; cancelled
>
> Errors appears on Windows XP SP2 too.
>
> On Windows 2000 we have never noticed memory errors like above - on very
> similar configuration (but with win2k) the PostgreSQL works perfectly.
>
> Anybody have any idea about this?

487 is "Invalid address".

Do you have any antivirus or similar software on the machine? If so, try
uninstalling it and trying again (just disabling it is usually not enough).

Have you changed any configuration parameters around the memory size
such as shared_buffers?

//Magnus


From: Łukasz Czerpak <lukasz(dot)czerpak(at)softnet(dot)com(dot)pl>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [XP SP2/SP3] FATAL: could not reattach to shared memory
Date: 2008-06-25 08:25:42
Message-ID: 48620106.4000500@softnet.com.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Magnus Hagander wrote:
>
> 487 is "Invalid address".
>
> Do you have any antivirus or similar software on the machine? If so, try
> uninstalling it and trying again (just disabling it is usually not enough).
>

Yes - NOD32. Ok i will check it.
Is it possible that PostgreSQL works improperly on WinXP + NOD32 and
properly on Win2k + NOD32?

> Have you changed any configuration parameters around the memory size
> such as shared_buffers?
>

My memory parameters:

max_connections = 100

#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------

# - Memory -

shared_buffers = 128MB
temp_buffers = 8MB
#max_prepared_transactions = 5
work_mem = 8MB
maintenance_work_mem = 32MB

Thanks,

--
Łukasz Czerpak | PGP: 0xCBEAA46D [subkeys.pgp.net]
Bankowość Elektroniczna
SoftNet Sp. z o.o.
http://www.softnet.pl/

Attachment Content-Type Size
lukasz_czerpak.vcf text/x-vcard 432 bytes

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Łukasz Czerpak <lukasz(dot)czerpak(at)softnet(dot)com(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [XP SP2/SP3] FATAL: could not reattach to shared memory
Date: 2008-06-25 08:28:00
Message-ID: 48620190.6010001@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Łukasz Czerpak wrote:
> Magnus Hagander wrote:
>>
>> 487 is "Invalid address".
>>
>> Do you have any antivirus or similar software on the machine? If so, try
>> uninstalling it and trying again (just disabling it is usually not
>> enough).
>>
>
> Yes - NOD32. Ok i will check it.

NOD32 is known to cause a lot of issues in general.

> Is it possible that PostgreSQL works improperly on WinXP + NOD32 and
> properly on Win2k + NOD32?

Yes.

> shared_buffers = 128MB

If you still have the problem after removing NOD32, try lowering this
one to say 32MB just to see if the problem goes away then.

//Magnus