Bug 50644

Summary: S4C memory leak in group member cache
Product: UCS Reporter: Arvid Requate <requate>
Component: S4 ConnectorAssignee: Arvid Requate <requate>
Status: CLOSED FIXED QA Contact: Florian Best <best>
Severity: normal    
Priority: P5 CC: best
Version: UCS 4.4Flags: requate: Patch_Available+
Target Milestone: UCS 4.4-3-errata   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=50643
What kind of report is it?: Development Internal What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:
Attachments: fix_s4c_memory_leak_in_group_member_cache.patch
patch (git:fbest/50644-memory-leak)

Description Arvid Requate univentionstaff 2019-12-16 17:03:57 CET
Created attachment 10273 [details]
fix_s4c_memory_leak_in_group_member_cache.patch

From reading the S4-Connector code I think the s4().group_members_cache_* could be growing indefinitely, see attached patch.
Comment 1 Florian Best univentionstaff 2019-12-17 12:41:28 CET
Created attachment 10274 [details]
patch (git:fbest/50644-memory-leak)

Alternative patch using python's set() which reduces the diff and simplifies the code.
Comment 2 Arvid Requate univentionstaff 2019-12-19 13:25:39 CET
e31e8d76ef | Turn self.group_members_cache_* into a set()
72479b1800 | Fix another self.group_members_cache_ucs type initialization
12d285dfd7 | Advisory
Comment 3 Florian Best univentionstaff 2019-12-20 09:10:55 CET
OK: fix
OK: Code review
OK: jenkins-Tests
OK: YAML
Comment 4 Erik Damrose univentionstaff 2020-01-15 17:00:00 CET
<http://errata.software-univention.de/ucs/4.4/422.html>