/usr/local/sisis-pap/pgsql-15.1/bin/postmaster SIGSEGV in podman container on MacOS

From: Matthias Apitz <guru(at)unixarea(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: /usr/local/sisis-pap/pgsql-15.1/bin/postmaster SIGSEGV in podman container on MacOS
Date: 2024-01-16 10:24:28
Message-ID: ZaZZXPUh7TjTCO1x@pureos
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello,

I've built a podman container on MacOS which includes

- a SuSE amd64 OS from registry.suse.com/bci/bci-base:15.4

- enough installed commands:
vim openssh-server tar gzip which awk libgnutls30 glibc-locale
strace telnet openssh-clients lsof gdb

- installed our application packes, one of them brings our own compiled
PostgreSQL 15 below /usr/local/sisis-pap/pgsql-15.1

- our own applications

After starting the container on my MacBook Pro with

$ podman run -p 2022:22 -t suse

I can SSH into the container with:

$ ssh -p 2022 root(at)localhost

and I see the following problem:

Our C-written applications are starting fine, as this log file shows:

sisis@:/home/sisis> tail /var/spool/sisis/catserver/log/catserver.log
16.01.2024 10:57:07.990 ===========================================================
16.01.2024 10:57:07.990
16.01.2024 10:57:07.990 SLNP Server
16.01.2024 10:57:07.990
16.01.2024 10:57:07.990 -----------------------------------------------------------
16.01.2024 10:57:07.990
16.01.2024 10:57:07.990 CATServer <392> : started at : 16.01.2024 10:57:07

16.01.2024 10:57:08.063 SLNP-Demon CATServer <392> : Error in Open Database <sisis>: rc1:999 rc2:0 rc3:-402

The server can't open the database per ESQL/C because the PostgreSQL
server is not running:

:/root # ps ax
PID TTY STAT TIME COMMAND
1 pts/0 Ssl+ 0:00 /usr/bin/qemu-x86_64-static /bin/sh -c /usr/local/b
43 pts/0 Sl+ 0:00 /usr/bin/qemu-x86_64-static /usr/sbin/sshd -D
67 ? Ssl 0:00 /usr/bin/qemu-x86_64-static /usr/sbin/sshd -D -R
72 pts/1 Ssl 0:00 /usr/bin/qemu-x86_64-static /bin/bash
416 ? Rl+ 0:00 /usr/bin/ps ax

The reason for this is:

gdb /usr/local/sisis-pap/pgsql-15.1/bin/postmaster /data/postgresql151/data/qemu_postgres_20240116-094342_12.core
GNU gdb (GDB; SUSE Linux Enterprise 15) 12.1
...
Core was generated by `/usr/local/sisis-pap/pgsql-15.1/bin/postmaster -D /data/postgresql151/data'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00002aaaab8f9b4d in rand_pool_add_additional_data ()
from /usr/local/sisis-pap/lib/libcrypto.so.1.1
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.31-150300.63.1.x86_64 libaudit1-debuginfo-3.0.6-150400.4.13.1.x86_64 libffi7-debuginfo-3.2.1.git259-10.8.x86_64 libgmp10-debuginfo-6.1.2-4.9.1.x86_64 libgnutls30-debuginfo-3.7.3-150400.4.35.1.x86_64 libhogweed6-debuginfo-3.7.3-150400.2.21.x86_64 libidn2-0-debuginfo-2.2.0-3.6.1.x86_64 libjitterentropy3-debuginfo-3.4.0-150000.1.9.1.x86_64 libnettle8-debuginfo-3.7.3-150400.2.21.x86_64 libp11-kit0-debuginfo-0.23.22-150400.1.10.x86_64 libtasn1-6-debuginfo-4.13-150000.4.8.1.x86_64 libunistring2-debuginfo-0.9.10-1.1.x86_64 pam-debuginfo-1.3.0-150000.6.61.1.x86_64
(gdb) bt
#0 0x00002aaaab8f9b4d in rand_pool_add_additional_data ()
from /usr/local/sisis-pap/lib/libcrypto.so.1.1
#1 0x00002aaaab8f8371 in rand_drbg_get_additional_data ()
from /usr/local/sisis-pap/lib/libcrypto.so.1.1
#2 0x00002aaaab8f7291 in RAND_DRBG_bytes ()
from /usr/local/sisis-pap/lib/libcrypto.so.1.1
#3 0x0000000000b1a11a in pg_strong_random ()
#4 0x000000000087a460 in RandomCancelKey ()
#5 0x000000000087af71 in assign_backendlist_entry ()
#6 0x000000000087acdc in do_start_bgworker ()
#7 0x000000000087b20f in maybe_start_bgworkers ()
#8 0x00000000008780c3 in reaper ()
#9 <signal handler called>
#10 0x00002aaaac50e076 in select () from /lib64/libc.so.6
#11 0x000000000087625b in ServerLoop ()
#12 0x0000000000875c4e in PostmasterMain ()
#13 0x00000000007894a1 in main ()
(gdb) quit
:/root # date
Di 16. Jan 10:11:33 UTC 2024

:/root # uname -a
Linux 0a6d5e158921 6.6.8-200.fc39.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Dec 21 04:21:07 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Any idea what could be missing here?

Only btw: The container built on RedHat runs fine on RedHat and also on
SuSE Linux when the container gets pushed from RedHat to SuSE, i.e.
without rebuilding it.

--
Matthias Apitz, ✉ guru(at)unixarea(dot)de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

I am not at war with Russia. Я не воюю с Россией.
Ich bin nicht im Krieg mit Russland.

Browse pgsql-general by date

  From Date Subject
Next Message Rossana Ocampos 2024-01-16 12:15:43 Nested-Internal Functions
Previous Message Dominique Devienne 2024-01-16 08:06:33 Re: Moving to Postgresql database