You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Ole Ersoy (JIRA)" <ji...@apache.org> on 2007/05/23 18:45:16 UTC

[jira] Created: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
----------------------------------------------------------------------------

                 Key: DIRSERVER-942
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: ldap
    Affects Versions: 1.5.1
            Reporter: Ole Ersoy


This is related to https://issues.apache.org/jira/browse/DIRSERVER-935

By accident I tried running some code that deletes (935 looks up)
entries that are not present.

The server froze and I could not connect with LS
anymore.

First I assumed it crashed, so I tried doing
./apacheds start

But I still could not connect
so I tried doing 
./apacheds stop
./aapcheds start

and back to normal.

I need to code a self contained test for this.

Cheers,
- Ole



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by Emmanuel Lecharny <el...@gmail.com>.
Ole,

can you just check if this is a bug we can reproduce simply by
deleting a wrond DN, and that the server immedialy freeze ? If so, it
should be possible to get this error with the standard installation
(no need to inject special data then).

Thanks !

PS: I just ask this to narrow the test case.

On 8/20/07, Ole Ersoy <ol...@gmail.com> wrote:
> Alex - You are right.  The server freezes when trying to delete a DN that is incorrect / not present.
>
> Cheers,
> - Ole
>
>
>
> Alex Karasulu wrote:
> > U trying to delete this DN?
> >
> > monkeywrench,ou=syntaxes,cn=xsd,ou=system
> >
> > This is not a correct DN it seems.
> >
> > Alex
> >
> >
> > On 8/18/07, * Ole Ersoy (JIRA)* <jira@apache.org
> > <ma...@apache.org>> wrote:
> >
> >
> >         [
> >     https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520900
> >     <https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520900>
> >     ]
> >
> >     Ole Ersoy commented on DIRSERVER-942:
> >     -------------------------------------
> >
> >     Here's the output when I crtl-c to close the debugging session:
> >     [16:10:47] ERROR
> >     [org.apache.directory.shared.ldap.codec.LdapMessageGrammar ] - The
> >     DN to delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D )
> >     is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=system
> >     [16:10:47] WARN
> >     [org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler]
> >     - [/127.0.0.1:39964] Unexpected exception forcing session to close:
> >     sending disconnect notice to client.
> >     java.io.IOException : Connection reset by peer
> >             at sun.nio.ch.FileDispatcher.read0(Native Method)
> >             at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
> >             at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java :233)
> >             at sun.nio.ch.IOUtil.read(IOUtil.java:200)
> >             at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
> >             at
> >     org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java
> >     :267)
> >             at
> >     org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:241)
> >             at
> >     org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProcessor.java:44)
> >             at
> >     org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:559)
> >             at
> >     org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)
> >             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(Thread.java:619)
> >
> >
> >
> >
> >      > Server Feezes When Doing
> >     https://issues.apache.org/jira/browse/DIRSERVER-935
> >      >
> >     ----------------------------------------------------------------------------
> >
> >      >
> >      >                 Key: DIRSERVER-942
> >      >                 URL:
> >     https://issues.apache.org/jira/browse/DIRSERVER-942
> >      >             Project: Directory ApacheDS
> >      >          Issue Type: Bug
> >      >          Components: ldap
> >      >    Affects Versions: 1.5.0
> >      >            Reporter: Ole Ersoy
> >      >             Fix For: 1.5.1
> >      >
> >      >         Attachments: CreateSyntaxEntrySelfContainedTest.java
> >      >
> >      >
> >      > This is related to
> >     https://issues.apache.org/jira/browse/DIRSERVER-935
> >      > By accident I tried running some code that deletes (935 looks up)
> >      > entries that are not present.
> >      > The server froze and I could not connect with LS
> >      > anymore.
> >      > First I assumed it crashed, so I tried doing
> >      > ./apacheds start
> >      > But I still could not connect
> >      > so I tried doing
> >      > ./apacheds stop
> >      > ./aapcheds start
> >      > and back to normal.
> >      > I need to code a self contained test for this.
> >      > Cheers,
> >      > - Ole
> >
> >     --
> >     This message is automatically generated by JIRA.
> >     -
> >     You can reply to this email to add a comment to the issue online.
> >
> >
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: [jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by Ole Ersoy <ol...@gmail.com>.
Alex - You are right.  The server freezes when trying to delete a DN that is incorrect / not present.

Cheers,
- Ole



Alex Karasulu wrote:
> U trying to delete this DN?
> 
> monkeywrench,ou=syntaxes,cn=xsd,ou=system
> 
> This is not a correct DN it seems.
> 
> Alex
> 
> 
> On 8/18/07, * Ole Ersoy (JIRA)* <jira@apache.org 
> <ma...@apache.org>> wrote:
> 
> 
>         [
>     https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520900
>     <https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520900>
>     ]
> 
>     Ole Ersoy commented on DIRSERVER-942:
>     -------------------------------------
> 
>     Here's the output when I crtl-c to close the debugging session:
>     [16:10:47] ERROR
>     [org.apache.directory.shared.ldap.codec.LdapMessageGrammar ] - The
>     DN to delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D )
>     is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=system
>     [16:10:47] WARN
>     [org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler]
>     - [/127.0.0.1:39964] Unexpected exception forcing session to close:
>     sending disconnect notice to client.
>     java.io.IOException : Connection reset by peer
>             at sun.nio.ch.FileDispatcher.read0(Native Method)
>             at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
>             at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java :233)
>             at sun.nio.ch.IOUtil.read(IOUtil.java:200)
>             at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
>             at
>     org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java
>     :267)
>             at
>     org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:241)
>             at
>     org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProcessor.java:44)
>             at
>     org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:559)
>             at
>     org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)
>             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(Thread.java:619)
> 
> 
> 
> 
>      > Server Feezes When Doing
>     https://issues.apache.org/jira/browse/DIRSERVER-935
>      >
>     ----------------------------------------------------------------------------
> 
>      >
>      >                 Key: DIRSERVER-942
>      >                 URL:
>     https://issues.apache.org/jira/browse/DIRSERVER-942
>      >             Project: Directory ApacheDS
>      >          Issue Type: Bug
>      >          Components: ldap
>      >    Affects Versions: 1.5.0
>      >            Reporter: Ole Ersoy
>      >             Fix For: 1.5.1
>      >
>      >         Attachments: CreateSyntaxEntrySelfContainedTest.java
>      >
>      >
>      > This is related to
>     https://issues.apache.org/jira/browse/DIRSERVER-935
>      > By accident I tried running some code that deletes (935 looks up)
>      > entries that are not present.
>      > The server froze and I could not connect with LS
>      > anymore.
>      > First I assumed it crashed, so I tried doing
>      > ./apacheds start
>      > But I still could not connect
>      > so I tried doing
>      > ./apacheds stop
>      > ./aapcheds start
>      > and back to normal.
>      > I need to code a self contained test for this.
>      > Cheers,
>      > - Ole
> 
>     --
>     This message is automatically generated by JIRA.
>     -
>     You can reply to this email to add a comment to the issue online.
> 
> 

