Bug 236025

Summary: databases/postgresql11-server : exited on signal 10
Product: Ports & Packages Reporter: korsani
Component: Individual Port(s)Assignee: pgsql
Status: Closed Not A Bug    
Severity: Affects Only Me CC: andrew, girgen
Priority: --- Flags: bugzilla: maintainer-feedback? (pgsql)
Version: Latest   
Hardware: i386   
OS: Any   

Description korsani 2019-02-25 12:47:49 UTC
Hi,

I was running postgresql 11.1 without troubles.
As soon as I installed postgresql 11.2, process died with core dump and signal 10

My cpu :
hw.machine: i386
hw.model: Intel(R) Pentium(R) 4 CPU 2.66GHz
hw.ncpu: 1
hw.machine_arch: i386

Is there anything else I can investigate to help resolution ?
Comment 1 korsani 2019-02-25 13:57:16 UTC
I must precise: I forgot to dump/restore database between 11.1 -> 11.2 migration #oops
So, I rolled back to 11.1, dump, installed 11.2, and ... signal 10 again when I restore database :/
Comment 2 Palle Girgensohn freebsd_committer freebsd_triage 2019-02-25 14:15:05 UTC
Hi!

There is no need for dump+restore between minor versions, 11.1 -> 11.2 is consider a minor upgrade.

There are some postgres extension that need to be recompiled though. Which ones are you using? Are you running any third party extension or any you've written?

There was a heated debate about this:

--
One worthwhile note for v11 is that extension that use heap_getattr()
need to be recompiled (because it was broken for fast defaults). And
that extensions recompiled against v11.2 will probably not load into
earlier minor releases, because heap_getattr() will reference
getmissingattr(), which previously was static.

--

Maybe you've been bitten?

If not, do you get a core dump? Can you get a trace from it?

Palle
Comment 3 korsani 2019-02-26 22:38:58 UTC
Hi,

\dx gives me :
template1=# \dx
                 List of installed extensions
  Name   | Version |   Schema   |         Description
---------+---------+------------+------------------------------
 plpgsql | 1.0     | pg_catalog | PL/pgSQL procedural language


And for gdb:

