Closed kappa-wingman closed 2 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?
I had installed all the debuginfo packages requested by gdb. Below is the latest result:
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.
at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366
--Type
at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366
FYI too:
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.
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
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".
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
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)):
(gdb)
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
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
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.
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...
It was running ok with the previous 389-ds version.