Bug 1561224

Summary: With nunc-stans off ns-slapd segfaults at shutdown
Product: Red Hat Enterprise Linux 7 Reporter: Viktor Ashirov <vashirov>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED DUPLICATE QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: nkinder, rmeggins, tbordaz, vashirov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-23 15:47:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Tentative patch none

Description Viktor Ashirov 2018-03-27 22:31:40 UTC
Description of problem:
With nsslapd-enable-nunc-stans: off in cn=config, ns-slapd segfaults at shutdown.

Version-Release number of selected component (if applicable):
389-ds-base-1.3.7.5-18.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. Create new instance
2. Set nsslapd-enable-nunc-stans: off in cn=config
3. Stop the server

Actual results:

Mar 27 18:17:13 server.example.com ns-slapd[25056]: [27/Mar/2018:18:17:13.070992660 -0400] - INFO - op_thread_cleanup - slapd shutting down - signaling operation threads - op st
Mar 27 18:17:13 server.example.com kernel: ns-slapd[25056]: segfault at 10 ip 00007f1ae7419200 sp 00007ffe59ac9cb8 error 4 in libnunc-stans.so.0.1.0[7f1ae7417000+6000]
Mar 27 18:17:13 server.example.com systemd[1]: dirsrv: main process exited, code=killed, status=11/SEGV

(gdb) bt
#0  0x00007fd3345ff200 in ns_thrpool_is_shutdown (tp=tp@entry=0x0) at src/nunc-stans/ns/ns_thrpool.c:173
#1  0x00007fd33460049e in ns_thrpool_shutdown (tp=tp@entry=0x0) at src/nunc-stans/ns/ns_thrpool.c:1572
#2  0x0000563acab34d0b in slapd_daemon (ports=ports@entry=0x7ffdfeebb420, tp=tp@entry=0x0) at ldap/servers/slapd/daemon.c:1200
#3  0x0000563acab2680f in main (argc=<optimized out>, argv=0x7ffdfeebb898) at ldap/servers/slapd/main.c:1200


Expected results:
Server should not crash.

Additional info:

Comment 2 thierry bordaz 2018-03-28 08:24:08 UTC
Created attachment 1414064 [details]
Tentative patch

Comment 5 thierry bordaz 2018-04-23 13:29:19 UTC
Upstream ticket is https://pagure.io/389-ds-base/issue/49648