# gdb postgres postgres.core                                                                                            
GNU gdb 6.1.1 [FreeBSD]                                                                                                                                                     
Copyright 2004 Free Software Foundation, Inc.                                                                                                                               
GDB is free software, covered by the GNU General Public License, and you are                                                                                                
welcome to change it and/or distribute copies of it under certain conditions.                                                                                               
Type "show copying" to see the conditions.                                                                                                                                  
There is absolutely no warranty for GDB.  Type "show warranty" for details.                                                                                                 
This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)...                                                                                          
Core was generated by `postgres: startup  '.                                                                                                                                
Program terminated with signal 10, Bus error.                                                                                                                               
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.                                                                                                
Loaded symbols for /lib/libthr.so.3                                                                                                                                         
Reading symbols from /usr/local/lib/libintl.so.8...(no debugging symbols found)...done.                                                                                     
Loaded symbols for /usr/local/lib/libintl.so.8                                                                                                                              
Reading symbols from /usr/local/lib/libssl.so.46...(no debugging symbols found)...done.                                                                                     
Loaded symbols for /usr/local/lib/libssl.so.46                                                                                                                              
Reading symbols from /usr/local/lib/libcrypto.so.44...(no debugging symbols found)...done.                                                                                  
Loaded symbols for /usr/local/lib/libcrypto.so.44                                                                                                                           
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.                                                                                                  
Loaded symbols for /lib/libm.so.5                                                                                                                                           
Reading symbols from /usr/local/lib/libldap-2.4.so.2...(no debugging symbols found)...done.                                                                                 
Loaded symbols for /usr/local/lib/libldap-2.4.so.2                                                                                                                          
Reading symbols from /usr/local/lib/libicui18n.so.63...(no debugging symbols found)...done.                                                                                 
Loaded symbols for /usr/local/lib/libicui18n.so.63                                                                                                                          
Reading symbols from /usr/local/lib/libicuuc.so.63...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libicuuc.so.63
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/liblber-2.4.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/liblber-2.4.so.2
Reading symbols from /usr/local/lib/libicudata.so.63...
warning: Lowest section in /usr/local/lib/libicudata.so.63 is .hash at 000000b4
(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libicudata.so.63
Reading symbols from /usr/lib/libc++.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc++.so.1
Reading symbols from /lib/libcxxrt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libcxxrt.so.1
Reading symbols from /usr/local/lib/gcc8/libgcc_s.so.1...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc8/libgcc_s.so.1]
Reading symbols from /usr/lib/i18n/libiconv_std.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i18n/libiconv_std.so.4
Reading symbols from /usr/lib/i18n/libUTF8.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i18n/libUTF8.so.4
Reading symbols from /usr/lib/i18n/libmapper_646.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i18n/libmapper_646.so.4
Reading symbols from /usr/local/lib/nss_ldap.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/nss_ldap.so.1
Reading symbols from /usr/local/lib/libsasl2.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libsasl2.so.3
Reading symbols from /usr/lib/libkrb5.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libkrb5.so.11
Reading symbols from /usr/lib/libcom_err.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libcom_err.so.5
Reading symbols from /usr/lib/libgssapi_krb5.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.10
Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libasn1.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libasn1.so.11
Reading symbols from /lib/libcrypt.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.5
Reading symbols from /lib/libcrypto.so.8...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypto.so.8
Reading symbols from /usr/lib/libhx509.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libhx509.so.11
Reading symbols from /usr/lib/libroken.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libroken.so.11
Reading symbols from /usr/lib/libwind.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libwind.so.11
Reading symbols from /usr/lib/libheimbase.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libheimbase.so.11
Reading symbols from /usr/lib/libprivateheimipcc.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libprivateheimipcc.so.11
Reading symbols from /usr/lib/libgssapi.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgssapi.so.10
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x081382eb in XLogReadRecord ()
Comment 4 Palle Girgensohn freebsd_committer freebsd_triage 2019-02-27 10:31:14 UTC
(In reply to korsani from comment #3)

I take it you install from a prebuilt package since your machine is not very powerful?

Could you please run `bt` in the gdb prompt to get a backtrace?

Regards,
Palle
Comment 5 korsani 2019-02-27 22:30:45 UTC
Hi,

No, I'm compiling it :) It take 17min to compile the postgresql server!

Here the bt:
(gdb) bt
#0  0x0813825b in XLogReadRecord ()
#1  0x0812689e in UpdateControlFile ()
#2  0x08126df5 in UpdateControlFile ()
/usr/src/contrib/gdb/gdb/dwarf2-frame.c:832: internal-error: Unknown register rule.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

And them gdb wants to core dump...
Comment 6 Palle Girgensohn freebsd_committer freebsd_triage 2019-02-27 22:44:17 UTC
OK,

So which version of FreeBSD? What options are set when you build the server? Are the options the same as for the previously built version 11.1?

Since gdb crashes, is your tool chain (compiler, linker etc) the same as it was when the working 11.1 version was built?
Comment 7 korsani 2019-02-28 23:05:40 UTC
Okay...

Trying to provide you informations on the compilation, I found that line in my /etc/make.conf :

CFLAGS+=-msse2

I remember it was to fix a bug of postgresql compilation claming gcc.

I removed that line, to try.

And no core dump anymore, for now.

So, I close this bug :)
Comment 8 korsani 2019-03-01 08:39:11 UTC
Hi,

To answer :
# uname -a
FreeBSD corum 11.2-RELEASE-p7 FreeBSD 11.2-RELEASE-p7 #0: Tue Dec 18 08:24:48 UTC 2018     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

# pkg info postgresql11-server
Options        :
        DEBUG          : on
        DOCS           : off
        DTRACE         : off
        GSSAPI         : off
        INTDATE        : on
        LDAP           : on
        LLVM           : off
        NLS            : on
        OPTIMIZED_CFLAGS: off
        PAM            : off
        SSL            : on
        TZDATA         : on
        XML            : off
Shared Libs required:
        libintl.so.8
        libicui18n.so.63
        libicuuc.so.63
        libldap-2.4.so.2
        libcrypto.so.44
        libpq.so.5
        libssl.so.46

pg 11.1 and 11.2 Compiled with gcc 8.3.0
Comment 9 Andrew "RhodiumToad" Gierth 2019-03-08 12:43:53 UTC
(In reply to korsani from comment #5)

Hi, is it possible that you still have this core dump and could run the GDB command 'info reg' on it?
Comment 10 korsani 2019-03-11 17:37:11 UTC
Hi,

Meanwhile... I upgraded to freebsd 12.

I didn't kept the core dump, and couldn't reproduce the bug, even with

CFLAGS+=-msse2

in /etc/make.conf

Sorry
Comment 11 Andrew "RhodiumToad" Gierth 2019-03-11 22:38:13 UTC
(In reply to korsani from comment #10)

OK, no problem. Just wanted to confirm my analysis of this issue from someone else's report.
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-26 10:08:37 UTC
Adjust resolution for now, not a bug, given comment 7. FIXED is used for resolution by way of a change, eg a commit.

If someone can still reproduce, or produce a test case / reproducer, please re-open this issue with additional detail.