#50736 RetroCL trimming may crash at shutdown if trimming configuration is invalid
Closed: wontfix by vashirov. Opened by tbordaz.

Issue Description

The crash occurs when nsslapd-changelogmaxage is invalid (like -1). In such case the trimming structures are not allocated but at shutdown they are freed

#0  0x00007f2d45960cd1 in __GI___pthread_mutex_destroy (mutex=mutex@entry=0x0) at pthread_mutex_destroy.c:30
#1  0x00007f2d45fb8e39 in PR_DestroyLock (lock=0x0) at ../../../nspr/pr/src/pthreads/ptsynch.c:155
#2  0x00007f2d384acc36 in retrocl_stop_trimming () at ldap/servers/plugins/retrocl/retrocl_trim.c:489
#3  0x00007f2d384a8eb7 in retrocl_stop (pb=<optimized out>) at ldap/servers/plugins/retrocl/retrocl.c:621
#4  0x00007f2d4820b028 in plugin_call_func (list=0x560a31b95080, operation=operation@entry=210, pb=pb@entry=0x560a4d28f1a0, call_one=call_one@entry=1) at ldap/servers/slapd/plugin.c:2028
#5  0x00007f2d4820e542 in plugin_call_one (pb=0x560a4d28f1a0, operation=210, list=<optimized out>) at ldap/servers/slapd/plugin.c:1978
#6  0x00007f2d4820e542 in plugin_dependency_closeall () at ldap/servers/slapd/plugin.c:1876
#7  0x00007f2d4820e575 in plugin_closeall (close_backends=close_backends@entry=1, close_globals=close_globals@entry=1) at ldap/servers/slapd/plugin.c:1965
#8  0x0000560a30714e84 in slapd_daemon (ports=ports@entry=0x7ffe314d0f40, tp=tp@entry=0x0) at ldap/servers/slapd/daemon.c:1279
#9  0x0000560a30705ac5 in main (argc=<optimized out>, argv=0x7ffe314d13b8) at ldap/servers/slapd/main.c:1204

Package Version and Platform

All versions

Steps to reproduce

reproducible testcase to provide.
1 - enable retroCL
2 - configure nsslapd-changelogmaxage=-1
3 - restart server
4 - do some updates (optional)
5 - stop the server

Actual results

It crashes

Expected results

Should not crash


Metadata Update from @tbordaz:
- Custom field origin adjusted to IPA
- Custom field reviewstatus adjusted to None
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1763365

PR https://pagure.io/389-ds-base/pull-request/50738

Metadata Update from @tbordaz:
- Issue assigned to tbordaz
- Issue set to the milestone: 0.0 NEEDS_TRIAGE

Fix pushed upstream

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.3.10 (was: 0.0 NEEDS_TRIAGE)

6200037e8..7e39425a9 389-ds-base-1.4.1 -> 389-ds-base-1.4.1

b1fb4bb7c..881a53f25 389-ds-base-1.4.0 -> 389-ds-base-1.4.0

b6ba77876..e415129d2 389-ds-base-1.3.10 -> 389-ds-base-1.3.10

Metadata Update from @vashirov:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3791

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

Metadata