Re: [jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by Martin Alderson <eq...@planetquake.com>.
Alex Karasulu wrote:
> U trying to delete this DN?
> 
> monkeywrench,ou=syntaxes,cn=xsd,ou=system
> 
> This is not a correct DN it seems.
> 
> Alex

Yeah, that's the trigger for the problem I think.  If you supply a 
malformed DN to the server it seems to lock up.  I think I have seen 
this issue with our own LDAP client application which attempts to read 
an entry from the server with DN "administrator".  When this happens our 
application just sits there until the LDAP timeout is reached.

When our application tries this with other LDAP servers (Windows Active 
Directory and Novell eDirectory) we get an error back immediately.

I'll hopefully get chance to look into this problem a bit more this week.



> On 8/18/07, Ole Ersoy (JIRA) <ji...@apache.org> wrote:
>>
>>     [
>> https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520900]
>>
>> Ole Ersoy commented on DIRSERVER-942:
>> -------------------------------------
>>
>> Here's the output when I crtl-c to close the debugging session:
>> [16:10:47] ERROR [
>> org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - The DN to
>> delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D ) is invalid : Bad DN :
>> monkeywrench,ou=syntaxes,cn=xsd,ou=system
>> [16:10:47] WARN [
>> org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler]
>> - [/127.0.0.1:39964] Unexpected exception forcing session to close: sending
>> disconnect notice to client.
>> java.io.IOException: Connection reset by peer
>>         at sun.nio.ch.FileDispatcher.read0(Native Method)
>>         at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
>>         at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
>>         at sun.nio.ch.IOUtil.read(IOUtil.java:200)
>>         at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
>>         at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(
>> SocketIoProcessor.java:267)
>>         at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(
>> SocketIoProcessor.java:241)
>>         at
>> org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(
>> SocketIoProcessor.java:44)
>>         at
>> org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(
>> SocketIoProcessor.java:559)
>>         at org.apache.mina.util.NamePreservingRunnable.run(
>> NamePreservingRunnable.java:43)
>>         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(Thread.java:619)
>>
>>
>>
>>
>>> Server Feezes When Doing
>> https://issues.apache.org/jira/browse/DIRSERVER-935
>> ----------------------------------------------------------------------------
>>>                 Key: DIRSERVER-942
>>>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>>>             Project: Directory ApacheDS
>>>          Issue Type: Bug
>>>          Components: ldap
>>>    Affects Versions: 1.5.0
>>>            Reporter: Ole Ersoy
>>>             Fix For: 1.5.1
>>>
>>>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>>>
>>>
>>> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
>>> By accident I tried running some code that deletes (935 looks up)
>>> entries that are not present.
>>> The server froze and I could not connect with LS
>>> anymore.
>>> First I assumed it crashed, so I tried doing
>>> ./apacheds start
>>> But I still could not connect
>>> so I tried doing
>>> ./apacheds stop
>>> ./aapcheds start
>>> and back to normal.
>>> I need to code a self contained test for this.
>>> Cheers,
>>> - Ole
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
> 


Re: [jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by Alex Karasulu <ak...@apache.org>.
U trying to delete this DN?

monkeywrench,ou=syntaxes,cn=xsd,ou=system

This is not a correct DN it seems.

Alex


On 8/18/07, Ole Ersoy (JIRA) <ji...@apache.org> wrote:
>
>
>     [
> https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520900]
>
> Ole Ersoy commented on DIRSERVER-942:
> -------------------------------------
>
> Here's the output when I crtl-c to close the debugging session:
> [16:10:47] ERROR [
> org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - The DN to
> delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D ) is invalid : Bad DN :
> monkeywrench,ou=syntaxes,cn=xsd,ou=system
> [16:10:47] WARN [
> org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler]
> - [/127.0.0.1:39964] Unexpected exception forcing session to close: sending
> disconnect notice to client.
> java.io.IOException: Connection reset by peer
>         at sun.nio.ch.FileDispatcher.read0(Native Method)
>         at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
>         at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
>         at sun.nio.ch.IOUtil.read(IOUtil.java:200)
>         at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
>         at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(
> SocketIoProcessor.java:267)
>         at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(
> SocketIoProcessor.java:241)
>         at
> org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(
> SocketIoProcessor.java:44)
>         at
> org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(
> SocketIoProcessor.java:559)
>         at org.apache.mina.util.NamePreservingRunnable.run(
> NamePreservingRunnable.java:43)
>         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(Thread.java:619)
>
>
>
>
> > Server Feezes When Doing
> https://issues.apache.org/jira/browse/DIRSERVER-935
> >
> ----------------------------------------------------------------------------
> >
> >                 Key: DIRSERVER-942
> >                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
> >             Project: Directory ApacheDS
> >          Issue Type: Bug
> >          Components: ldap
> >    Affects Versions: 1.5.0
> >            Reporter: Ole Ersoy
> >             Fix For: 1.5.1
> >
> >         Attachments: CreateSyntaxEntrySelfContainedTest.java
> >
> >
> > This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> > By accident I tried running some code that deletes (935 looks up)
> > entries that are not present.
> > The server froze and I could not connect with LS
> > anymore.
> > First I assumed it crashed, so I tried doing
> > ./apacheds start
> > But I still could not connect
> > so I tried doing
> > ./apacheds stop
> > ./aapcheds start
> > and back to normal.
> > I need to code a self contained test for this.
> > Cheers,
> > - Ole
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521723 ] 

Emmanuel Lecharny commented on DIRSERVER-942:
---------------------------------------------

There is an interesting thread stack :

"main" prio=10 tid=0x0805c400 nid=0x42b9 in Object.wait() [0xb7df3000..0xb7df4208]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c16c478> (a com.sun.jndi.ldap.LdapRequest)
        at com.sun.jndi.ldap.Connection.readReply(Connection.java:431)
        - locked <0x8c16c478> (a com.sun.jndi.ldap.LdapRequest)
        at com.sun.jndi.ldap.LdapClient.getSearchReply(LdapClient.java:611)
        at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:534)
        at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1948)
        at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1810)
        at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1735)
        at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368)
        at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338)
        at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321)
        at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248)
        at org.apache.directory.server.DeleteIllegalDNITest.testSearch(DeleteIllegalDNITest.java:64)

