#47733 ds logs many "Operation error fetching Null DN" messages
Closed: wontfix None Opened 8 years ago by lkrispen.

When running the ipa test suite there are many errors like:

Operation error fetching Null DN (9999f846-a07111e3-9fe5a234-9957fd81), error -30993.


Hi Ludwig, could you set the milestone?
Thanks!

The messages are logged if in an add operation the attempt to check if an entry with the nsuniquied of the new entry already exists. Normally the entry does not exist and a DB_NOTFOUND is returned and ignored.
In this case fails when trying to read the nsuniquid index because the page is locked. If this is done in a transaction the code does not wait for the lock and returns DB_DEADLOCK, so that the access will be retried. In fact the access is retied 5 times, but without waiting and so the -30993 messages are logged.
It needs a special scenario to run into this problem:
there are at least two backends and concurrent modifications to the backends and retro changelog needs to be enabled.
The mods to the backends can happen in parallel, but in the postop writing the retro cl both want to add an entry to the same retrocl backend.

A fix, which prevented the errors in the ipa tests is to introduce a wait into the retry loop in th eindex lookup like in other retry loops.

ack, although keep in mind the comment

error can only retry here if txn == NULL - otherwise, have to abort and retry txn

That is, if you are doing the search inside a transaction, bdb says that you have to abort the transaction and retry, similar to the abort/retry loops in ldbm_add.c/ldbm_modify.c/etc.

That being said, it may work to just sleep random and retry here. But we should be aware of possible side effects.

the retry was already happening, there is now just a delay.

in ldbm_modify and the likes we already have done some mods before retrying.

In a read access, if we don't get the lock, we haven't changed anything in the db env, so it should be ok

$ git merge ticket47733
Updating d398078..572ae72
Fast-forward
ldap/servers/slapd/back-ldbm/index.c | 3 +++
1 file changed, 3 insertions(+)
$ git push origin master
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 980 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
d398078..572ae72 master -> master

$ git cherry-pick 572ae72
[389-ds-base-1.3.2 bc61ed7] Ticket 47733 - ds logs many "Operation error fetching Null DN" messages
1 file changed, 3 insertions(+)
$ git push origin 389-ds-base-1.3.2
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 974 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
24ea155..bc61ed7 389-ds-base-1.3.2 -> 389-ds-base-1.3.2

Metadata Update from @lkrispen:
- Issue assigned to lkrispen
- Issue set to the milestone: 1.3.3 - 3/14 (March)

5 years ago

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/1066

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)

2 years ago

Login to comment on this ticket.

Metadata