https://bugs.openldap.org/show_bug.cgi?id=9494
Issue ID: 9494 Summary: Segfault after modify olcDbMaxSize w/ autogroup Product: OpenLDAP Version: 2.4.49 Hardware: x86_64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: --- Component: overlays Assignee: bugs@openldap.org Reporter: louis.chanouha@univ-toulouse.fr Target Milestone: ---
Hello, Yet another crash when modifying olcDbMaxSize. Seems not to be related to other similar reports. autogroup works fine until : - attempt to modify olcDbMaxSize - attempt to modify olcAGattrSet (segfault to, need to delete the overlay and add it again) - do not rely on olcMemberOfMemberAD (extra memberof module)
requested change --------------------------------------------:
dn: olcDatabase={1}mdb,cn=config changetype: modify replace: olcDbMaxSize olcDbMaxSize: 4294967296
openldap logs -----------------------------------------------:
6046b5c3 ==> autogroup_db_close 6046b5c3 ==> autogroup_db_close 6046b5c3 mdb_db_open: database "dc=domain,dc=fr": dbenv_open(/var/lib/ldap). 6046b5c3 ==> autogroup_db_open 6046b5c3 ==> autogroup_build_def_filter put_filter: "(objectClass=groupOfURLs)" put_filter: simple put_simple_filter: "objectClass=groupOfURLs" ber_scanf fmt ({mm}) ber: 6046b5c3 => mdb_search 6046b5c3 mdb_dn2entry("dc=domain,dc=fr") 6046b5c3 => mdb_dn2id("dc=domain,dc=fr") 6046b5c3 <= mdb_dn2id: got id=0x1 6046b5c3 => mdb_entry_decode: 6046b5c3 <= mdb_entry_decode 6046b5c3 search_candidates: base="dc=domain,dc=fr" (0x00000001) scope=2 6046b5c3 => mdb_equality_candidates (objectClass) 6046b5c3 => key_read 6046b5c3 <= mdb_index_read: failed (-30798) 6046b5c3 <= mdb_equality_candidates: id=0, first=0, last=0 6046b5c3 => mdb_equality_candidates (objectClass) 6046b5c3 => key_read 6046b5c3 <= mdb_index_read 5 candidates 6046b5c3 <= mdb_equality_candidates: id=5, first=18173, last=18177 6046b5c3 mdb_search_candidates: id=5 first=18173 last=18177 6046b5c3 => mdb_entry_decode: 6046b5c3 <= mdb_entry_decode 6046b5c3 ==> autogroup_group_add_cb <cn=cxxx,ou=groups,dc=domain,dc=fr> 6046b5c3 ==> autogroup_add_group <cn=xxx,ou=groups,dc=domain,dc=fr>
Thread 3 "slapd" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7feb7d42c700 (LWP 37453)]
GDB dump --------------------------------------
(gdb) info frame Stack level 0, frame at 0x7feb7d297fd0: rip = 0x55b4569bcba0 in dnMatch; saved rip = 0x7feb9e5f768b called by frame at 0x7feb7d298070 Arglist at 0x7feb7d297f88, args: Locals at 0x7feb7d297f88, Previous frame's sp is 0x7feb7d297fd0 Saved registers: rbx at 0x7feb7d297f98, rbp at 0x7feb7d297fa0, r12 at 0x7feb7d297fa8, r13 at 0x7feb7d297fb0, r14 at 0x7feb7d297fb8, r15 at 0x7feb7d297fc0, rip at 0x7feb7d297fc8 (gdb) bt #0 0x000055b4569bcba0 in dnMatch () #1 0x00007feb9e5f768b in ?? () from /usr/lib/ldap/autogroup.so.0 #2 0x00007feb9e5f98fb in ?? () from /usr/lib/ldap/autogroup.so.0 #3 0x000055b4569b6eb8 in ?? () #4 0x000055b4569b8a31 in slap_send_search_entry () #5 0x00007feb9e63dbf6 in mdb_search () from /usr/lib/ldap/back_mdb-2.4.so.2 #6 0x000055b456a16c68 in overlay_op_walk () #7 0x000055b456a16d97 in ?? () #8 0x00007feb9e5f9be0 in ?? () from /usr/lib/ldap/autogroup.so.0 #9 0x000055b456a15dd8 in ?? () #10 0x00007feb9e632eb8 in ?? () from /usr/lib/ldap/back_mdb-2.4.so.2 #11 0x000055b4569908b6 in ?? () #12 0x000055b4569be8aa in fe_op_modify () #13 0x000055b4569c0930 in do_modify () #14 0x000055b4569a66ed in ?? () #15 0x000055b4569a722c in ?? () #16 0x00007feb9fa5ea03 in ?? () from /lib/x86_64-linux-gnu/libldap_r-2.4.so.2 #17 0x00007feb9f990609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #18 0x00007feb9f8b7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
cn=config overlays ----------------------------------
22 olcOverlay={0}memberof,olcDatabase={1}mdb,cn=config objectClass: olcConfig objectClass: olcMemberOf objectClass: olcOverlayConfig objectClass: top olcOverlay: memberof olcMemberOfDangling: ignore olcMemberOfRefInt: TRUE olcMemberOfGroupOC: groupOfNames olcMemberOfMemberAD: member olcMemberOfMemberOfAD: memberOf
23 olcOverlay={1}ppolicy,olcDatabase={1}mdb,cn=config objectClass: olcOverlayConfig objectClass: olcPPolicyConfig olcOverlay: {1}ppolicy olcPPolicyDefault: cn=orga_default,ou=Policies,dc=domain,dc=fr olcPPolicyHashCleartext: FALSE olcPPolicyUseLockout: TRUE olcPPolicyForwardUpdates: TRUE
24 olcOverlay={2}syncprov,olcDatabase={1}mdb,cn=config objectClass: olcOverlayConfig objectClass: olcSyncProvConfig olcOverlay: {2}syncprov
25 olcOverlay={3}memberof,olcDatabase={1}mdb,cn=config objectClass: olcOverlayConfig objectClass: olcMemberOf objectClass: olcConfig olcOverlay: {3}memberof olcMemberOfDangling: ignore olcMemberOfRefInt: TRUE olcMemberOfGroupOC: groupOfNames olcMemberOfMemberAD: member
26 olcOverlay={4}autogroup,olcDatabase={1}mdb,cn=config objectClass: olcOverlayConfig objectClass: olcAutomaticGroups olcOverlay: {4}autogroup olcAGattrSet: {0}groupOfURLs memberURL member olcAGmemberOfAd: memberOf
27 olcOverlay={5}memberof,olcDatabase={1}mdb,cn=config objectClass: olcOverlayConfig objectClass: olcMemberOf objectClass: olcConfig olcOverlay: {5}memberof olcMemberOfDangling: ignore olcMemberOfRefInt: TRUE olcMemberOfGroupOC: groupOfURLs olcMemberOfMemberAD: member
28 olcOverlay={6}autogroup,olcDatabase={1}mdb,cn=config objectClass: olcOverlayConfig objectClass: olcAutomaticGroups olcOverlay: {6}autogroup olcAGattrSet: {0}groupOfURLs memberUidURL memberUid
https://bugs.openldap.org/show_bug.cgi?id=9494
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |needs_review
https://bugs.openldap.org/show_bug.cgi?id=9494
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|bugs@openldap.org |hyc@openldap.org Target Milestone|--- |2.5.4 Keywords|needs_review |
https://bugs.openldap.org/show_bug.cgi?id=9494
--- Comment #1 from Howard Chu hyc@openldap.org --- Note: this config is invalid. As of ITS#9311, only one autogroup overlay is allowed per database. Similarly, this config uses memberOf overlay 3 times, twice with identical config, which is clearly not useful.
Unable to reproduce any crash in current revisions.
https://bugs.openldap.org/show_bug.cgi?id=9494
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Target Milestone|2.5.4 |--- Resolution|--- |INVALID
https://bugs.openldap.org/show_bug.cgi?id=9494
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED
https://bugs.openldap.org/show_bug.cgi?id=9494
--- Comment #2 from louis.chanouha@univ-toulouse.fr louis.chanouha@univ-toulouse.fr --- (In reply to Howard Chu from comment #1)
Note: this config is invalid. As of ITS#9311, only one autogroup overlay is allowed per database. Similarly, this config uses memberOf overlay 3 times, twice with identical config, which is clearly not useful.
Unable to reproduce any crash in current revisions.
I have two type of groups (static and generated) with two different object classes so because of unicity of olcMemberOfGroupOC i can't generate memberOf with two groups.
OK for the unicity of autogroup but i don't see it in ITS#9311 - only dyngroup.
So i can't use autogroup & memberOf together, I will construct all my groups statically (disable autogroup).
This was on a brand new install with empty database, I will try to compile a recent version
Thanks Louis.
https://bugs.openldap.org/show_bug.cgi?id=9494
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- (In reply to louis.chanouha@univ-toulouse.fr from comment #2)
I have two type of groups (static and generated) with two different object classes so because of unicity of olcMemberOfGroupOC i can't generate memberOf with two groups.
OK for the unicity of autogroup but i don't see it in ITS#9311 - only dyngroup.
So i can't use autogroup & memberOf together, I will construct all my groups statically (disable autogroup).
This was on a brand new install with empty database, I will try to compile a recent version
What you probably want is slapo-dynlist in OpenLDAP 2.5.
https://bugs.openldap.org/show_bug.cgi?id=9494
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|VERIFIED |CONFIRMED Resolution|INVALID |--- Ever confirmed|0 |1
--- Comment #4 from Howard Chu hyc@openldap.org --- (In reply to Howard Chu from comment #1)
Note: this config is invalid. As of ITS#9311, only one autogroup overlay is allowed per database. Similarly, this config uses memberOf overlay 3 times, twice with identical config, which is clearly not useful.
Unable to reproduce any crash in current revisions.
Was able to reproduce by temporarily allowing multiple instances. Crash fixed in master.
https://bugs.openldap.org/show_bug.cgi?id=9494
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |TEST
https://bugs.openldap.org/show_bug.cgi?id=9494
--- Comment #5 from Quanah Gibson-Mount quanah@openldap.org --- Commits: • d6d93463 by Howard Chu at 2021-04-14T16:36:16+01:00 ITS#9494 autogroup: fix db_open trashing thread context
https://bugs.openldap.org/show_bug.cgi?id=9494
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.4.59
https://bugs.openldap.org/show_bug.cgi?id=9494
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|overlays |contrib
https://bugs.openldap.org/show_bug.cgi?id=9494
--- Comment #6 from Quanah Gibson-Mount quanah@openldap.org --- RE24 commit: Commits: • a338b46a by Howard Chu at 2021-04-14T15:46:01+00:00 ITS#9494 autogroup: fix db_open trashing thread context
Will be a part of the 2.4.59 release
https://bugs.openldap.org/show_bug.cgi?id=9494
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|TEST |FIXED Status|RESOLVED |VERIFIED