pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook
5+ messages / 4 participants
[nested] [flat]
* BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook
@ 2023-06-27 20:27 PG Bug reporting form <noreply@postgresql.org>
2023-06-27 21:06 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Joe Conway <mail@joeconway.com>
2023-06-27 21:24 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Andres Freund <andres@anarazel.de>
0 siblings, 2 replies; 5+ messages in thread
From: PG Bug reporting form @ 2023-06-27 20:27 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: eng.khaledghazy@gmail.com
The following bug has been logged on the website:
Bug reference: 18003
Logged by: khaled ghazy
Email address: eng.khaledghazy@gmail.com
PostgreSQL version: 15.3
Operating system: Red Hat Enterprise Linux 8
Description:
Jun 27 23:21:18 hq-pgsql-test01 postmaster[1491680]: 2023-06-27 23:21:18.874
EEST [1491680] LOG: pgaudit extension initialized
Jun 27 23:21:18 hq-pgsql-test01 postmaster[1491680]: 2023-06-27 23:21:18.876
EEST [1491680] FATAL: cannot request additional shared memory outside
shmem_request_hook
Jun 27 23:21:18 hq-pgsql-test01 postmaster[1491680]: 2023-06-27 23:21:18.876
EEST [1491680] LOG: database system is shut down
Jun 27 23:21:18 hq-pgsql-test01 systemd[1]: postgresql-15.service: Main
process exited, code=exited, status=1/FAILURE
Jun 27 23:21:18 hq-pgsql-test01 systemd[1]: postgresql-15.service: Failed
with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- The unit postgresql-15.service has entered the 'failed' state with result
'exit-code'.
Jun 27 23:21:18 hq-pgsql-test01 systemd[1]: Failed to start PostgreSQL 15
database server.
-- Subject: Unit postgresql-15.service has failed
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook
2023-06-27 20:27 BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook PG Bug reporting form <noreply@postgresql.org>
@ 2023-06-27 21:06 ` Joe Conway <mail@joeconway.com>
1 sibling, 0 replies; 5+ messages in thread
From: Joe Conway @ 2023-06-27 21:06 UTC (permalink / raw)
To: eng.khaledghazy@gmail.com; pgsql-bugs@lists.postgresql.org
On 6/27/23 16:27, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 18003
> Logged by: khaled ghazy
> Email address: eng.khaledghazy@gmail.com
> PostgreSQL version: 15.3
> Operating system: Red Hat Enterprise Linux 8
> Description:
>
> Jun 27 23:21:18 hq-pgsql-test01 postmaster[1491680]: 2023-06-27 23:21:18.874
> EEST [1491680] LOG: pgaudit extension initialized
> Jun 27 23:21:18 hq-pgsql-test01 postmaster[1491680]: 2023-06-27 23:21:18.876
> EEST [1491680] FATAL: cannot request additional shared memory outside
> shmem_request_hook
What extensions are you loading after pgaudit?
--
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook
2023-06-27 20:27 BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook PG Bug reporting form <noreply@postgresql.org>
@ 2023-06-27 21:24 ` Andres Freund <andres@anarazel.de>
2023-06-27 21:44 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 5+ messages in thread
From: Andres Freund @ 2023-06-27 21:24 UTC (permalink / raw)
To: eng.khaledghazy@gmail.com; pgsql-bugs@lists.postgresql.org
Hi,
On 2023-06-27 20:27:42 +0000, PG Bug reporting form wrote:
> Jun 27 23:21:18 hq-pgsql-test01 postmaster[1491680]: 2023-06-27 23:21:18.874
> EEST [1491680] LOG: pgaudit extension initialized
> Jun 27 23:21:18 hq-pgsql-test01 postmaster[1491680]: 2023-06-27 23:21:18.876
> EEST [1491680] FATAL: cannot request additional shared memory outside
> shmem_request_hook
pgaudit prints "pgaudit extension initialized" at the end of _PG_init():
https://github.com/pgaudit/pgaudit/blob/master/pgaudit.c#L2254
So it's likely not pgaudit. What is shared_preload_libraries set to?
Unfortunately we only print library names after loading them, even at debug
level. But we do print information while searching libraries if you change
log_min_messages to debug3. Could you reproduce the issue with that and show
us the log messages?
That's not going to help you / the reporter, but to make issues like this
easier to debug in the future, I think we should
a) install an error context in load_libraries() printing the GUC name and
b) install an error context in internal_load_library() printing the name of
the shared library name
The reason for doing both a) and b) is that a) makes it easier to figure out
the cause of the library being loaded and b) would also work when the library
is loaded for a different reason, e.g. due to executing a function residing in
the library.
A bit surprised that we don't have that already.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook
2023-06-27 20:27 BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook PG Bug reporting form <noreply@postgresql.org>
2023-06-27 21:24 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Andres Freund <andres@anarazel.de>
@ 2023-06-27 21:44 ` Tom Lane <tgl@sss.pgh.pa.us>
2023-06-28 00:03 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2023-06-27 21:44 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: eng.khaledghazy@gmail.com; pgsql-bugs@lists.postgresql.org
Andres Freund <andres@anarazel.de> writes:
> That's not going to help you / the reporter, but to make issues like this
> easier to debug in the future, I think we should
> a) install an error context in load_libraries() printing the GUC name and
> b) install an error context in internal_load_library() printing the name of
> the shared library name
+1. I'm not sure this specific issue justifies it, but it seems like that
might make it easier to diagnose other shared-library-load-time issues
as well.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook
2023-06-27 20:27 BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook PG Bug reporting form <noreply@postgresql.org>
2023-06-27 21:24 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Andres Freund <andres@anarazel.de>
2023-06-27 21:44 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Tom Lane <tgl@sss.pgh.pa.us>
@ 2023-06-28 00:03 ` Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 5+ messages in thread
From: Andres Freund @ 2023-06-28 00:03 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: eng.khaledghazy@gmail.com; pgsql-bugs@lists.postgresql.org
Hi,
On 2023-06-27 17:44:57 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > That's not going to help you / the reporter, but to make issues like this
> > easier to debug in the future, I think we should
> > a) install an error context in load_libraries() printing the GUC name and
> > b) install an error context in internal_load_library() printing the name of
> > the shared library name
>
> +1. I'm not sure this specific issue justifies it, but it seems like that
> might make it easier to diagnose other shared-library-load-time issues
> as well.
I started a separate thread on -hackers for that topic. See
https://www.postgresql.org/message-id/20230628000307.rf6jnv4v4zyf6dqg%40awork3.anarazel.de
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2023-06-28 00:03 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 20:27 BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook PG Bug reporting form <noreply@postgresql.org>
2023-06-27 21:06 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Joe Conway <mail@joeconway.com>
2023-06-27 21:24 ` Andres Freund <andres@anarazel.de>
2023-06-27 21:44 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Tom Lane <tgl@sss.pgh.pa.us>
2023-06-28 00:03 ` Re: BUG #18003: FATAL: cannot request additional shared memory outside shmem_request_hook Andres Freund <andres@anarazel.de>
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