Bug 2172258 - ns-slapd crashing in ldbm_back_upgradednformat()
Summary: ns-slapd crashing in ldbm_back_upgradednformat()
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: 389-ds-base
Version: 11.6
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: dirsrv-11.8
Assignee: thierry bordaz
QA Contact: LDAP QA Team
Evgenia Martynyuk
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-21 18:33 UTC by Têko Mihinto
Modified: 2023-11-28 10:09 UTC (History)
8 users (show)

Fixed In Version: redhat-ds-11-8090020230808123031.4a0d6ab8
Doc Type: Bug Fix
Doc Text:
The 'upgradednformat' command was calling not fully initialized callbacks. As a consequence it triggered a crash and the command failed. Now all callbacks are initialized at startup and the command run successfully
Clone Of:
Environment:
Last Closed: 2023-11-28 10:09:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 5726 0 None open ns-slapd crashing in ldbm_back_upgradednformat 2023-04-12 13:20:11 UTC
Red Hat Issue Tracker IDMDS-2854 0 None None None 2023-03-09 16:16:11 UTC
Red Hat Product Errata RHBA-2023:7519 0 None None None 2023-11-28 10:09:38 UTC

Description Têko Mihinto 2023-02-21 18:33:55 UTC
Description of problem:
ns-slapd is crashing when trying to run upgradednformat

Version-Release number of selected component (if applicable):
$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.7 (Ootpa)
$
$ rpm -q 389-ds-base
389-ds-base-1.4.3.31-11.module+el8dsrv+17815+4f95348d.x86_64
$

How reproducible:
Always.

Steps to Reproduce:
1. Stop the instance
2. Run the upgradednformat command:
$ upgradednformat -N -n userroot  -a /var/lib/dirsrv/slapd-<INSTANCE>/db/userroot -Z <INSTANCE>
3. Check the output:
/usr/sbin/upgradednformat: line 76: 15681 Segmentation fault      (core dumped) /usr/sbin/ns-slapd upgradednformat -D /etc/dirsrv/slapd-<INSTANCE> -n "userroot" -a "/var/lib/dirsrv/slapd-<INSTANCE>/db/userroot"

Stack trace:
$ gdb /usr/sbin/ns-slapd /var/tmp/upgradednformat_core
...
Core was generated by `/usr/sbin/ns-slapd upgradednformat -D /etc/dirsrv/slapd-<INSTANCE> -n userroot -a /v'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007faa3b1aa44c in ldbm_back_upgradednformat (pb=0x5633f40f5420) at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366
366        return priv->dblayer_upgradedn_fn(pb);;
(gdb)
(gdb) where
#0  0x00007faa3b1aa44c in ldbm_back_upgradednformat (pb=0x5633f40f5420) at ldap/servers/slapd/back-ldbm/ldif2ldbm.c:366
#1  0x00005633f1fe0baf in slapd_exemode_upgradednformat (mcfg=<optimized out>) at ldap/servers/slapd/main.c:2626
#2  0x00005633f1fe0baf in main (argc=8, argv=<optimized out>) at ldap/servers/slapd/main.c:865
(gdb)

Actual results:
Crash.

Expected results:
Working command.

Additional info:
A customer was performing an upgrade.
The upgradednformat failed and left a copy of the current DB under the directory <DB_LOCATION>/dnupgrade
That caused a disk space issue.

Comment 3 thierry bordaz 2023-04-17 14:49:42 UTC
Fix pushed upstream -> POST

Comment 7 Viktor Ashirov 2023-08-25 12:27:02 UTC
Automated test passed:
================================================================= test session starts ==================================================================
platform linux -- Python 3.6.8, pytest-3.4.2, py-1.5.3, pluggy-0.6.0 -- /usr/libexec/platform-python
cachedir: dirsrvtests/.pytest_cache
389-ds-base: 1.4.3.37-1.module+el8dsrv+19621+efe8bde6
nss: 3.90.0-3.el8_8
nspr: 4.35.0-1.el8_8
openldap: 2.4.46-18.el8
cyrus-sasl: not installed
FIPS: disabled
rootdir: /mnt/tests/rhds/install/ds/dirsrvtests, inifile: pytest.ini
collected 1 item

dirsrvtests/tests/suites/upgrade/upgradednformat_test.py::test_upgradednformat PASSED                                                            [100%]

============================================================== 1 passed in 37.32 seconds ===============================================================

Marking as VERIFIED.

Comment 9 errata-xmlrpc 2023-11-28 10:09:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (redhat-ds:11 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:7519


Note You need to log in before you can comment on or make changes to this bug.