We can see that the client is waiting forever for a reply. But while using wireshark, here is the data which are being sent back to the client for the last search :

                            30 5c 02 01  02 65 57 0a 01 22 04 00    ..P.0\.. .eW.."..
0050  04 50 49 6e 76 61 6c 69  64 20 72 6f 6f 74 20 44    .PInvali d root D
0060  4e 20 67 69 76 65 6e 20  3a 20 6d 79 42 61 64 44   N given  : myBadD
0070  4e 20 28 30 78 36 44 20  30 78 37 39 20 30 78 34   N (0x6D  0x79 0x4
0080  32 20 30 78 36 31 20 30  78 36 34 20 30 78 34 34   2 0x61 0 x64 0x44
0090  20 30 78 34 45 20 29 20  69 73 20 69 6e 76 61 6c    0x4E )  is inval
00a0  69 64                                                                           id


cryptic, eh ? :) This is just a SearchResultDone message ( the response from the previous request ). Why do we get it now is what we should understand... It seems that some state is not correctly handled if we have an error in the decoded PDU.

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>            Priority: Blocker
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java, thread-dump.txt
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Martin Alderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Alderson updated DIRSERVER-942:
--------------------------------------

    Attachment: IllegalDNITest.java

The attached integration test shows the problem I have noticed which I believe is the same as this JIRA issue.

If a client connects to the server, attempts to read with a bad DN (which correctly fails with an InvalidNameException), then attempts to do anything else (e.g. read ou=system) the client will lock up.  I don't _think_ the whole server locks up, just the connection for this client (although this test does not prove that).

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIRSERVER-942.
-----------------------------------------

    Resolution: Fixed

It seems to have been fixed. The way we handled the exception thrown by the decoder was not correct, and the buffer was not cleaned, so the next request reused the remaining bytes.

