Re: BUG #18503: Reproducible 'Segmentation fault' in 16.3 on ARM64

From: Stefan Heine <github(dot)stheine(at)heine7(dot)de>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18503: Reproducible 'Segmentation fault' in 16.3 on ARM64
Date: 2024-06-13 06:19:12
Message-ID: d3effbb4-236d-4e26-ace6-9df3c8f3af0f@heine7.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2024-06-12 23:41, Thomas Munro wrote:
> On Thu, Jun 13, 2024 at 1:47 AM Stefan Heine<github(dot)stheine(at)heine7(dot)de> wrote:
>> do you have instructions for the gdb backtrace?
> gdb /path/to/executable -c /path/to/core
> ... loads stuff ...
> (gdb) bt
> ... prints out function call stack ...
>
> It will probably just show some library names and addresses, but so
> far we don't even know if this is crashing in LLVM or in PostgreSQL
> code so that'd be a clue. Maybe function names would appear if you
> set up DEBUGINFOD_URLS, depending on where you got your packages from:
>
> https://wiki.debian.org/HowToGetABacktrace

# gdb /usr/lib/postgresql/16/bin/postgres -c core.19
GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
   <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/postgresql/16/bin/postgres...
(No debugging symbols found in /usr/lib/postgresql/16/bin/postgres)
warning: Can't open file /dev/shm/PostgreSQL.384567174 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.2343312096 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.1247406204 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.50860586 during file-backed
mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.4136010652 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.2304500154 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.817475720 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.526004662 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.1223723046 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.4190931822 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.3836724180 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.1707942452 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.4107375064 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.2885303254 during
file-backed mapping note processing
warning: Can't open file /dev/shm/PostgreSQL.4136268764 during
file-backed mapping note processing
warning: Can't open file /dev/zero (deleted) during file-backed mapping
note processing
warning: Can't open file /dev/shm/PostgreSQL.3153232120 during
file-backed mapping note processing
warning: Can't open file /SYSV03e40001 (deleted) during file-backed
mapping note processing
[New LWP 19]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
Core was generated by `postgres: sa postgres 164.99.242.100(57456)
EXPLAIN                           '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000fffe0fb635b8in ??()
(gdb) bt
#0 0x0000fffe0fb635b8in ??()
#1 0x0000aaaaefd84330in ??()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) quit

> Hoping to find time to repro this later on a cloud host. If this is a
> cloud host, can you tell me which cloud, instance type, memory size
> etc? I had already been trying on some local ARM hardware with no
> luck (same versions but diferrent OS, so going to try making more
> things match you case)...
> (I realise that the email from the other thread gives an AWS instance
> type that I can try, but that report is about memory usage and yours
> has a segfault so I'm curious to know what conditions are different
> for you..)

it's running on AWS, t4g.large, 8GB RAM. this server is running Ubuntu
22.04.3 LTS and hosting docker.
inside docker, there is a container running postgres, based on the
official postgres:16.3 (Based on Debian Bookwork) from
https://hub.docker.com/_/postgres .

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-06-13 07:02:37 BUG #18507: See C include file "ntstatus.h" for a description of the hexadecimal value.
Previous Message usman khan 2024-06-13 05:30:01 Previous command not accessible in postgres 17 beta