Bug 53333 - univention.udm.exceptions.NoObject: No object found at DN 'cn=internal-name-for-a-tile,cn=entry,cn=portals,cn=univention,dc=AutoTest071,dc=local'.
Summary: univention.udm.exceptions.NoObject: No object found at DN 'cn=internal-name-f...
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
Version: UCS 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.0-8-errata
Assignee: Ole Schwiegert
QA Contact: Dirk Wiesenthal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-26 14:41 CEST by Florian Best
Modified: 2024-06-26 13:03 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.120
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2021-05-26 14:41:37 CEST
The test case test/ucs-test/tests/86_selenium/185_portal_administration_inline_creation causes unhandled exceptions in the portal-server. Maybe a timing issue:

 15920 cache        21-05-26 08:00:29 [   ERROR]: Error during refresh
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/admin/uldap.py", line 669, in search
    return self.lo.search(filter, base, scope, attr, unique, required, timeout, sizelimit, serverctrls=serverctrls, response=response)
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 208, in _decorated
    return func(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/univention/uldap.py", line 516, in search
    res = self.lo.search_ext_s(base, ldap_scope, filter, attr, serverctrls=serverctrls, clientctrls=None, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1259, in search_ext_s
    return self._apply_method_s(SimpleLDAPObject.search_ext_s,*args,**kwargs)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1197, in _apply_method_s
    return func(self,*args,**kwargs)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 846, in search_ext_s
    return self.result(msgid,all=1,timeout=timeout)[1]
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 738, in result
    resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 742, in result2
    resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 749, in result3
    resp_ctrl_classes=resp_ctrl_classes
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 756, in result4
    ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 329, in _ldap_call
    reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib/python3/dist-packages/ldap/compat.py", line 44, in reraise
    raise exc_value
  File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call
    result = func(*args,**kwargs)
ldap.NO_SUCH_OBJECT: {'desc': 'No such object', 'matched': 'cn=entry,cn=portals,cn=univention,dc=AutoTest071,dc=local'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/admin/objects.py", line 99, in get
    obj = univention.admin.modules.lookup(module.module, co, lo, base=dn, superordinate=superordinate, scope='base', unique=True, required=True)[0]
  File "/usr/lib/python3/dist-packages/univention/admin/modules.py", line 953, in lookup
    tmpres = module.lookup(co, lo, filter, base=base, superordinate=superordinate, scope=scope, unique=unique, required=required, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", line 1752, in lookup
    for dn, attrs in lo.search(filter_str, base, scope, attr, unique, required, timeout, sizelimit, serverctrls=serverctrls, response=response):
  File "/usr/lib/python3/dist-packages/univention/admin/uldap.py", line 671, in search
    raise univention.admin.uexceptions.noObject(_err2str(msg))
univention.admin.uexceptions.noObject: No such object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/udm/modules/generic.py", line 669, in _get_orig_udm_object
    obj = univention.admin.objects.get(udm_module, None, self.connection, po, dn=dn, superordinate=superordinate_obj)
  File "/usr/lib/python3/dist-packages/univention/admin/objects.py", line 104, in get
    raise univention.admin.uexceptions.noObject(dn)
univention.admin.uexceptions.noObject: cn=internal-name-for-a-tile,cn=entry,cn=portals,cn=univention,dc=AutoTest071,dc=local

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/portal/extensions/reloader.py", line 107, in refresh
    fd = self._refresh()
  File "/usr/lib/python3/dist-packages/univention/portal/extensions/reloader.py", line 171, in _refresh
    content["entries"] = self._extract_entries(udm, portal, list(categories.values()), list(folders.values()))
  File "/usr/lib/python3/dist-packages/univention/portal/extensions/reloader.py", line 235, in _extract_entries
    for obj in udm.get("portals/entry").search():
  File "/usr/lib/python3/dist-packages/univention/udm/modules/generic.py", line 553, in search
    yield self.get(dn)
  File "/usr/lib/python3/dist-packages/univention/udm/modules/generic.py", line 533, in get
    return self._load_obj(dn)
  File "/usr/lib/python3/dist-packages/univention/udm/modules/generic.py", line 707, in _load_obj
    obj._orig_udm_object = self._get_orig_udm_object(dn, superordinate)
  File "/usr/lib/python3/dist-packages/univention/udm/modules/generic.py", line 671, in _get_orig_udm_object
    reraise(NoObject, NoObject(dn=dn, module_name=self.name), sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/six.py", line 692, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/univention/udm/modules/generic.py", line 669, in _get_orig_udm_object
    obj = univention.admin.objects.get(udm_module, None, self.connection, po, dn=dn, superordinate=superordinate_obj)
  File "/usr/lib/python3/dist-packages/univention/admin/objects.py", line 104, in get
    raise univention.admin.uexceptions.noObject(dn)
univention.udm.exceptions.NoObject: No object found at DN 'cn=internal-name-for-a-tile,cn=entry,cn=portals,cn=univention,dc=AutoTest071,dc=local'.
Comment 1 Jürn Brodersen univentionstaff 2024-06-21 13:37:45 CEST
This is an udm bug. It happens if you iterate over a search result set and one over the matched objects has been deleted in the meantime.

See this line:
  File "/usr/lib/python3/dist-packages/univention/udm/modules/generic.py", line 553, in search
    yield self.get(dn)

There is no guarantee that the dn still exists at that point.

I would say we should catch the NoObject error, print a debug message and move to the next object.
Comment 3 Ole Schwiegert univentionstaff 2024-06-24 15:24:01 CEST
Package: univention-directory-manager-modules
Version: 15.0.27-3
Branch: ucs_5.0-0-errata5.0-8
Scope: errata5.0-8

Package: ucs-test
Version: 10.0.22-13
Branch: ucs_5.0-0-errata5.0-8
Scope: errata5.0-8
Comment 4 Dirk Wiesenthal univentionstaff 2024-06-25 16:17:20 CEST
New Test (and no regressions in old tests): OK
Code: OK
YAML: OK
Comment 5 Iván.Delgado univentionstaff 2024-06-26 13:03:31 CEST
<https://errata.software-univention.de/#/?erratum=5.0x1071>