Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1518320 - ns-slapd: crash in entrycache_add_int
Summary: ns-slapd: crash in entrycache_add_int
Keywords:
Status: ON_QA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.4
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: 7.7
Assignee: mreynolds
QA Contact: RHDS QE
URL:
Whiteboard:
: 1633111 (view as bug list)
Depends On:
Blocks: 1643875
TreeView+ depends on / blocked
 
Reported: 2017-11-28 15:51 UTC by German Parente
Modified: 2019-04-11 16:04 UTC (History)
13 users (show)

Fixed In Version: 389-ds-base-1.3.9.1-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1643875 (view as bug list)
Environment:
Last Closed:


Attachments (Terms of Use)
logs (deleted)
2018-08-20 15:23 UTC, German Parente
no flags Details
thread apply all full bt (deleted)
2018-08-20 16:08 UTC, German Parente
no flags Details
Amendment to debug patch (deleted)
2018-08-20 16:30 UTC, mreynolds
no flags Details
New debug patch to be applied on top of 389-ds-base-1.3.6.1-29bz1518320 (deleted)
2018-12-05 16:34 UTC, mreynolds
no flags Details
New debug patch to be applied on top of 389-ds-base-1.3.6.1-29 (deleted)
2018-12-10 14:40 UTC, mreynolds
no flags Details
New debug patch to be applied on top of 389-ds-base-1.3.6.1-29 (deleted)
2018-12-10 14:46 UTC, mreynolds
no flags Details

Description German Parente 2017-11-28 15:51:48 UTC
Description of problem:

crash in ns-slapd when attempting to add a dn to hash.

What is strange is that the value is attempted to be added during DEL operation (shouldn't the value be deleted from the hash ?)

My findings in private comments.

#0  __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
#1  0x00007fcb5cc9b1ec in entry_same_dn (e=<optimized out>, k=0x561251f093a0) at ldap/servers/slapd/back-ldbm/cache.c:142
#2  0x00007fcb5cc9b3ee in add_hash (ht=0x561235944000, key=key@entry=0x561251f093a0, keylen=<optimized out>, entry=entry@entry=0x56124e195440, alt=alt@entry=0x7fcb236c73d0)
    at ldap/servers/slapd/back-ldbm/cache.c:191
#3  0x00007fcb5cc9c8aa in entrycache_add_int (cache=cache@entry=0x5612358ee3c8, e=0x56124e195440, state=state@entry=2, alt=alt@entry=0x0) at ldap/servers/slapd/back-ldbm/cache.c:1297
#4  0x00007fcb5cc9cb3d in cache_add_tentative (cache=cache@entry=0x5612358ee3c8, e=<optimized out>, alt=alt@entry=0x0) at ldap/servers/slapd/back-ldbm/cache.c:1497
#5  0x00007fcb5ccd201d in ldbm_back_delete (pb=0x7fcb236c7a50) at ldap/servers/slapd/back-ldbm/ldbm_delete.c:717
#6  0x00007fcb6875efd0 in op_shared_delete (pb=pb@entry=0x7fcb236c7a50) at ldap/servers/slapd/delete.c:331
#7  0x00007fcb6875f352 in do_delete (pb=pb@entry=0x7fcb236c7a50) at ldap/servers/slapd/delete.c:97
#8  0x0000561233bd8642 in connection_dispatch_operation (pb=0x7fcb236c7a50, op=0x561237af44e0, conn=0x561237241e38) at ldap/servers/slapd/connection.c:623
#9  connection_threadmain () at ldap/servers/slapd/connection.c:1772
#10 0x00007fcb66b119bb in _pt_root (arg=0x5612371e1440) at ../../../nspr/pr/src/pthreads/ptthread.c:216
#11 0x00007fcb664b1e25 in start_thread (arg=0x7fcb236c8700) at pthread_create.c:308
#12 0x00007fcb65d9334d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113



Version-Release number of selected component (if applicable): 


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 5 wibrown@redhat.com 2017-12-01 08:03:14 UTC
Upstream ticket:
https://pagure.io/389-ds-base/issue/49477

Comment 76 joel 2018-08-15 23:41:30 UTC
Hey,

I'm handling the fts on case 01964873.

Is this patch for the cu or german? 

I know the cu already has patched their system with the other debug patches. Is there a process to remove the previous ones or will it require a new install to be setup?

thanks.

Comment 77 mreynolds 2018-08-16 00:32:18 UTC
(In reply to joel from comment #76)
> Hey,
> 
> I'm handling the fts on case 01964873.
> 
> Is this patch for the cu or german? 
> 
> I know the cu already has patched their system with the other debug patches.
> Is there a process to remove the previous ones or will it require a new
> install to be setup?
> 

It's for the customer, but it should applied on the default version of 1.3.6 that the customer was using before they applied any debug patches.  So a fresh hotfix needs to be made with this patch, and only this patch.

Comment 82 German Parente 2018-08-20 15:23:32 UTC
Created attachment 1477288 [details]
logs

Comment 86 German Parente 2018-08-20 16:08:18 UTC
Created attachment 1477295 [details]
thread apply all full bt

Comment 87 mreynolds 2018-08-20 16:30:07 UTC
Created attachment 1477309 [details]
Amendment to debug patch

Here is a small change to the current debug patch.  This should be applied on top of the last debug patch

Comment 105 Ludwig 2018-08-28 12:41:41 UTC
can you search the entry (or its tombstone) with nscpentrywsi, that should also show what was done to this entry

Comment 119 Ludwig 2018-09-13 12:50:20 UTC
but in the coredump we have:
[12/Sep/2018:13:45:16.509020958 -0300] conn=2412189 op=199100 SRCH base="cn=27263152560,ou=Nuevos,dc=abierto,dc=anses,dc=gov,dc=ar" scope=0 filter="(objectClass=*)" attrs="objectClass"
[12/Sep/2018:13:45:16.509134066 -0300] conn=2412189 op=199100 RESULT err=0 tag=101 nentries=1 etime=0

and the DEL caused the crash, so where is it gone ? was it deleted successfully after the restart ?

could you check the access logs after restart ?

Comment 138 thierry bordaz 2018-10-25 10:45:51 UTC
upstream ticket pushed (https://pagure.io/389-ds-base/issue/49967) => POST

Comment 139 German Parente 2018-10-25 15:32:16 UTC
*** Bug 1633111 has been marked as a duplicate of this bug. ***

Comment 153 mreynolds 2018-12-05 16:34:56 UTC
Created attachment 1511788 [details]
New debug patch to be applied on top of 389-ds-base-1.3.6.1-29bz1518320

Comment 161 mreynolds 2018-12-10 14:40:37 UTC
Created attachment 1513098 [details]
New debug patch to be applied on top of 389-ds-base-1.3.6.1-29

This patch contains the modrdn entry cache fix (ticket 49967), and debug logging.  It will apply on top of 389-ds-base-1.3.6.1-29

Comment 164 mreynolds 2018-12-10 14:46:03 UTC
Created attachment 1513099 [details]
New debug patch to be applied on top of 389-ds-base-1.3.6.1-29

Revised patch: contains fix for modrdn entry cache, and debug logging

Comment 168 German Parente 2018-12-26 15:59:01 UTC
*** Bug 1633111 has been marked as a duplicate of this bug. ***


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