Bug 58522 - Failed listener module initialization
Summary: Failed listener module initialization
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
Version: UCS 5.2
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.2-2-errata
Assignee: Marius Meschter
QA Contact: Jan Burgmeier
URL: https://git.knut.univention.de/univen...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-14 14:45 CEST by Marius Meschter
Modified: 2025-09-02 13:22 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.411
Enterprise Customer affected?: Yes
School Customer affected?:
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 Marius Meschter univentionstaff 2025-08-14 14:45:48 CEST
A race condition bug exists in the listener module initialization code that can cause modules to fail initialization even when they should succeed.
During listener module initialization, the listener:
* Searches for all LDAP objects matching the module's filter
* Iterates through each object to process it
* If an object is not found in cache, performs an individual LDAP search

When an individual LDAP search returns LDAP_NO_SUCH_OBJECT (typically due to the object being deleted between steps 1 and 2), the code correctly ignores this error and continues processing.

However, if LDAP_NO_SUCH_OBJECT occurs on the final iteration of the loop, the function's return value remains set to LDAP_NO_SUCH_OBJECT (error code 32). The calling function interprets this as an initialization failure and marks the
module as "not ready," preventing it from processing any future events.

This only happens with a very broad filter configured with the listener module (e.g. "objectClass=*" and the creation and deletion of a objects during the listener module initialization phase.
Comment 1 Florian Best univentionstaff 2025-08-14 15:23:38 CEST
Th object being not found is a UDM settings/lock (objectClass=lock), which is created during creation or modification of objects, and then immediately removed. That's why it's not present anymore in the result list.
Comment 3 Marius Meschter univentionstaff 2025-08-22 14:41:57 CEST
Fixed in version 16.2.1 of the UDM listener.

Explicitly set the listener return code to LDAP_SUCCESS when LDAP_NO_SUCH_OBJECT is encountered.
Comment 4 Jan Burgmeier univentionstaff 2025-09-01 09:13:45 CEST
 * yaml: OK
 * changelog: OK
 * tests: OK
Comment 5 Iván.Delgado univentionstaff 2025-09-02 13:22:06 CEST
<https://errata.software-univention.de/#/?erratum=5.2x181>