Thanks Ole and Martin for having found this tricky bug and for the good test cases !

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>            Priority: Blocker
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java, thread-dump.txt
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Ole Ersoy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520895 ] 

ole edited comment on DIRSERVER-942 at 8/18/07 1:49 PM:
--------------------------------------------------------------

OK - I retested this.  First I commented out the "testDeleteNonExistingSyntaxSchemaEntry" test.  Everything runs fine.  Then I ran it with the testDeleteNonExistingSyntaxSchemaEntry test.  The server freezes.  I ran it in debug mode, and here's the output from the console:

[15:26:44] WARN [org.apache.directory.server.core.DefaultDirectoryService] - You didn't change the admin password of directory service instance 'default'.  Please update the admin password as soon as possible to prevent a possible security breach.
[15:29:03] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - The DN to delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=system
[15:29:03] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - The DN to delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=system

After this output the server is frozen.  I verified this by attempting to rerun the tests and they just turn red.  On the first run, all the tests pass, except for the testDeleteNonExistingSyntaxSchemaEntry test, which just hangs.



Here's the test code just in case it's helpful (I just copied the JNDIConnectionTemplateTest from the testing archetype and pasted the code from the attached test):

/*
 *  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 *  
 *    http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License. 
 *  
 */
package org.apache.directory.apacheds.testing.setup;

import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.ldap.LdapContext;

/*
 * These tests require a running server.
 */
public class CopyOfJNDIConnectionTemplateTest extends JNDIConnectionTemplate  
{
	private static LdapContext systemContext  = null;
	private static LdapContext schemaContext = null;
    private static final String XSD_CONTEXT_RDN     = "cn=xsd";
    private static final String XSD_SYNTAX_RDN      = "ou=syntaxes";
    private static final String OID    = "1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233";
    
    private DirContext directoryContext = null;
    private DirContext xsdContext       = null;
    private DirContext syntaxContext    = null;
    private String xsdSyntaxStringRDN = "m-oid" + "=" + OID;

    
    public void setUp() throws Exception
    {
        super.setUp();
        directoryContext    = connect();
        xsdContext          = createXSDSchemaContext();
        syntaxContext       = createSyntaxContext();
    }
    
    public void tearDown() throws Exception
    {
        syntaxContext.destroySubcontext( xsdSyntaxStringRDN );
        syntaxContext.close();
        xsdContext.destroySubcontext( XSD_SYNTAX_RDN );
        xsdContext.close();
        directoryContext.destroySubcontext( XSD_CONTEXT_RDN );
        directoryContext.close();
        super.tearDown();
    }
    
    public void testSystemContextConnection() 
    throws NamingException
    {
    	systemContext = connect();
    	assertNotNull( systemContext );
        assertNotNull( connect() );
        assertEquals(
        		systemContext.getNameInNamespace(), "ou=system");
    }
    
    public void testSchemaContextConnection() 
    throws NamingException
    {
    	providerPath    = SCHEMA_PROVIDER_PATH;
    	schemaContext = connect();
    	assertNotNull (schemaContext);
        assertNotNull(connect());
        assertEquals(
        		schemaContext.getNameInNamespace(), 
        		"ou=schema");
    }
    
    public DirContext createXSDSchemaContext() throws NamingException
    {
        Attributes xsdAttributes = new BasicAttributes();

        Attribute topAttribute = new BasicAttribute(
            "objectClass", 
            "top"); 

        Attribute metaSchemaAttribute = new BasicAttribute(
            "objectClass", 
            "metaSchema");
        
        Attribute xsdAttribute = new BasicAttribute(
            "cn", 
            "xsd");
        
        Attribute mDependenciesAttribute = new BasicAttribute(
            "m-dependencies", "system");

        xsdAttributes.put( xsdAttribute );
        xsdAttributes.put( topAttribute );
        xsdAttributes.put( metaSchemaAttribute );
        xsdAttributes.put( mDependenciesAttribute );
        
        return directoryContext.createSubcontext( 
            XSD_CONTEXT_RDN, xsdAttributes );
    }
    
    
    public DirContext createSyntaxContext() throws NamingException
    {
        Attribute syntaxesAttribute = new BasicAttribute(
            "ou", "syntaxes");

        Attribute organizationUnitAttribute = new BasicAttribute(
            "objectClass", "organizationalUnit");
    
        Attribute topAttribute = new BasicAttribute(
            "objectClass", 
            "top"); 

        Attribute metaSchemaAttribute = new BasicAttribute(
            "objectClass", 
            "metaSchema");

        Attributes syntaxAttributes = new BasicAttributes();
        syntaxAttributes.put( syntaxesAttribute );
        syntaxAttributes.put( topAttribute );
        syntaxAttributes.put( metaSchemaAttribute );
        syntaxAttributes.put( organizationUnitAttribute);
        
        return ( DirContext ) xsdContext.createSubcontext( XSD_SYNTAX_RDN, syntaxAttributes );
    }
    
    
    public void testDeleteNonExistingSyntaxSchemaEntry() throws NamingException
    {
        Attribute objectClassAttribute = new BasicAttribute(
            "objectClass", 
            "top" );
        
        objectClassAttribute.add( "metaTop" );
        objectClassAttribute.add( "metaSyntax" );
        
        Attribute oidAttribute = new BasicAttribute(
            "m-oid", 
            OID);
        
        Attribute descriptionAttribute = new BasicAttribute(
            "m-description", 
            "xsd:String");
        
        Attributes attributes = new BasicAttributes();
        
        attributes.put( objectClassAttribute );
        attributes.put( oidAttribute );
        attributes.put( descriptionAttribute );

        syntaxContext.createSubcontext( xsdSyntaxStringRDN, attributes );
        syntaxContext.lookup(xsdSyntaxStringRDN);
        syntaxContext.destroySubcontext("monkeywrench");
    }
    
    
    
}


      was (Author: ole):
    OK - I retested this.  First I commented out the "testDeleteNonExistingSyntaxSchemaEntry" test.  Everything runs fine.  Then I ran it with the testDeleteNonExistingSyntaxSchemaEntry test.  The server freezes.  I ran it in debug mode, and here's the output from the console:

