[scl.org] rhel-8/postgresql with huge pages

Ricardo Maraschini rmarasch at redhat.com
Wed Dec 15 09:16:00 UTC 2021


Hello,

When I attempt to use the image rhel8/postgresql-10 in an OpenShift 4.x
cluster whose nodes have huge pages enabled it crashes with the following
message:

"running bootstrap script ... child process was terminated by signal 7: Bus
error"

This seems to be related to an existing issue [1]. My conclusion is that if
I want to run this image in such a cluster I'm gonna need to disable huge
pages in the postgres config, is that correct?

What would be the correct way of doing this? I overwrote postgres sample
config inside the image (added huge_pages=off to it) and that got postgres
running but I still see a few bus errors during initdb (seems like initdb
runs using an empty postgres config and I could not figure out a way of
passing -c huge_pages=off to it).

[1] https://github.com/opencontainers/runtime-spec/issues/1050

Thanks for your help, follow the full log I see when starting the image
(without overwriting the sample config):

The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/pgsql/data/userdata ... ok
creating subdirectories ... ok
selecting default max_connections ... sh: line 1:    22 Bus error
    (core dumped) "/usr/bin/postgres" --boot -x0 -F -c max_connections=100
-c shared_buffers=1000 -c dynamic_shared_memory_type=none < "/dev/null" >
"/dev/null" 2>&1
sh: line 1:    24 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=50 -c shared_buffers=500 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    26 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=40 -c shared_buffers=400 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    28 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=30 -c shared_buffers=300 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    30 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=200 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
20
selecting default shared_buffers ... sh: line 1:    32 Bus error
    (core dumped) "/usr/bin/postgres" --boot -x0 -F -c max_connections=20
-c shared_buffers=16384 -c dynamic_shared_memory_type=none < "/dev/null" >
"/dev/null" 2>&1
sh: line 1:    34 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=8192 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    36 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=4096 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    38 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=3584 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    40 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=3072 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    42 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=2560 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    44 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=2048 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    46 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=1536 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    48 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=1000 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    50 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=900 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    52 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=800 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    54 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=700 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    56 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=600 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    58 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=500 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    60 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=400 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    62 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=300 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    64 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=200 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    66 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=100 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
sh: line 1:    68 Bus error               (core dumped) "/usr/bin/postgres"
--boot -x0 -F -c max_connections=20 -c shared_buffers=50 -c
dynamic_shared_memory_type=none < "/dev/null" > "/dev/null" 2>&1
400kB
selecting default timezone ... Etc/UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... child process was terminated by signal 7: Bus
error
initdb: removing contents of data directory "/var/lib/pgsql/data/userdata"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/sclorg/attachments/20211215/65d30e09/attachment.htm>


More information about the SCLorg mailing list