Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldapadd -f dcm4chee-archive.ldif fails with sysmalloc: Assertion #2568

Closed
jpaoletti opened this issue Apr 30, 2020 · 6 comments
Closed

ldapadd -f dcm4chee-archive.ldif fails with sysmalloc: Assertion #2568

jpaoletti opened this issue Apr 30, 2020 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jpaoletti
Copy link

Trying to install acording the README with the current options, leads me to the current dead-end:

In "OpenLDAP with dynamic runtime configuration" , the first and second command works fine but the 3rd command throws the following error:

sudo ldapadd -vvv -Y EXTERNAL -H ldapi:/// -f /tmp/dcm4chee-arc-5.22.1-mysql/ldap/slapd/dcm4chee-archive.ldif

ldap_initialize( ldapi:///??base )
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
ldapadd: malloc.c:2401: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted

And thats it, the next file also fail and the overall process fail most likely due to this error. I think its some kind of error in dcm4chee-archive.ldif but can't say for sure.

Thanks best regards

@shral
Copy link
Member

shral commented May 6, 2020

Hi @jpaoletti you schould first ask your question on the google forum. Meybe there is someone who had the same problem and maybe someone will have the smae problem in the future. All developer are reading the forum and responding there!

@gunterze gunterze changed the title Error on instalation (Ubuntu Server 18.04 | MySQL | OpenLDAP) ldapadd -f dcm4chee-archive.ldif fails with sysmalloc: Assertion May 7, 2020
@gunterze
Copy link
Member

gunterze commented May 7, 2020

Seems there is an issue with openldap's ldapadd utility distributed in Ubuntu - it works with Alpine's ldapadd utility of the same OpenLDAP version (2.4.4) - concerning larger object descriptions.

You may workaround by creating an empty schema description by

$ sudo ldapadd -Y EXTERNAL -H ldapi:/// 
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
dn: cn=dcm4chee-archive,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: dcm4chee-archive
<CTRL^D>
adding new entry "cn=dcm4chee-archive,cn=schema,cn=config"

And modifying it by

$ sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f dcm4chee-arc-5.22.1-psql-secure-ui/ldap/slapd/dcm4chee-archive-modify.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "cn={6}dcm4chee-archive,cn=schema,cn=config"

@gunterze gunterze added the bug Something isn't working label May 7, 2020
@gunterze gunterze added this to the 5.22.2 milestone May 7, 2020
@jpaoletti
Copy link
Author

We endend using apacheDS after fixing some issues in it.

For the record, you can install ldif without Apache DS Studio (we installed everything in a server without interface) using:

ldapadd -h localhost -p 10389 -D "uid=admin,ou=system" -f $DCM4CHEE/ldap/apacheds/dicom.ldif -x -w secret
ldapadd -h localhost -p 10389 -D "uid=admin,ou=system" -f $DCM4CHEE/ldap/apacheds/dcm4che.ldif -x -w secret
ldapadd -h localhost -p 10389 -D "uid=admin,ou=system" -f $DCM4CHEE/ldap/apacheds/dcm4chee-archive.ldif -x -w secret
ldapadd -h localhost -p 10389 -D "uid=admin,ou=system" -f $DCM4CHEE/ldap/apacheds/dcm4chee-archive-ui.ldif -x -w secret
ldapadd -h localhost -p 10389 -D "uid=admin,ou=system" -f $DCM4CHEE/ldap/init-baseDN.ldif -x -w secret
ldapadd -h localhost -p 10389 -D "uid=admin,ou=system" -f $DCM4CHEE/ldap/init-config.ldif -x -w secret
ldapadd -h localhost -p 10389 -D "uid=admin,ou=system" -f $DCM4CHEE/ldap/default-config.ldif -x -w secret
ldapadd -h localhost -p 10389 -D "uid=admin,ou=system" -f $DCM4CHEE/ldap/default-ui-config.ldif -x -w secret

Of course using correct credentials.

Best regards and thanks for such a great software!

@gunterze
Copy link
Member

gunterze commented May 8, 2020

Another workaround is to reduce the size of the LDIF file by converting the line separators from \r\n to \n:

$ tr -d \\r < $DCM4CHEE/ldap/slapd/dcm4chee-archive.ldif | sudo ldapadd -Y EXTERNAL -H ldapi:///
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=dcm4chee-archive,cn=schema,cn=config"

@gunterze
Copy link
Member

gunterze commented May 8, 2020

Changed line separator from CR LF to LF in LDIF files provided in binary distribution package

@gunterze
Copy link
Member

gunterze commented May 8, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants