Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-935

Test hangs on non-existant schema entry lookup

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.5.6
    • Component/s: ldap
    • Labels:
      None

      Description

      Hey Guys,

      I do a lookup like this inside a test:
      syntaxContext.lookup(xsdSyntaxStringRDN);
      // syntaxContext.lookup("monkeywrench");

      If I leave the monkeywrench lookup commented
      out, the test runs fine repeatedly.

      If I comment in the monkeywrench the
      test just hangs. I was expecting
      a NamingException.

      I pasted a self contained test for this
      below.

      Cheers,

      • Ole

        Activity

        Hide
        akiran Kiran Ayyagari added a comment -

        Looks like the issue no longer exists (I ran the test case against the trunk and couldn't reproduce the issue)

        Show
        akiran Kiran Ayyagari added a comment - Looks like the issue no longer exists (I ran the test case against the trunk and couldn't reproduce the issue)
        Hide
        elecharny Emmanuel Lecharny added a comment -

        Let's get rid of this issue in 1.5.6

        Show
        elecharny Emmanuel Lecharny added a comment - Let's get rid of this issue in 1.5.6
        Hide
        ole Ole Ersoy added a comment -

        OK - I'm picking backing on this bug,
        since this observation uses the same test code,
        although this is likely a different bug.

        If I add
        attributes.put( "m-name", "hello" );

        to the attributes of the syntax entry,
        and try to run the test again, I get:

        javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - failed to add entry m-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233,ou=syntaxes,cn=xsd,ou=schema: Attribute m-name not declared in objectClasses of entry m-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233,ou=syntaxes,cn=xsd,ou=schema]; remaining name 'm-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233'
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3036)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2951)
        at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2758)
        at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:774)

        Even though the the ObjectClasses that the syntax entry uses
        are the same as the ObjectClasses on other syntax entries that have
        the m-name attribute.

        Show
        ole Ole Ersoy added a comment - OK - I'm picking backing on this bug, since this observation uses the same test code, although this is likely a different bug. If I add attributes.put( "m-name", "hello" ); to the attributes of the syntax entry, and try to run the test again, I get: javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - failed to add entry m-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233,ou=syntaxes,cn=xsd,ou=schema: Attribute m-name not declared in objectClasses of entry m-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233,ou=syntaxes,cn=xsd,ou=schema] ; remaining name 'm-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3036) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2951) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2758) at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:774) Even though the the ObjectClasses that the syntax entry uses are the same as the ObjectClasses on other syntax entries that have the m-name attribute.
        Hide
        szoerner Stefan Zoerner added a comment -

        Problem reproducible in my environment. Server logs an exception, but the connections to the client is still open, and probably no response is sent to the client due to this error ...

        [19:26:09] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - Invalid root DN given : monkeywrench,ou=syntaxes,cn=xsd,ou=schema (0x6D 0x6F 0x6E 0x6B 0x65 0x79 0x77 0x72 0x65 0x6E 0x63 0x68 0x2C 0x6F 0x75 0x3D 0x73 0x79 0x6E 0x74 0x61 0x78 0x65 0x73 0x2C 0x63 0x6E 0x3D 0x78 0x73 0x64 0x2C 0x6F 0x75 0x3D 0x73 0x63 0x68 0x65 0x6D 0x61 ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=schema
        [19:26:09] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - Invalid root DN given : monkeywrench,ou=syntaxes,cn=xsd,ou=schema (0x6D 0x6F 0x6E 0x6B 0x65 0x79 0x77 0x72 0x65 0x6E 0x63 0x68 0x2C 0x6F 0x75 0x3D 0x73 0x79 0x6E 0x74 0x61 0x78 0x65 0x73 0x2C 0x63 0x6E 0x3D 0x78 0x73 0x64 0x2C 0x6F 0x75 0x3D 0x73 0x63 0x68 0x65 0x6D 0x61 ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=schema
        [19:26:09] INFO [org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler] - [/127.0.0.1:4349] CLOSED
        [19:26:09] INFO [org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler] - [/127.0.0.1:4349] EXCEPTION:
        org.apache.mina.filter.codec.ProtocolDecoderException: org.apache.directory.shared.ldap.message.ResponseCarryingMessageException: Invalid root DN given : monkeywrench,ou=syntaxes,cn=xsd,ou=schema (0x6D 0x6F 0x6E 0x6B 0x65 0x79 0x77 0x72 0x65 0x6E 0x63 0x68 0x2C 0x6F 0x75 0x3D 0x73 0x79 0x6E 0x74 0x61 0x78 0x65 0x73 0x2C 0x63 0x6E 0x3D 0x78 0x73 0x64 0x2C 0x6F 0x75 0x3D 0x73 0x63 0x68 0x65 0x6D 0x61 ) is invalid (Hexdump: 30 06 02 01 07 50 01 06)
        at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:174)
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54)
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
        at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:243)
        at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:305)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Unknown Source)
        Caused by: org.apache.directory.shared.ldap.message.ResponseCarryingMessageException: Invalid root DN given : monkeywrench,ou=syntaxes,cn=xsd,ou=schema (0x6D 0x6F 0x6E 0x6B 0x65 0x79 0x77 0x72 0x65 0x6E 0x63 0x68 0x2C 0x6F 0x75 0x3D 0x73 0x79 0x6E 0x74 0x61 0x78 0x65 0x73 0x2C 0x63 0x6E 0x3D 0x78 0x73 0x64 0x2C 0x6F 0x75 0x3D 0x73 0x63 0x68 0x65 0x6D 0x61 ) is invalid
        at org.apache.directory.shared.ldap.message.MessageDecoder.decode(MessageDecoder.java:226)
        at org.apache.directory.shared.asn1.codec.Asn1CodecDecoder.decode(Asn1CodecDecoder.java:53)
        at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:163)
        ... 8 more

        Show
        szoerner Stefan Zoerner added a comment - Problem reproducible in my environment. Server logs an exception, but the connections to the client is still open, and probably no response is sent to the client due to this error ... [19:26:09] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - Invalid root DN given : monkeywrench,ou=syntaxes,cn=xsd,ou=schema (0x6D 0x6F 0x6E 0x6B 0x65 0x79 0x77 0x72 0x65 0x6E 0x63 0x68 0x2C 0x6F 0x75 0x3D 0x73 0x79 0x6E 0x74 0x61 0x78 0x65 0x73 0x2C 0x63 0x6E 0x3D 0x78 0x73 0x64 0x2C 0x6F 0x75 0x3D 0x73 0x63 0x68 0x65 0x6D 0x61 ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=schema [19:26:09] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - Invalid root DN given : monkeywrench,ou=syntaxes,cn=xsd,ou=schema (0x6D 0x6F 0x6E 0x6B 0x65 0x79 0x77 0x72 0x65 0x6E 0x63 0x68 0x2C 0x6F 0x75 0x3D 0x73 0x79 0x6E 0x74 0x61 0x78 0x65 0x73 0x2C 0x63 0x6E 0x3D 0x78 0x73 0x64 0x2C 0x6F 0x75 0x3D 0x73 0x63 0x68 0x65 0x6D 0x61 ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=schema [19:26:09] INFO [org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler] - [/127.0.0.1:4349] CLOSED [19:26:09] INFO [org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler] - [/127.0.0.1:4349] EXCEPTION: org.apache.mina.filter.codec.ProtocolDecoderException: org.apache.directory.shared.ldap.message.ResponseCarryingMessageException: Invalid root DN given : monkeywrench,ou=syntaxes,cn=xsd,ou=schema (0x6D 0x6F 0x6E 0x6B 0x65 0x79 0x77 0x72 0x65 0x6E 0x63 0x68 0x2C 0x6F 0x75 0x3D 0x73 0x79 0x6E 0x74 0x61 0x78 0x65 0x73 0x2C 0x63 0x6E 0x3D 0x78 0x73 0x64 0x2C 0x6F 0x75 0x3D 0x73 0x63 0x68 0x65 0x6D 0x61 ) is invalid (Hexdump: 30 06 02 01 07 50 01 06) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:174) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:243) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:305) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.directory.shared.ldap.message.ResponseCarryingMessageException: Invalid root DN given : monkeywrench,ou=syntaxes,cn=xsd,ou=schema (0x6D 0x6F 0x6E 0x6B 0x65 0x79 0x77 0x72 0x65 0x6E 0x63 0x68 0x2C 0x6F 0x75 0x3D 0x73 0x79 0x6E 0x74 0x61 0x78 0x65 0x73 0x2C 0x63 0x6E 0x3D 0x78 0x73 0x64 0x2C 0x6F 0x75 0x3D 0x73 0x63 0x68 0x65 0x6D 0x61 ) is invalid at org.apache.directory.shared.ldap.message.MessageDecoder.decode(MessageDecoder.java:226) at org.apache.directory.shared.asn1.codec.Asn1CodecDecoder.decode(Asn1CodecDecoder.java:53) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:163) ... 8 more
        Hide
        szoerner Stefan Zoerner added a comment -

        Source code now attached thanks to Ole.

        Show
        szoerner Stefan Zoerner added a comment - Source code now attached thanks to Ole.

          People

          • Assignee:
            Unassigned
            Reporter:
            ole Ole Ersoy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development