[15:26:44] WARN [org.apache.directory.server.core.DefaultDirectoryService] - You didn't change the admin password of directory service instance 'default'.  Please update the admin password as soon as possible to prevent a possible security breach.
[15:29:03] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - The DN to delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=system
[15:29:03] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - The DN to delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=system

After this output the server

Here's the test code just in case it's helpful (I just copied the JNDIConnectionTemplateTest from the testing archetype and pasted the code from the attached test):

/*
 *  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 *  
 *    http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License. 
 *  
 */
package org.apache.directory.apacheds.testing.setup;

import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.ldap.LdapContext;

/*
 * These tests require a running server.
 */
public class CopyOfJNDIConnectionTemplateTest extends JNDIConnectionTemplate  
{
	private static LdapContext systemContext  = null;
	private static LdapContext schemaContext = null;
    private static final String XSD_CONTEXT_RDN     = "cn=xsd";
    private static final String XSD_SYNTAX_RDN      = "ou=syntaxes";
    private static final String OID    = "1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233";
    
    private DirContext directoryContext = null;
    private DirContext xsdContext       = null;
    private DirContext syntaxContext    = null;
    private String xsdSyntaxStringRDN = "m-oid" + "=" + OID;

    
    public void setUp() throws Exception
    {
        super.setUp();
        directoryContext    = connect();
        xsdContext          = createXSDSchemaContext();
        syntaxContext       = createSyntaxContext();
    }
    
    public void tearDown() throws Exception
    {
        syntaxContext.destroySubcontext( xsdSyntaxStringRDN );
        syntaxContext.close();
        xsdContext.destroySubcontext( XSD_SYNTAX_RDN );
        xsdContext.close();
        directoryContext.destroySubcontext( XSD_CONTEXT_RDN );
        directoryContext.close();
        super.tearDown();
    }
    
    public void testSystemContextConnection() 
    throws NamingException
    {
    	systemContext = connect();
    	assertNotNull( systemContext );
        assertNotNull( connect() );
        assertEquals(
        		systemContext.getNameInNamespace(), "ou=system");
    }
    
    public void testSchemaContextConnection() 
    throws NamingException
    {
    	providerPath    = SCHEMA_PROVIDER_PATH;
    	schemaContext = connect();
    	assertNotNull (schemaContext);
        assertNotNull(connect());
        assertEquals(
        		schemaContext.getNameInNamespace(), 
        		"ou=schema");
    }
    
    public DirContext createXSDSchemaContext() throws NamingException
    {
        Attributes xsdAttributes = new BasicAttributes();

        Attribute topAttribute = new BasicAttribute(
            "objectClass", 
            "top"); 

        Attribute metaSchemaAttribute = new BasicAttribute(
            "objectClass", 
            "metaSchema");
        
        Attribute xsdAttribute = new BasicAttribute(
            "cn", 
            "xsd");
        
        Attribute mDependenciesAttribute = new BasicAttribute(
            "m-dependencies", "system");

        xsdAttributes.put( xsdAttribute );
        xsdAttributes.put( topAttribute );
        xsdAttributes.put( metaSchemaAttribute );
        xsdAttributes.put( mDependenciesAttribute );
        
        return directoryContext.createSubcontext( 
            XSD_CONTEXT_RDN, xsdAttributes );
    }
    
    
    public DirContext createSyntaxContext() throws NamingException
    {
        Attribute syntaxesAttribute = new BasicAttribute(
            "ou", "syntaxes");

        Attribute organizationUnitAttribute = new BasicAttribute(
            "objectClass", "organizationalUnit");
    
        Attribute topAttribute = new BasicAttribute(
            "objectClass", 
            "top"); 

        Attribute metaSchemaAttribute = new BasicAttribute(
            "objectClass", 
            "metaSchema");

        Attributes syntaxAttributes = new BasicAttributes();
        syntaxAttributes.put( syntaxesAttribute );
        syntaxAttributes.put( topAttribute );
        syntaxAttributes.put( metaSchemaAttribute );
        syntaxAttributes.put( organizationUnitAttribute);
        
        return ( DirContext ) xsdContext.createSubcontext( XSD_SYNTAX_RDN, syntaxAttributes );
    }
    
    
    public void testDeleteNonExistingSyntaxSchemaEntry() throws NamingException
    {
        Attribute objectClassAttribute = new BasicAttribute(
            "objectClass", 
            "top" );
        
        objectClassAttribute.add( "metaTop" );
        objectClassAttribute.add( "metaSyntax" );
        
        Attribute oidAttribute = new BasicAttribute(
            "m-oid", 
            OID);
        
        Attribute descriptionAttribute = new BasicAttribute(
            "m-description", 
            "xsd:String");
        
        Attributes attributes = new BasicAttributes();
        
        attributes.put( objectClassAttribute );
        attributes.put( oidAttribute );
        attributes.put( descriptionAttribute );

        syntaxContext.createSubcontext( xsdSyntaxStringRDN, attributes );
        syntaxContext.lookup(xsdSyntaxStringRDN);
        syntaxContext.destroySubcontext("monkeywrench");
    }
    
    
    
}

  
> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Ole Ersoy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521162 ] 

Ole Ersoy commented on DIRSERVER-942:
-------------------------------------

Emmanuel,

This is good, as now we know that it's only in the schema partition that this is an issue (Actually Martin commented that he saw this somewhere else as well...).  What I did was create a syntax container in the schema partition, and then tried this:

syntaxContext.destroySubcontext("monkeywrench"); 

So if you LS in to a syntax container and try to delete a non-existing syntax entry, the server should freeze.  I would verify this, but I'm having LS install issues....I get this error when trying to install from the update site:

1.5.0.200707041) requires feature "org.eclipse.datatools.connectivity.oda.designer.feature (1.5.0.200707041)", or compatible.

Anyways, hopefully verification is that simple.  It definitely freezes when running the shown test though.

Thanks,
- Ole

P.S. Martin commented that he saw this during another instance as well, but I deleted the mail, thinking it was in here.  Martin, could you please "JIRA Comment" in your observation.  Thanks.

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521126 ] 

Emmanuel Lecharny commented on DIRSERVER-942:
---------------------------------------------

Ole,
I just tested one thing :
1) I launched the server (standard, with no more entry than the ones provided with the default install)
2) I created a new entry cn=test,dc=example,dc=com with ApacheDirStudio (np at all)
3) I searched this entry with ldapsearch : got the entry
4) I deleted it with ldapdelete (np at all)
5) I searched this entry with ldapsearch : no entry, it has correctly been deleted
6) I tried to delete the entry 'baddn,dc=example,dc=com" : I got an error message (obviously) :
ldap_delete: Invalid DN syntax (34)
            additinal info: The DN to delete : baddn,dc=example,dc=com (0x62 ... bunch o hex values ...) is invalid
7) and I tried to search again with ldapsearch : np, I got what I have asked for.

My conclusion is that the server is not frozen when requesting a deletion of a bad DN.

Can you narrow the error ?

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Ole Ersoy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509424 ] 

Ole Ersoy commented on DIRSERVER-942:
-------------------------------------

OK - I modified the 935 test, so it should now hang the server when run.  Note that this is only for the installed server.

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521545 ] 

Emmanuel Lecharny commented on DIRSERVER-942:
---------------------------------------------

I have attached a thread dump when the server is frozen. FYI, I have migrated to MINA 1.1.2 in this case. (the migration went very smoothly, except a couple of things I had to blind guess).

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>            Priority: Blocker
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java, thread-dump.txt
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-942:
----------------------------------------

    Priority: Blocker  (was: Major)

Raised to blocker as the server can totally stale after a few bad requests...

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>            Priority: Blocker
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Ole Ersoy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520896 ] 

Ole Ersoy commented on DIRSERVER-942:
-------------------------------------

Here's the testing archetype stuff just in case:

Checkout:
svn co https://svn.apache.org/repos/asf/directory/sandbox/oersoy/apacheds.testing.archetype

cd apacheds.testing.archetype

mvn clean install

Run:
mvn archetype:create -DarchetypeGroupId=org.apache.directory -DarchetypeArtifactId=apacheds.testing.archetype -DarchetypeVersion=1.0.0 -DgroupId="" -DartifactId=archetype.instance.testing


> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521802 ] 

Emmanuel Lecharny commented on DIRSERVER-942:
---------------------------------------------

After more investigation, I found that when the decoder throw an exception, no response is created and sent back to the client immediatly (or the response is created, but not sent, as the decodeOccured() method is never called). 

I have changed the way the exception is handled in the TwixDecoder.decode() method so that the decodeOccured() method is called and the LdapMessageContainer is cleaned and the buffer is emptied. It worked. As a side effect, the connection is closed, and I hope that it is the expected behavior (to be double checked), otherwise we must find another solution (may be not throwing an exception could be the solution).

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>            Priority: Blocker
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java, thread-dump.txt
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRSERVER-942.
---------------------------------------


> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>            Priority: Blocker
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java, thread-dump.txt
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521923 ] 

Alex Karasulu commented on DIRSERVER-942:
-----------------------------------------

Emmanuel if I remember correctly only a protocol error should result in closing the connection.  This is due to bad TLV or LDAP message composition errors.  This is not a protocol error in that the ASN.1 is malformed.  It is due to a bad DN which has an error code which should be returned.  The connection should not be dropped but the request should fail with error messages.


> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>            Priority: Blocker
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java, thread-dump.txt
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Ole Ersoy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ole Ersoy updated DIRSERVER-942:
--------------------------------

    Attachment: CreateSyntaxEntrySelfContainedTest.java

Confirmation Test

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-942:
----------------------------------------

    Attachment: thread-dump.txt

A thread dump when the server is frozen

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>            Priority: Blocker
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java, thread-dump.txt
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Ole Ersoy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520900 ] 

Ole Ersoy commented on DIRSERVER-942:
-------------------------------------

Here's the output when I crtl-c to close the debugging session:
[16:10:47] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - The DN to delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=system
[16:10:47] WARN [org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler] - [/127.0.0.1:39964] Unexpected exception forcing session to close: sending disconnect notice to client.
java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
        at sun.nio.ch.IOUtil.read(IOUtil.java:200)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProcessor.java:267)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:241)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500(SocketIoProcessor.java:44)
        at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:559)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)
        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(Thread.java:619)




> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Ole Ersoy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521304 ] 

Ole Ersoy commented on DIRSERVER-942:
-------------------------------------

I think these might be two separate bugs.  In my case, all the tests run fine up until the testDeleteNonExistingSyntaxSchemaEntry() test.  This test just hangs.  If I try to run the tests again, all of them fail.  Thus the setup and teardown methods are not succeeding as they did before, suggesting that the whole server is hung.

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-942:
----------------------------------------

    Affects Version/s:     (was: 1.5.1)
                       1.5.0
        Fix Version/s: 1.5.1

Ole,

- can you confirm this is a real rpoblem?
- can you build a test case for it ?

Otherwise, when you open an issue, try to pick the correct version (1.5.0 here), because 1.5.1 has not been released yet.

Thanks !

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Ole Ersoy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520895 ] 

Ole Ersoy commented on DIRSERVER-942:
-------------------------------------

OK - I retested this.  First I commented out the "testDeleteNonExistingSyntaxSchemaEntry" test.  Everything runs fine.  Then I ran it with the testDeleteNonExistingSyntaxSchemaEntry test.  The server freezes.  I ran it in debug mode, and here's the output from the console:

[15:26:44] WARN [org.apache.directory.server.core.DefaultDirectoryService] - You didn't change the admin password of directory service instance 'default'.  Please update the admin password as soon as possible to prevent a possible security breach.
[15:29:03] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - The DN to delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=system
[15:29:03] ERROR [org.apache.directory.shared.ldap.codec.LdapMessageGrammar] - The DN to delete : monkeywrench,ou=syntaxes,cn=xsd,ou=system (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 0x79 0x73 0x74 0x65 0x6D ) is invalid : Bad DN : monkeywrench,ou=syntaxes,cn=xsd,ou=system

After this output the server

Here's the test code just in case it's helpful (I just copied the JNDIConnectionTemplateTest from the testing archetype and pasted the code from the attached test):

/*
 *  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 *  
 *    http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License. 
 *  
 */
package org.apache.directory.apacheds.testing.setup;

import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.ldap.LdapContext;

/*
 * These tests require a running server.
 */
public class CopyOfJNDIConnectionTemplateTest extends JNDIConnectionTemplate  
{
	private static LdapContext systemContext  = null;
	private static LdapContext schemaContext = null;
    private static final String XSD_CONTEXT_RDN     = "cn=xsd";
    private static final String XSD_SYNTAX_RDN      = "ou=syntaxes";
    private static final String OID    = "1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233";
    
    private DirContext directoryContext = null;
    private DirContext xsdContext       = null;
    private DirContext syntaxContext    = null;
    private String xsdSyntaxStringRDN = "m-oid" + "=" + OID;

    
    public void setUp() throws Exception
    {
        super.setUp();
        directoryContext    = connect();
        xsdContext          = createXSDSchemaContext();
        syntaxContext       = createSyntaxContext();
    }
    
    public void tearDown() throws Exception
    {
        syntaxContext.destroySubcontext( xsdSyntaxStringRDN );
        syntaxContext.close();
        xsdContext.destroySubcontext( XSD_SYNTAX_RDN );
        xsdContext.close();
        directoryContext.destroySubcontext( XSD_CONTEXT_RDN );
        directoryContext.close();
        super.tearDown();
    }
    
    public void testSystemContextConnection() 
    throws NamingException
    {
    	systemContext = connect();
    	assertNotNull( systemContext );
        assertNotNull( connect() );
        assertEquals(
        		systemContext.getNameInNamespace(), "ou=system");
    }
    
    public void testSchemaContextConnection() 
    throws NamingException
    {
    	providerPath    = SCHEMA_PROVIDER_PATH;
    	schemaContext = connect();
    	assertNotNull (schemaContext);
        assertNotNull(connect());
        assertEquals(
        		schemaContext.getNameInNamespace(), 
        		"ou=schema");
    }
    
    public DirContext createXSDSchemaContext() throws NamingException
    {
        Attributes xsdAttributes = new BasicAttributes();

        Attribute topAttribute = new BasicAttribute(
            "objectClass", 
            "top"); 

        Attribute metaSchemaAttribute = new BasicAttribute(
            "objectClass", 
            "metaSchema");
        
        Attribute xsdAttribute = new BasicAttribute(
            "cn", 
            "xsd");
        
        Attribute mDependenciesAttribute = new BasicAttribute(
            "m-dependencies", "system");

        xsdAttributes.put( xsdAttribute );
        xsdAttributes.put( topAttribute );
        xsdAttributes.put( metaSchemaAttribute );
        xsdAttributes.put( mDependenciesAttribute );
        
        return directoryContext.createSubcontext( 
            XSD_CONTEXT_RDN, xsdAttributes );
    }
    
    
    public DirContext createSyntaxContext() throws NamingException
    {
        Attribute syntaxesAttribute = new BasicAttribute(
            "ou", "syntaxes");

        Attribute organizationUnitAttribute = new BasicAttribute(
            "objectClass", "organizationalUnit");
    
        Attribute topAttribute = new BasicAttribute(
            "objectClass", 
            "top"); 

        Attribute metaSchemaAttribute = new BasicAttribute(
            "objectClass", 
            "metaSchema");

        Attributes syntaxAttributes = new BasicAttributes();
        syntaxAttributes.put( syntaxesAttribute );
        syntaxAttributes.put( topAttribute );
        syntaxAttributes.put( metaSchemaAttribute );
        syntaxAttributes.put( organizationUnitAttribute);
        
        return ( DirContext ) xsdContext.createSubcontext( XSD_SYNTAX_RDN, syntaxAttributes );
    }
    
    
    public void testDeleteNonExistingSyntaxSchemaEntry() throws NamingException
    {
        Attribute objectClassAttribute = new BasicAttribute(
            "objectClass", 
            "top" );
        
        objectClassAttribute.add( "metaTop" );
        objectClassAttribute.add( "metaSyntax" );
        
        Attribute oidAttribute = new BasicAttribute(
            "m-oid", 
            OID);
        
        Attribute descriptionAttribute = new BasicAttribute(
            "m-description", 
            "xsd:String");
        
        Attributes attributes = new BasicAttributes();
        
        attributes.put( objectClassAttribute );
        attributes.put( oidAttribute );
        attributes.put( descriptionAttribute );

        syntaxContext.createSubcontext( xsdSyntaxStringRDN, attributes );
        syntaxContext.lookup(xsdSyntaxStringRDN);
        syntaxContext.destroySubcontext("monkeywrench");
    }
    
    
    
}


> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520754 ] 

Alex Karasulu commented on DIRSERVER-942:
-----------------------------------------

Ole is this still the case? Sorry as I process this bug parade I cannot test each issue.  Perhaps you can give this a try and give me feedback so I can fix it in 1.5.1 if the bug exists.

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521412 ] 

Emmanuel Lecharny commented on DIRSERVER-942:
---------------------------------------------

Thanks a lot Martin for the sharp description and for the accurate test case. I do have the same behavior.

What seems to happen is that MINA is repetitively trying to send the BAD DN message ad nauseam. The connexion is then totally dead for the client, but you can still connect to the server using another connection. However, this is very dangerous because we have a limited number of threads accepting incoming connections. At some point, we can totally lock the server.

I have no idea why the underlaying network layer loop...

Under investigation

> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRSERVER-942) Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRSERVER-942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521647 ] 

Trustin Lee commented on DIRSERVER-942:
---------------------------------------

I have no idea why ApacheDS keeps sending BadDN response message.  Full thread dump looks OK to me.
Adding a LoggingFilter to the filter chain might show who is writing the message repetitively.


> Server Feezes When Doing https://issues.apache.org/jira/browse/DIRSERVER-935
> ----------------------------------------------------------------------------
>
>                 Key: DIRSERVER-942
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-942
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.5.0
>            Reporter: Ole Ersoy
>            Priority: Blocker
>             Fix For: 1.5.1
>
>         Attachments: CreateSyntaxEntrySelfContainedTest.java, IllegalDNITest.java, thread-dump.txt
>
>
> This is related to https://issues.apache.org/jira/browse/DIRSERVER-935
> By accident I tried running some code that deletes (935 looks up)
> entries that are not present.
> The server froze and I could not connect with LS
> anymore.
> First I assumed it crashed, so I tried doing
> ./apacheds start
> But I still could not connect
> so I tried doing 
> ./apacheds stop
> ./aapcheds start
> and back to normal.
> I need to code a self contained test for this.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.