directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRAPI-83) Debug logging causes never ending loop whn decoding messages
Date Mon, 30 Apr 2012 23:33:48 GMT

    [ https://issues.apache.org/jira/browse/DIRAPI-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265506#comment-13265506
] 

Emmanuel Lecharny commented on DIRAPI-83:
-----------------------------------------

I'm not even sure why we set and reset the buffer... This is probably due to some old code
that was using something else than array() to read the ByteBuffer, but as array() returns
the internal byte[], there is no need for those two guys.


                
> Debug logging causes never ending loop whn decoding messages
> ------------------------------------------------------------
>
>                 Key: DIRAPI-83
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-83
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M11
>         Environment: Fedora 16 x64, Java 7, OpenLDAP 2.4.26
>            Reporter: Sumit Raja
>            Priority: Minor
>
> When a lookup for an entry is done with debug enabled the message decoding goes into
a continuous loop till the search times out. This happens with OpenLDAP when the "ERR_00043_REMAINING_BYTES_FOR_DECODED_PDU
The PDU has been fully decoded but there are still bytes in the buffer." error occurs
> I don't have a test case but a simple LdapConnection.lookup with debug logging enabled
causes this.
> The fix looks pretty straightforward - the actual offending code is in org.apache.directory.shared.ldap.codec.protocol.mina.LdapProtocolDecoder.decode().
The buffer.position is set(:134) and reset(:145) without a mark being set.
> The workaround is to turn off debug logging for the "org.apache.directory" logger

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message