pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedcould not fork autovacuum worker process: No error
16+ messages / 4 participants
[nested] [flat]
* could not fork autovacuum worker process: No error
@ 2017-01-25 12:46 Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 16+ messages in thread
From: Tomasz Szypowski @ 2017-01-25 12:46 UTC (permalink / raw)
To: pgsql-bugs
Hi PostgreSQL Team,
since last month we receive error as in the topic. After restart one can
work with server but not for long.
Is it connected with one of Windows Update on Server 2012 (or Windows 10)
ASLR?
We use PostgreSQL 9.5.5 and 9.5.4. Both compiled from sources.
Do you have solution for this?
regards
Thomas Szypowski
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
@ 2017-01-25 15:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:50 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
0 siblings, 2 replies; 16+ messages in thread
From: Tom Lane @ 2017-01-25 15:33 UTC (permalink / raw)
To: Tomasz Szypowski <tomasz.szypowski@gmail.com>; +Cc: pgsql-bugs
Tomasz Szypowski <tomasz.szypowski@gmail.com> writes:
> Hi PostgreSQL Team,
> since last month we receive error as in the topic. After restart one can
> work with server but not for long.
> Is it connected with one of Windows Update on Server 2012 (or Windows 10)
> ASLR?
If this is on Windows, there's probably more information about the
failure in the postmaster log --- look for LOG messages just before
the "fork failure" complaint.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-01-25 15:46 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 16+ messages in thread
From: Tomasz Szypowski @ 2017-01-25 15:46 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs
Hi Tom,
is a greate honour for me to meet you personally.
Thanks for the quick response as well.
I send you logs
regards
Thomas
2017-01-25 16:33 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
> Tomasz Szypowski <tomasz.szypowski@gmail.com> writes:
> > Hi PostgreSQL Team,
> > since last month we receive error as in the topic. After restart one can
> > work with server but not for long.
>
> > Is it connected with one of Windows Update on Server 2012 (or Windows 10)
> > ASLR?
>
> If this is on Windows, there's probably more information about the
> failure in the postmaster log --- look for LOG messages just before
> the "fork failure" complaint.
>
> regards, tom lane
>
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Attachments:
logi od 2016_11_05.7z (application/octet-stream, 969.6K) download
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
@ 2017-01-25 16:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
0 siblings, 1 reply; 16+ messages in thread
From: Tom Lane @ 2017-01-25 16:04 UTC (permalink / raw)
To: Tomasz Szypowski <tomasz.szypowski@gmail.com>; +Cc: pgsql-bugs
Tomasz Szypowski <tomasz.szypowski@gmail.com> writes:
> I send you logs
Hmm ....
2016-11-10 17:58:42 CET LOG: could not reserve shared memory region (addr=015E0000) for child 0000085C: error code 487
2016-11-10 17:58:42 CET LOG: could not fork autovacuum worker process: No error
2016-11-10 17:58:43 CET LOG: could not reserve shared memory region (addr=015E0000) for child 00000828: error code 487
2016-11-10 17:58:43 CET LOG: could not fork autovacuum worker process: No error
2016-11-10 17:58:44 CET LOG: could not reserve shared memory region (addr=015E0000) for child 0000085C: error code 487
2016-11-10 17:58:44 CET LOG: could not fork autovacuum worker process: No error
2016-11-10 17:59:02 CET LOG: could not reserve shared memory region (addr=015E0000) for child 00000878: error code 487
2016-11-10 17:59:02 CET LOG: could not fork autovacuum worker process: No error
2016-11-10 17:59:03 CET LOG: could not reserve shared memory region (addr=015E0000) for child 00000874: error code 487
2016-11-10 17:59:03 CET LOG: could not fork autovacuum worker process: No error
2016-11-10 17:59:04 CET LOG: could not reserve shared memory region (addr=015E0000) for child 00000878: error code 487
2016-11-10 17:59:04 CET LOG: could not fork autovacuum worker process: No error
Yeah, that probably is an ASLR problem :-(. We don't have a good
solution for that on Windows yet.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-01-25 16:16 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:18 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-04-01 02:41 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
0 siblings, 2 replies; 16+ messages in thread
From: Tomasz Szypowski @ 2017-01-25 16:16 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs
Tom,
what do you suggest? Disabling ASLR? Do you know approx. how long will it
take for you to implement the change?
regards
Thomas
2017-01-25 17:04 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
> Tomasz Szypowski <tomasz.szypowski@gmail.com> writes:
> > I send you logs
>
> Hmm ....
>
> 2016-11-10 17:58:42 CET LOG: could not reserve shared memory region
> (addr=015E0000) for child 0000085C: error code 487
> 2016-11-10 17:58:42 CET LOG: could not fork autovacuum worker process: No
> error
> 2016-11-10 17:58:43 CET LOG: could not reserve shared memory region
> (addr=015E0000) for child 00000828: error code 487
> 2016-11-10 17:58:43 CET LOG: could not fork autovacuum worker process: No
> error
> 2016-11-10 17:58:44 CET LOG: could not reserve shared memory region
> (addr=015E0000) for child 0000085C: error code 487
> 2016-11-10 17:58:44 CET LOG: could not fork autovacuum worker process: No
> error
> 2016-11-10 17:59:02 CET LOG: could not reserve shared memory region
> (addr=015E0000) for child 00000878: error code 487
> 2016-11-10 17:59:02 CET LOG: could not fork autovacuum worker process: No
> error
> 2016-11-10 17:59:03 CET LOG: could not reserve shared memory region
> (addr=015E0000) for child 00000874: error code 487
> 2016-11-10 17:59:03 CET LOG: could not fork autovacuum worker process: No
> error
> 2016-11-10 17:59:04 CET LOG: could not reserve shared memory region
> (addr=015E0000) for child 00000878: error code 487
> 2016-11-10 17:59:04 CET LOG: could not fork autovacuum worker process: No
> error
>
> Yeah, that probably is an ASLR problem :-(. We don't have a good
> solution for that on Windows yet.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
@ 2017-01-25 16:18 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 16+ messages in thread
From: Tom Lane @ 2017-01-25 16:18 UTC (permalink / raw)
To: Tomasz Szypowski <tomasz.szypowski@gmail.com>; +Cc: pgsql-bugs
Tomasz Szypowski <tomasz.szypowski@gmail.com> writes:
> what do you suggest? Disabling ASLR?
Yes.
> Do you know approx. how long will it
> take for you to implement the change?
There's no plan for how to solve this, so I dunno.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
@ 2017-04-01 02:41 ` Noah Misch <noah@leadboat.com>
2017-04-01 08:56 ` Re: could not fork autovacuum worker process: No error Michael Paquier <michael.paquier@gmail.com>
1 sibling, 1 reply; 16+ messages in thread
From: Noah Misch @ 2017-04-01 02:41 UTC (permalink / raw)
To: Tomasz Szypowski <tomasz.szypowski@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs
On Wed, Jan 25, 2017 at 05:16:52PM +0100, Tomasz Szypowski wrote:
> what do you suggest? Disabling ASLR? Do you know approx. how long will it
> take for you to implement the change?
We thought we implemented it years ago:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=7f3e17b4827b61ad84e0774e3e43da4c5...
On Wed, Jan 25, 2017 at 01:46:01PM +0100, Tomasz Szypowski wrote:
> We use PostgreSQL 9.5.5 and 9.5.4. Both compiled from sources.
Which compiler and compiler version did you use? What is the content of your
config.pl or your ./configure command line?
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-01 02:41 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
@ 2017-04-01 08:56 ` Michael Paquier <michael.paquier@gmail.com>
2017-04-02 15:58 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 16+ messages in thread
From: Michael Paquier @ 2017-04-01 08:56 UTC (permalink / raw)
To: Noah Misch <noah@leadboat.com>; +Cc: Tomasz Szypowski <tomasz.szypowski@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs
On Sat, Apr 1, 2017 at 11:41 AM, Noah Misch <noah@leadboat.com> wrote:
> On Wed, Jan 25, 2017 at 05:16:52PM +0100, Tomasz Szypowski wrote:
>> what do you suggest? Disabling ASLR? Do you know approx. how long will it
>> take for you to implement the change?
Last November I saw a high resurgence of such reports after a Windows
update. The builds in question had ASLR enabled and disabling it made
the trick but the update visibly made the failures more easier to show
up.
> We thought we implemented it years ago:
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=7f3e17b4827b61ad84e0774e3e43da4c5...
I think that the OP here is asking for a solution where our shared
memory implementation is not messed up with ASLR enabled. And we don't
have a clear solution for that yet.
> On Wed, Jan 25, 2017 at 01:46:01PM +0100, Tomasz Szypowski wrote:
>> We use PostgreSQL 9.5.5 and 9.5.4. Both compiled from sources.
>
> Which compiler and compiler version did you use? What is the content of your
> config.pl or your ./configure command line?
Likely there are custom options used here, it may be good to look with
dumpbin what's the state of the builds.
--
Michael
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-01 02:41 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-01 08:56 ` Re: could not fork autovacuum worker process: No error Michael Paquier <michael.paquier@gmail.com>
@ 2017-04-02 15:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-04-02 17:51 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
0 siblings, 1 reply; 16+ messages in thread
From: Tom Lane @ 2017-04-02 15:58 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Noah Misch <noah@leadboat.com>; Tomasz Szypowski <tomasz.szypowski@gmail.com>; pgsql-bugs
Michael Paquier <michael.paquier@gmail.com> writes:
> I think that the OP here is asking for a solution where our shared
> memory implementation is not messed up with ASLR enabled. And we don't
> have a clear solution for that yet.
Yeah. I don't know anything about the address space layout under Windows,
but it occurs to me to ask how much of the address space their version of
ASLR thinks it can chew up. Maybe we could fix this by explicitly asking
for the shmem block to be mapped at the top of memory always, or something
along that line. Perhaps it would only be fixable that way under Win64,
but that would still be a good step forward.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-01 02:41 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-01 08:56 ` Re: could not fork autovacuum worker process: No error Michael Paquier <michael.paquier@gmail.com>
2017-04-02 15:58 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-04-02 17:51 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-02 22:08 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
0 siblings, 1 reply; 16+ messages in thread
From: Tomasz Szypowski @ 2017-04-02 17:51 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Michael Paquier <michael.paquier@gmail.com>; Noah Misch <noah@leadboat.com>; pgsql-bugs
Hello guys,
I build PostgreSQL 32 bit on Windows with Microsoft Visual Studio 8.
I don`t see any config.pl file, Do you mean config_default.pl? If yes, than
the only module, that I activiate is zlib. I don`t need any extension like
openssl, xml and so on.
Regards
Thomas
2017-04-02 17:58 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:
> Michael Paquier <michael.paquier@gmail.com> writes:
> > I think that the OP here is asking for a solution where our shared
> > memory implementation is not messed up with ASLR enabled. And we don't
> > have a clear solution for that yet.
>
> Yeah. I don't know anything about the address space layout under Windows,
> but it occurs to me to ask how much of the address space their version of
> ASLR thinks it can chew up. Maybe we could fix this by explicitly asking
> for the shmem block to be mapped at the top of memory always, or something
> along that line. Perhaps it would only be fixable that way under Win64,
> but that would still be a good step forward.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-01 02:41 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-01 08:56 ` Re: could not fork autovacuum worker process: No error Michael Paquier <michael.paquier@gmail.com>
2017-04-02 15:58 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-04-02 17:51 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
@ 2017-04-02 22:08 ` Noah Misch <noah@leadboat.com>
2017-04-03 06:51 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
0 siblings, 1 reply; 16+ messages in thread
From: Noah Misch @ 2017-04-02 22:08 UTC (permalink / raw)
To: Tomasz Szypowski <tomasz.szypowski@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael.paquier@gmail.com>; pgsql-bugs
On Sun, Apr 02, 2017 at 07:51:59PM +0200, Tomasz Szypowski wrote:
> I build PostgreSQL 32 bit on Windows with Microsoft Visual Studio 8.
That version number is ambiguous. From the command prompt in which you build
PostgreSQL, what is the output of these two commands?
cl
systeminfo | findstr /B OS
If you build PostgreSQL on one system and run it on a different system, what
is the output of "systeminfo | findstr /B OS" on the runtime system?
> I don`t see any config.pl file, Do you mean config_default.pl?
Technically no. If you have not created a config.pl, that is fine.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-01 02:41 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-01 08:56 ` Re: could not fork autovacuum worker process: No error Michael Paquier <michael.paquier@gmail.com>
2017-04-02 15:58 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-04-02 17:51 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-02 22:08 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
@ 2017-04-03 06:51 ` Noah Misch <noah@leadboat.com>
2017-04-03 17:18 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
0 siblings, 1 reply; 16+ messages in thread
From: Noah Misch @ 2017-04-03 06:51 UTC (permalink / raw)
To: Tomasz Szypowski <tomasz.szypowski@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael.paquier@gmail.com>; pgsql-bugs
On Sun, Apr 02, 2017 at 06:08:56PM -0400, Noah Misch wrote:
> On Sun, Apr 02, 2017 at 07:51:59PM +0200, Tomasz Szypowski wrote:
> > I build PostgreSQL 32 bit on Windows with Microsoft Visual Studio 8.
>
> That version number is ambiguous. From the command prompt in which you build
> PostgreSQL, what is the output of these two commands?
>
> cl
> systeminfo | findstr /B OS
>
> If you build PostgreSQL on one system and run it on a different system, what
> is the output of "systeminfo | findstr /B OS" on the runtime system?
Also, could you run a test workload that reproduces the problem against a
postgres.exe built with the attached patch? This will dump details of your
memory postgres.exe memory map to the log, hopefully giving a clue about the
source of the trouble.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Attachments:
w32-memory-map-v1.patch (text/plain, 4.1K) download
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 7a0bbb2..498bdc9 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -80,7 +80,7 @@ libpostgres.a: postgres ;
endif # cygwin
ifeq ($(PORTNAME), win32)
-LIBS += -lsecur32
+LIBS += -lsecur32 -lpsapi
postgres: $(OBJS) $(WIN32RES)
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) -Wl,--stack=$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a $(call expand_subsys,$(OBJS)) $(WIN32RES) $(LIBS) -o $@$(X)
diff --git a/src/backend/port/win32_shmem.c b/src/backend/port/win32_shmem.c
index 31489fc..1e35278 100644
--- a/src/backend/port/win32_shmem.c
+++ b/src/backend/port/win32_shmem.c
@@ -17,12 +17,85 @@
#include "storage/ipc.h"
#include "storage/pg_shmem.h"
+#include <psapi.h>
+
HANDLE UsedShmemSegID = INVALID_HANDLE_VALUE;
void *UsedShmemSegAddr = NULL;
static Size UsedShmemSegSize = 0;
static void pgwin32_SharedMemoryDelete(int status, Datum shmId);
+static void
+dumpdlls(HANDLE *proc)
+{
+ HMODULE dll[512];
+ DWORD size_used = 1;
+ int i;
+
+ if (!EnumProcessModules(proc, dll, sizeof(dll), &size_used))
+ {
+ elog(LOG, "EnumProcessModules failed: %lu", GetLastError());
+ return;
+ }
+ if (size_used == 0)
+ elog(LOG, "EnumProcessModules: no modules");
+
+ for (i = 0; i < size_used / sizeof(*dll); i++)
+ {
+ char name[MAXPGPATH];
+
+ if (!GetModuleFileNameEx(proc, dll[i], name, sizeof(name)))
+ sprintf(name, "GetModuleFileNameEx failed: %lu", GetLastError());
+ elog(LOG, "0x%p %s", dll[i], name);
+ }
+}
+
+static const char *
+mi_type(DWORD code)
+{
+ switch (code) {
+ case MEM_IMAGE: return "img";
+ case MEM_MAPPED: return "map";
+ case MEM_PRIVATE: return "prv";
+ }
+ return "???";
+}
+
+static const char *
+mi_state(DWORD code)
+{
+ switch (code) {
+ case MEM_COMMIT: return "commit";
+ case MEM_FREE: return "free ";
+ case MEM_RESERVE: return "reserv";
+ }
+ return "???";
+}
+
+static void
+dumpmem(const char *reason, HANDLE *proc)
+{
+ char *addr = 0;
+ MEMORY_BASIC_INFORMATION mi;
+
+ elog(LOG, "%s memory map", reason);
+ do {
+ if (0 == VirtualQueryEx(proc, addr, &mi, sizeof(mi)))
+ {
+ if (GetLastError() == ERROR_INVALID_PARAMETER)
+ break;
+ elog(LOG, "VirtualQueryEx failed: %lu", GetLastError());
+ return;
+ }
+ elog(LOG, "0x%p+0x%p %s (alloc 0x%p) %s",
+ mi.BaseAddress, (void *) mi.RegionSize,
+ mi_type(mi.Type), mi.AllocationBase, mi_state(mi.State));
+ addr += mi.RegionSize;
+ } while (addr > 0);
+
+ dumpdlls(proc);
+}
+
/*
* Generate shared memory segment name. Expand the data directory, to generate
* an identifier unique for this data directory. Then replace all backslashes
@@ -276,6 +349,8 @@ PGSharedMemoryReAttach(void)
Assert(UsedShmemSegAddr != NULL);
Assert(IsUnderPostmaster);
+ dumpmem("before reattach", GetCurrentProcess());
+
/*
* Release memory region reservation that was made by the postmaster
*/
@@ -408,6 +483,7 @@ pgwin32_ReserveSharedMemoryRegion(HANDLE hChild)
address = VirtualAllocEx(hChild, UsedShmemSegAddr, UsedShmemSegSize,
MEM_RESERVE, PAGE_READWRITE);
+ dumpmem("after reserve", hChild);
if (address == NULL)
{
/* Don't use FATAL since we're running in the postmaster */
diff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32
index 7abbd01..678371d 100644
--- a/src/makefiles/Makefile.win32
+++ b/src/makefiles/Makefile.win32
@@ -1,5 +1,7 @@
# src/makefiles/Makefile.win32
+override CPPFLAGS+= -DPSAPI_VERSION=1
+
ifdef PGXS
BE_DLLLIBS= -L$(libdir) -lpostgres
override CPPFLAGS+= -I$(includedir_server)/port/win32
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 12f73f3..4c39f33 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -172,8 +172,10 @@ sub mkvcbuild
'repl_gram.y', 'syncrep_scanner.l',
'syncrep_gram.y');
$postgres->AddDefine('BUILDING_DLL');
+ $postgres->AddDefine('PSAPI_VERSION=1');
$postgres->AddLibrary('secur32.lib');
$postgres->AddLibrary('ws2_32.lib');
+ $postgres->AddLibrary('psapi.lib');
$postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap});
$postgres->FullExportDLL('postgres.lib');
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-01 02:41 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-01 08:56 ` Re: could not fork autovacuum worker process: No error Michael Paquier <michael.paquier@gmail.com>
2017-04-02 15:58 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-04-02 17:51 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-02 22:08 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-03 06:51 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
@ 2017-04-03 17:18 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-18 02:59 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
0 siblings, 1 reply; 16+ messages in thread
From: Tomasz Szypowski @ 2017-04-03 17:18 UTC (permalink / raw)
To: Noah Misch <noah@leadboat.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael.paquier@gmail.com>; pgsql-bugs
Hi, here is the result of OS:
OS Name: Microsoft Windows Server 2012 R2 Standard
OS Version: 6.3.9600 N/A Build 9600
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Server
OS Build Type: Multiprocessor Free
Here is the result of cl:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for
80x86
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
and of OS:
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.10586 N/A Build 10586
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
pozdrawiam
Tomek
2017-04-03 8:51 GMT+02:00 Noah Misch <noah@leadboat.com>:
> On Sun, Apr 02, 2017 at 06:08:56PM -0400, Noah Misch wrote:
> > On Sun, Apr 02, 2017 at 07:51:59PM +0200, Tomasz Szypowski wrote:
> > > I build PostgreSQL 32 bit on Windows with Microsoft Visual Studio 8.
> >
> > That version number is ambiguous. From the command prompt in which you
> build
> > PostgreSQL, what is the output of these two commands?
> >
> > cl
> > systeminfo | findstr /B OS
> >
> > If you build PostgreSQL on one system and run it on a different system,
> what
> > is the output of "systeminfo | findstr /B OS" on the runtime system?
>
> Also, could you run a test workload that reproduces the problem against a
> postgres.exe built with the attached patch? This will dump details of your
> memory postgres.exe memory map to the log, hopefully giving a clue about
> the
> source of the trouble.
>
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-01 02:41 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-01 08:56 ` Re: could not fork autovacuum worker process: No error Michael Paquier <michael.paquier@gmail.com>
2017-04-02 15:58 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-04-02 17:51 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-02 22:08 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-03 06:51 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-03 17:18 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
@ 2017-04-18 02:59 ` Noah Misch <noah@leadboat.com>
2017-04-18 13:57 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
0 siblings, 1 reply; 16+ messages in thread
From: Noah Misch @ 2017-04-18 02:59 UTC (permalink / raw)
To: Tomasz Szypowski <tomasz.szypowski@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael.paquier@gmail.com>; pgsql-bugs
Thanks. Would you reproduce the problem after applying the patch I provided,
then capture the logs?
On Mon, Apr 03, 2017 at 07:18:40PM +0200, Tomasz Szypowski wrote:
> Hi, here is the result of OS:
>
> OS Name: Microsoft Windows Server 2012 R2 Standard
> OS Version: 6.3.9600 N/A Build 9600
> OS Manufacturer: Microsoft Corporation
> OS Configuration: Standalone Server
> OS Build Type: Multiprocessor Free
>
> Here is the result of cl:
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for
> 80x86
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> usage: cl [ option... ] filename... [ /link linkoption... ]
>
> and of OS:
> OS Name: Microsoft Windows 10 Pro
>
> OS Version: 10.0.10586 N/A Build 10586
> OS Manufacturer: Microsoft Corporation
> OS Configuration: Standalone Workstation
> OS Build Type: Multiprocessor Free
>
> pozdrawiam
> Tomek
>
> 2017-04-03 8:51 GMT+02:00 Noah Misch <noah@leadboat.com>:
>
> > On Sun, Apr 02, 2017 at 06:08:56PM -0400, Noah Misch wrote:
> > > On Sun, Apr 02, 2017 at 07:51:59PM +0200, Tomasz Szypowski wrote:
> > > > I build PostgreSQL 32 bit on Windows with Microsoft Visual Studio 8.
> > >
> > > That version number is ambiguous. From the command prompt in which you
> > build
> > > PostgreSQL, what is the output of these two commands?
> > >
> > > cl
> > > systeminfo | findstr /B OS
> > >
> > > If you build PostgreSQL on one system and run it on a different system,
> > what
> > > is the output of "systeminfo | findstr /B OS" on the runtime system?
> >
> > Also, could you run a test workload that reproduces the problem against a
> > postgres.exe built with the attached patch? This will dump details of your
> > memory postgres.exe memory map to the log, hopefully giving a clue about
> > the
> > source of the trouble.
> >
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-01 02:41 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-01 08:56 ` Re: could not fork autovacuum worker process: No error Michael Paquier <michael.paquier@gmail.com>
2017-04-02 15:58 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
2017-04-02 17:51 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-02 22:08 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-03 06:51 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
2017-04-03 17:18 ` Re: could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-18 02:59 ` Re: could not fork autovacuum worker process: No error Noah Misch <noah@leadboat.com>
@ 2017-04-18 13:57 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
0 siblings, 0 replies; 16+ messages in thread
From: Tomasz Szypowski @ 2017-04-18 13:57 UTC (permalink / raw)
To: Noah Misch <noah@leadboat.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael.paquier@gmail.com>; pgsql-bugs
unfortunatellly this error is not deterministic one, if I know any news, I
will inform you immediatelly
regards
Thomas
2017-04-18 4:59 GMT+02:00 Noah Misch <noah@leadboat.com>:
> Thanks. Would you reproduce the problem after applying the patch I
> provided,
> then capture the logs?
>
> On Mon, Apr 03, 2017 at 07:18:40PM +0200, Tomasz Szypowski wrote:
> > Hi, here is the result of OS:
> >
> > OS Name: Microsoft Windows Server 2012 R2 Standard
> > OS Version: 6.3.9600 N/A Build 9600
> > OS Manufacturer: Microsoft Corporation
> > OS Configuration: Standalone Server
> > OS Build Type: Multiprocessor Free
> >
> > Here is the result of cl:
> > Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for
> > 80x86
> > Copyright (C) Microsoft Corporation. All rights reserved.
> >
> > usage: cl [ option... ] filename... [ /link linkoption... ]
> >
> > and of OS:
> > OS Name: Microsoft Windows 10 Pro
> >
> > OS Version: 10.0.10586 N/A Build 10586
> > OS Manufacturer: Microsoft Corporation
> > OS Configuration: Standalone Workstation
> > OS Build Type: Multiprocessor Free
> >
> > pozdrawiam
> > Tomek
> >
> > 2017-04-03 8:51 GMT+02:00 Noah Misch <noah@leadboat.com>:
> >
> > > On Sun, Apr 02, 2017 at 06:08:56PM -0400, Noah Misch wrote:
> > > > On Sun, Apr 02, 2017 at 07:51:59PM +0200, Tomasz Szypowski wrote:
> > > > > I build PostgreSQL 32 bit on Windows with Microsoft Visual Studio
> 8.
> > > >
> > > > That version number is ambiguous. From the command prompt in which
> you
> > > build
> > > > PostgreSQL, what is the output of these two commands?
> > > >
> > > > cl
> > > > systeminfo | findstr /B OS
> > > >
> > > > If you build PostgreSQL on one system and run it on a different
> system,
> > > what
> > > > is the output of "systeminfo | findstr /B OS" on the runtime system?
> > >
> > > Also, could you run a test workload that reproduces the problem
> against a
> > > postgres.exe built with the attached patch? This will dump details of
> your
> > > memory postgres.exe memory map to the log, hopefully giving a clue
> about
> > > the
> > > source of the trouble.
> > >
>
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: could not fork autovacuum worker process: No error
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Re: could not fork autovacuum worker process: No error Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-01-25 15:50 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
1 sibling, 0 replies; 16+ messages in thread
From: Tomasz Szypowski @ 2017-01-25 15:50 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs
is a greate honour for me to meet you personally.
Thanks for the quick response as well.
Here is the log for autovaccum, but it doesn`t work with normal login as
well:
2016-11-16 08:57:03 CET LOG: could not reserve shared memory region
(addr=015E0000) for child 000012D4: error code 487
2016-11-16 08:57:03 CET LOG: could not fork autovacuum worker process: No
error
regards
Thomas
2017-01-25 16:33 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
> Tomasz Szypowski <tomasz.szypowski@gmail.com> writes:
> > Hi PostgreSQL Team,
> > since last month we receive error as in the topic. After restart one can
> > work with server but not for long.
>
> > Is it connected with one of Windows Update on Server 2012 (or Windows 10)
> > ASLR?
>
> If this is on Windows, there's probably more information about the
> failure in the postmaster log --- look for LOG messages just before
> the "fork failure" complaint.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 16+ messages in thread
end of thread, other threads:[~2017-04-18 13:57 UTC | newest]
Thread overview: 16+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 12:46 could not fork autovacuum worker process: No error Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 15:46 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-01-25 16:16 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 16:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-04-01 02:41 ` Noah Misch <noah@leadboat.com>
2017-04-01 08:56 ` Michael Paquier <michael.paquier@gmail.com>
2017-04-02 15:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-04-02 17:51 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-02 22:08 ` Noah Misch <noah@leadboat.com>
2017-04-03 06:51 ` Noah Misch <noah@leadboat.com>
2017-04-03 17:18 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-04-18 02:59 ` Noah Misch <noah@leadboat.com>
2017-04-18 13:57 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
2017-01-25 15:50 ` Tomasz Szypowski <tomasz.szypowski@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox