CI: postgres service exiting with bus error
Since recently, the postgres service used in the CI of this project is not starting properly and produces an error which is pretty much the same as described here: https://github.com/docker-library/postgres/issues/451
It produces a Bus error and exits with "child process exited with exit code 135". Consequently, all tests are failing because the DB is not online. This is the complete log output of the service:
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/postgresql/data ... ok creating subdirectories ... ok selecting default max_connections ... 10 selecting default shared_buffers ... 400kB selecting default timezone ... Etc/UTC selecting dynamic shared memory implementation ... posix creating configuration files ... ok Bus error (core dumped) child process exited with exit code 135 initdb: removing contents of data directory "/var/lib/postgresql/data" running bootstrap script ...
We are using the standard docker hub postgres image version 9.6 and a few weeks ago this issue was not present in our k8s gitlab runners. The same problem appears with newer postgres versions, I have tested this already. My assumption is that something changed in the configuration of our k8s which causes the postgres initdb to fail. Most likely related to mismatching huge page configurations between k8s and host VMs.
So far, I could not find a way to start the postgres CI service with
huge_pages=off configured to force postgres NOT to use huge pages at all - not even try to use them.
Any ideas are welcome. Our VILLASweb-backend-go pipeline is broken as long as this issue is not solved.