Bugzilla – Bug 1609
3.2beta MDS segfaults on static LDIF entries
Last modified: 2005-12-06 16:59:43
You need to log in before you can comment on or make changes to this bug.
The 3.2beta slapd dies with a segmentation fault when presented with any static entry in /opt/globus/etc/grid-info-resource-ldif.conf. For example: --------------------------------------------------------------------------- dn: GlueServiceURI=ldap://some-host.cern.ch:2136, mds-vo-name=local, o=grid objectclass: GlueTop objectclass: GlueService GlueServiceURI: ldap://some-host.cern.ch:2136 GlueServiceAccessPointURL: ldap://some-host.cern.ch:2136/mds-vo- name=local,o=grid GlueServiceType: gridice objectclass: GlueKey objectclass: GlueSchemaVersion GlueSchemaVersionMajor: 1 GlueSchemaVersionMinor: 1 --------------------------------------------------------------------------- Only dynamic entries work. For example: --------------------------------------------------------------------------- dn: Mds-Vo-name=local,o=grid objectclass: GlobusTop objectclass: GlobusActiveObject objectclass: GlobusActiveSearch type: exec path: /some/path/libexec base: some-script args: foo cachetime: 60 timelimit: 20 sizelimit: 50 --------------------------------------------------------------------------- The problem is due to a bug in mds/openldap/ldapmodules/init.c. On line 464 it has the following (indentation adapted for clarity): --------------------------------------------------------------------------- ((*glist)[ldt->total_inx])->dataobj_gris = (DataObj_gris **) calloc (((*glist)[ldt->total_inx])->mod, sizeof(DataObj_gris *)); --------------------------------------------------------------------------- But then on lines 479-481 it does this (indentation again adapted): --------------------------------------------------------------------------- if (!activeobj) { e = str2entry(ldif_strip_comments(obj)); ((*glist)[ldt->total_inx])->dataobj_gris [((*glist)[ldt->total_inx])->current]->e = e; --------------------------------------------------------------------------- I.e. a "dataobj_gris" array element is used as a pointer while it still has a value of zero from the call to calloc(). The presence of this bug forces us to create a dynamic script to produce the static result we used to be able to specify directly with Globus 2.2.4 (the bug is also present in Globus 2.4.x). Though the bug is not a showstopper, it does seem it should be fairly easy for the MDS developers to fix it, so please do so!
Fixed. Will be available in GT 3.2 final release. The OpenLdap library utility routine str2entry(char *str) seems to not only create an entry from the static data but mangles the string itself, subsequent calls to the routine causes the slapd to crash.
The fix seems to work fine indeed. Thanks!