RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 979170 - ruv modify context problem with cache_replace
Summary: ruv modify context problem with cache_replace
Keywords:
Status: CLOSED DUPLICATE of bug 972976
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Sankar Ramalingam
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-27 19:50 UTC by Rich Megginson
Modified: 2020-09-13 20:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-28 19:58:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 741 0 None None None 2020-09-13 20:36:58 UTC

Description Rich Megginson 2013-06-27 19:50:58 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47404

This causes errors like this in the errors log:

ldbm_back_add: modify_switch_entries failed
and
ldbm_back_modify: modify_switch_entries failed

The problem is that the struct _modify_context->old_entry can be removed from the cache between the call to ldbm_txn_ruv_modify_context() and the call to modify_switch_entries(), by a BETXN PRE Op plugin.  Consider the following:

{{{
outer add:
ldbm_txn_ruv_modify_context:
mc->old_e = cached RUV ID = N DN = A
mc->new_e = not cached
  betxnpreop - inner mod
  ldbm_txn_ruv_modify_context:
  mc->old_e = cached RUV ID = N DN = A # points to same cache entry as above old_e
  mc->new_e = not cached
  ... do op - call modify_update_all()
  ... success ...
  modify_switch_entries - cache_replace old_e, new_e
    delete RUV ID from ID hash
    delete RUV DN from DN hash
    add new_e to RUV ID hash
    add new_e to RUV DN hash
    mark old_e as DELETED
    new_e refcnt == 1 # NOTE: should this be new_e refcnt = old_e refcnt instead?
  cache_return new_e - entrycache_return
    new_e->refcnt-- # now 0
    if (not DELETED)
      add new_e to lru list
      if (CACHE_FULL) # TRUE - cache is full
        entrycache_flush - iterate through lru list
          entrycache_remove_int new_e
            remove RUV ID from ID hash
            remove RUV DN from DN hash
            mark new_e as DELETED
            # NOTE: at this point, there is no RUV ID or DN in cache!
    backentry_free(new_e)
outer
modify_switch_entries - cache_replace old_e, new_e
  remove_hash RUV ID - FAIL
  remove_hash RUV DN - FAIL
  return 1 - FAIL
}}}
This most commonly happens with DNA as DNA is the only BETXN PREOP (in 1.2.11) that modifies the database.
After the call to the BETXN PREOP, we need to make sure mc->old_entry still points to something - not sure how best to do that.

Comment 1 Nathan Kinder 2013-06-28 19:58:10 UTC

*** This bug has been marked as a duplicate of bug 972976 ***


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