389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
211 stars 93 forks source link

389-ds-base-1.4.4.5-1 segfaults after upgrading to Fedora 33 #4400

Closed kappa-wingman closed 2 years ago

kappa-wingman commented 4 years ago
#  gdb core.ns-slapd-27316-11-1603539451
GNU gdb (GDB) Fedora 9.2-7.fc33
Copyright (C) 2020 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 "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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"...
[New LWP 27316]
Reading symbols from /usr/lib64/samba/libiov-buf-samba4.so...
Reading symbols from /usr/lib/debug/usr/lib64/samba/libiov-buf-samba4.so-4.13.0-11.fc33.x86_64.debug...

warning: Ignoring non-absolute filename: <linux-vdso.so.1>
Missing separate debuginfo for linux-vdso.so.1
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/9b/59032724c93503cc9e111fdef9033fa767d0d1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/sbin/ns-slapd upgradednformat -D /etc/dirsrv/slapd-LOCAL-NONET -n userRoot'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f1b6efc12e8 in ldbm_back_upgradednformat (pb=0x55b65e4eafd0) at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366
366     return priv->dblayer_upgradedn_fn(pb);
Missing separate debuginfos, use: dnf debuginfo-install audit-libs-3.0-0.21.20191104git1c2f876.fc33.x86_64 cracklib-2.9.6-24.fc33.x86_64 cyrus-sasl-gssapi-2.1.27-6.fc33.x86_64 cyrus-sasl-lib-2.1.27-6.fc33.x86_64 cyrus-sasl-md5-2.1.27-6.fc33.x86_64 cyrus-sasl-plain-2.1.27-6.fc33.x86_64 cyrus-sasl-scram-2.1.27-6.fc33.x86_64 freeipa-server-4.8.10-6.fc33.x86_64 freeipa-server-trust-ad-4.8.10-6.fc33.x86_64 glibc-2.32-1.fc33.x86_64 gmp-6.2.0-5.fc33.x86_64 gnutls-3.6.15-1.fc33.x86_64 keyutils-libs-1.6-5.fc33.x86_64 krb5-libs-1.18.2-22.fc33.x86_64 libcom_err-1.45.6-4.fc33.x86_64 libdb-5.3.28-44.fc33.x86_64 libeconf-0.3.8-4.fc33.x86_64 libffi-3.1-26.fc33.x86_64 libgcc-10.2.1-5.fc33.x86_64 libgpg-error-1.37-2.fc33.x86_64 libicu-67.1-4.fc33.x86_64 libidn2-2.3.0-4.fc33.x86_64 libselinux-3.1-2.fc33.x86_64 libsss_nss_idmap-2.4.0-2.fc33.x86_64 libstdc++-10.2.1-5.fc33.x86_64 libtalloc-2.3.1-5.fc33.x86_64 libtasn1-4.16.0-3.fc33.x86_64 libunistring-0.9.10-9.fc33.x86_64 libuuid-2.36-3.fc33.x86_64 libxcrypt-4.4.17-1.fc33.x86_64 libzstd-1.4.5-5.fc33.x86_64 lz4-libs-1.9.1-3.fc33.x86_64 nspr-4.29.0-1.fc33.x86_64 nss-3.57.0-1.fc33.x86_64 nss-softokn-3.57.0-1.fc33.x86_64 nss-softokn-freebl-3.57.0-1.fc33.x86_64 nss-util-3.57.0-1.fc33.x86_64 openldap-2.4.50-5.fc33.x86_64 opensc-0.20.0-7.fc33.x86_64 openssl-libs-1.1.1g-15.fc33.x86_64 p11-kit-0.23.21-2.fc33.x86_64 p11-kit-trust-0.23.21-2.fc33.x86_64 pcre-8.44-2.fc33.x86_64 pcre2-10.35-7.fc33.x86_64 pcsc-lite-libs-1.9.0-2.fc33.x86_64 slapi-nis-0.56.5-3.fc33.x86_64 softhsm-2.6.1-3.fc33.4.x86_64 sssd-client-2.4.0-2.fc33.x86_64 systemd-libs-246.6-3.fc33.x86_64 xz-libs-5.2.5-3.fc33.x86_64
(gdb) bt
#0  0x00007f1b6efc12e8 in ldbm_back_upgradednformat (pb=0x55b65e4eafd0) at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366
#1  0x000055b65daf409e in ?? ()
#2  0x0000000000000000 in ?? ()

