Re: BUG #16033: segmentation fault when runing update

From: Miha Vrhovnik <miha(dot)vrhovnik(at)naviter(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16033: segmentation fault when runing update
Date: 2019-10-02 15:40:35
Message-ID: 96a2b703-9e74-bc35-c700-bccbf8678c66@naviter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 02/10/2019 15:51, Tom Lane wrote:
> PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
>> We are launching a ne service and decided to test the new 12rc1
>> It happens that from time to time the postgresql crashes with segmentation
>> fault.
> We're unlikely to be able to do anything about this without more
> information. A self-contained test case would be ideal, otherwise
> maybe you could get a stack trace from the crash?
>
> https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend
>
> regards, tom lane

FYI: This is PG12 specific I've moved the service to 11.5 and it works
without problems.

Unfortunately I'd need a bit of hand holding for generating a core as
I've added the `ulimit -c unlimited` at the top of the init.d file but
to no avail.

cat /etc/init.d/postgresql
#!/bin/sh
set -e
ulimit -c unlimited

### BEGIN INIT INFO
# Provides:             postgresql
# Required-Start:       $local_fs $remote_fs $network $time
# Required-Stop:        $local_fs $remote_fs $network $time
# Should-Start:         $syslog
# Should-Stop:          $syslog
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    PostgreSQL RDBMS server
### END INIT INFO

# Setting environment variables for the postmaster here does not work;
please
# set them in /etc/postgresql/<version>/<cluster>/environment instead.

[ -r /usr/share/postgresql-common/init.d-functions ] || exit 0

. /usr/share/postgresql-common/init.d-functions

# versions can be specified explicitly
if [ -n "$2" ]; then
    versions="$2 $3 $4 $5 $6 $7 $8 $9"
else
    get_versions
fi

case "$1" in
    start|stop|restart|reload)
        if [ "$1" = "start" ]; then
            create_socket_directory
        fi
        if [ -z "`pg_lsclusters -h`" ]; then
            log_warning_msg 'No PostgreSQL clusters exist; see "man
pg_createcluster"'
            exit 0
        fi
        for v in $versions; do
            $1 $v || EXIT=$?
        done
        exit ${EXIT:-0}
        ;;
    status)
        LS=`pg_lsclusters -h`
        # no clusters -> unknown status
        [ -n "$LS" ] || exit 4
        echo "$LS" | awk 'BEGIN {rc=0} {if (match($4, "down")) rc=3;
printf ("%s/%s (port %s): %s\n", $1, $2, $3, $4)}; END {exit rc}'
        ;;
    force-reload)
        for v in $versions; do
            reload $v
        done
        ;;
    *)
        echo "Usage: $0 {start|stop|restart|reload|force-reload|status}
[version ..]"
        exit 1
        ;;
esac

exit 0

find / -name core
/dev/core
find: ‘/sys/kernel/debug’: Permission denied
find: ‘/sys/fs/pstore’: Permission denied
find: ‘/sys/fs/fuse/connections/65’: Permission denied
find: ‘/sys/fs/fuse/connections/64’: Permission denied
/proc/sys/net/core
find: ‘/proc/tty/driver’: Permission denied

BTW this is running in unprivileged LXC container.

--
Z lepimi pozdravi / with kind regards,

Miha Vrhovnik

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-10-02 15:47:45 BUG #16034: `\set ECHO all` doesn't work for \e command
Previous Message Tom Lane 2019-10-02 13:51:54 Re: BUG #16033: segmentation fault when runing update