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

From Matthias Apitz
Subject /usr/local/sisis-pap/pgsql-15.1/bin/postmaster SIGSEGV in podman container on MacOS
Date
Msg-id ZaZZXPUh7TjTCO1x@pureos
Whole thread Raw
List 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@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_64libffi7-debuginfo-3.2.1.git259-10.8.x86_64
libgmp10-debuginfo-6.1.2-4.9.1.x86_64libgnutls30-debuginfo-3.7.3-150400.4.35.1.x86_64
libhogweed6-debuginfo-3.7.3-150400.2.21.x86_64libidn2-0-debuginfo-2.2.0-3.6.1.x86_64
libjitterentropy3-debuginfo-3.4.0-150000.1.9.1.x86_64libnettle8-debuginfo-3.7.3-150400.2.21.x86_64
libp11-kit0-debuginfo-0.23.22-150400.1.10.x86_64libtasn1-6-debuginfo-4.13-150000.4.8.1.x86_64
libunistring2-debuginfo-0.9.10-1.1.x86_64pam-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@unixarea.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.



pgsql-general by date:

Previous
From: Dominique Devienne
Date:
Subject: Re: Moving to Postgresql database
Next
From: "Rossana Ocampos"
Date:
Subject: Nested-Internal Functions