It was running ok with the previous 389-ds version.

mreynolds389 commented 4 years ago

Sorry that stack trace is useless. Can you please install the debuginfo package and devel packages for 389-ds-base so the next time it crashes we can get a useful stack trace? Also how are you reproducing this crash?

kappa-wingman commented 4 years ago

I had installed all the debuginfo packages requested by gdb. Below is the latest result:

gdb core.ns-slapd-27316-11-1603539451

GNU gdb (GDB) Fedora 9.2-7.fc33 Copyright (C) 2020 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 "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://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"... [New LWP 27316] Reading symbols from /usr/lib64/samba/libiov-buf-samba4.so... Reading symbols from /usr/lib/debug/usr/lib64/samba/libiov-buf-samba4.so-4.13.0-11.fc33.x86_64.debug... [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/sbin/ns-slapd upgradednformat -D /etc/dirsrv/slapd-LOCAL-NONET -n userRoot'. Program terminated with signal SIGSEGV, Segmentation fault.

0 0x00007f1b6efc12e8 in ldbm_back_upgradednformat (pb=0x55b65e4eafd0)

at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366

--Type for more, q to quit, c to continue without paging-- 366 return priv->dblayer_upgradedn_fn(pb); (gdb) bt

0 0x00007f1b6efc12e8 in ldbm_back_upgradednformat (pb=0x55b65e4eafd0)

at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366

1 0x000055b65daf409e in ?? ()

2 0x0000000000000000 in ?? ()

FYI too:

rpm -qa | grep 389-ds

389-ds-base-libs-1.4.4.5-1.fc33.x86_64 389-ds-base-1.4.4.5-1.fc33.x86_64 389-ds-base-legacy-tools-1.4.4.5-1.fc33.x86_64 389-ds-base-debugsource-1.4.4.5-1.fc33.x86_64 389-ds-base-debuginfo-1.4.4.5-1.fc33.x86_64 389-ds-base-libs-debuginfo-1.4.4.5-1.fc33.x86_64

I was using Fedora 33 beta just before that. Just now several package updates (including 389-ds) are available in the stable/release channel. So I updated all the packages just now. The segfaults occurs when it is upgrading the RPM.

Firstyear commented 4 years ago

From that can you show the output of "thread apply bt full" and then add the output as a file attachment so we can look at?

On 25 Oct 2020, at 00:32, Kappa notifications@github.com wrote:

I had installed all the debuginfo packages requested by gdb. Below is the latest result:

gdb core.ns-slapd-27316-11-1603539451

GNU gdb (GDB) Fedora 9.2-7.fc33 Copyright (C) 2020 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 "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://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"... [New LWP 27316] Reading symbols from /usr/lib64/samba/libiov-buf-samba4.so... Reading symbols from /usr/lib/debug/usr/lib64/samba/libiov-buf-samba4.so-4.13.0-11.fc33.x86_64.debug... [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/sbin/ns-slapd upgradednformat -D /etc/dirsrv/slapd-LOCAL-NONET -n userRoot'. Program terminated with signal SIGSEGV, Segmentation fault.

0 0x00007f1b6efc12e8 in ldbm_back_upgradednformat (pb=0x55b65e4eafd0)

at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366 --Type for more, q to quit, c to continue without paging-- 366 return priv->dblayer_upgradedn_fn(pb); (gdb) bt

0 0x00007f1b6efc12e8 in ldbm_back_upgradednformat (pb=0x55b65e4eafd0)

at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366

1 0x000055b65daf409e in ?? ()

2 0x0000000000000000 in ?? ()

I was using Fedora 33 beta just before that. Just now several package updates (including 389-ds) are available in the stable/release channel. So I updated all the packages just now. The segfaults occurs when it is upgrading the RPM.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

— Sincerely,

William Brown

Senior Software Engineer, 389 Directory Server SUSE Labs, Australia

kappa-wingman commented 4 years ago

I got a reply of invalid thread ID: (gdb) thread apply bt full Invalid thread ID: bt full

Below is the full output. I also tried with "thread apply all bt".

gdb core.ns-slapd-27280-11-1603539450

GNU gdb (GDB) Fedora 9.2-7.fc33 Copyright (C) 2020 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 "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://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"... [New LWP 27280] Reading symbols from /usr/lib64/samba/libiov-buf-samba4.so... Reading symbols from /usr/lib/debug/usr/lib64/samba/libiov-buf-samba4.so-4.13.0-11.fc33.x86_64.debug... [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/sbin/ns-slapd upgradednformat -D /etc/dirsrv/slapd-LOCAL-NONET -n changelo'. --Type for more, q to quit, c to continue without paging-- Program terminated with signal SIGSEGV, Segmentation fault.

0 0x00007f418bce42e8 in ldbm_back_upgradednformat (pb=0x5644210aefd0)

at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366

366 return priv->dblayer_upgradedn_fn(pb); (gdb) thread apply bt full Invalid thread ID: bt full (gdb) Invalid thread ID: bt full (gdb) thread apply all bt

Thread 1 (Thread 0x7f418f63d8c0 (LWP 27280)):

0 0x00007f418bce42e8 in ldbm_back_upgradednformat (pb=0x5644210aefd0) at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366

1 0x00005644204a909e in ?? ()

2 0x0000000000000000 in ?? ()

(gdb)

mreynolds389 commented 4 years ago

You still don't have any symbols in the stack trace. So it doesn't look like you installed the correct debuginfo and devel packages. Please provide the output from this command:

rpm -qa | grep 389-ds-base
kappa-wingman commented 4 years ago

Hey, I had already provided the rpm packages related to 389-ds in my reply yesterday (https://github.com/389ds/389-ds-base/issues/4400#issuecomment-715923384).

I attach it again here:

$ rpm -qa | grep 389-ds-base | sort 389-ds-base-1.4.4.5-1.fc33.x86_64 389-ds-base-debuginfo-1.4.4.5-1.fc33.x86_64 389-ds-base-debugsource-1.4.4.5-1.fc33.x86_64 389-ds-base-legacy-tools-1.4.4.5-1.fc33.x86_64 389-ds-base-libs-1.4.4.5-1.fc33.x86_64 389-ds-base-libs-debuginfo-1.4.4.5-1.fc33.x86_64

vashirov commented 4 years ago

I can reproduce this on a fresh instance. As mentioned in the description, it happens during upgradednformat:

# /usr/sbin/ns-slapd upgradednformat -D /etc/dirsrv/slapd-server-f33 -n userRoot -a /var/lib/dirsrv/slapd-server-f33/db/
Segmentation fault (core dumped)

[root@server-f33 ds]# gdb -q --args /usr/sbin/ns-slapd upgradednformat -D /etc/dirsrv/slapd-server-f33 -n userRoot -a /var/lib/dirsrv/slapd-server-f33/db/
Reading symbols from /usr/sbin/ns-slapd...
Reading symbols from .gnu_debugdata for /usr/sbin/ns-slapd...
(No debugging symbols found in .gnu_debugdata for /usr/sbin/ns-slapd)
(gdb) r
Starting program: /usr/sbin/ns-slapd upgradednformat -D /etc/dirsrv/slapd-server-f33 -n userRoot -a /var/lib/dirsrv/slapd-server-f33/db/
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007f799c1452e8 in ldbm_back_upgradednformat () from /usr/lib64/dirsrv/plugins/libback-ldbm.so
(gdb) bt 
#0  0x00007f799c1452e8 in ldbm_back_upgradednformat () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#1  0x000055a3f432c09e in main ()
(gdb) thread apply all bt

Thread 1 (Thread 0x7f799e8b48c0 (LWP 427)):
#0  0x00007f799c1452e8 in ldbm_back_upgradednformat () at /usr/lib64/dirsrv/plugins/libback-ldbm.so
#1  0x000055a3f432c09e in main ()
(gdb) 

That's the whole stack trace.

mreynolds389 commented 4 years ago

Ok, so the problem is the old perl installer is running the old upgrade scripts which are no longer valid with the new DB format in 1.4.4. The next build of 1.4.4 will not use the old upgrade code in the specfile. So while I do have a fix for this, it doesn't matter because I just pushed a different change earlier today that removes those scripts and should fix this bug as a side effect.

Guess it's time to do a new 1.4.4 build...