directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre-Arnaud Marcelot (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRAPI-54) org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.OutOfMemoryError: ;
Date Mon, 24 Oct 2011 16:01:32 GMT

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

Pierre-Arnaud Marcelot commented on DIRAPI-54:
----------------------------------------------

Hi Aswartha,

Thanks to your files. I was able to reproduce the bug in a similar setup (same code - using
ApacheDS inside Studio).

I then switched to the latest milestone version of ApacheDS 2.0 and the problem doesn't appear
on that version.

So, it was definitely a bug in ApacheDS 1.5.x (1.5.6 was bundled with Studio 1.5.3) and that
bug has been fixed in ApacheDS 2.0

You should move to the latest version of ApacheDS 2.0.

Many thanks for reporting the bug.

Regards,
Pierre-Arnaud
                
> org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.OutOfMemoryError: ;
> ------------------------------------------------------------------------------------
>
>                 Key: DIRAPI-54
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-54
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M8
>         Environment: jdk1.6, windows 7, Apache Directory Studio Version: 1.5.3.v20100330,
apache ldap API, apache-ldap-api-1.0.0-M8-bin
>            Reporter: Aswartha N Rupa
>            Priority: Blocker
>              Labels: API, LDAP, LDAPPRotocolDecoder, ProtocolDecoderException, mina,
outofmemory
>             Fix For: 1.0.0-M8
>
>         Attachments: Apache-LDAP_API.zip, example.ldif
>
>
> A simple program that performs a search on the sample ldif shipped with apache DS>
> public class List {
> 	public static void main(String[] args) throws Exception{
> 		LdapConnection connection = new LdapNetworkConnection( "localhost", 10389 , false);
> 		System.out.println("got connection");
> 		
>         connection.bind( "uid=admin,ou=system", "secret" );
>         SearchRequest searchRequest = new SearchRequestImpl();
>         searchRequest.setBase(new Dn("ou=Users,dc=example,dc=com"));
>         searchRequest.setFilter("(&(sn=*)(mail=mplanck*))");
>         searchRequest.setScope(SearchScope.ONELEVEL);
>         String [] attributes = { "cn", "mail", "telephonenumber" };
>         searchRequest.addAttributes(attributes);
>       
>         SearchCursor cursor = connection.search(searchRequest);
>         
>         if (cursor.next()) {
>         	Response response = cursor.get();
>         	System.out.println( ((SearchResultEntry)response).getEntry() );
>         	System.out.println( "Trying to close the cursor" );
>             cursor.close();
>         	
>         }
>         //SearchResultDone done = cursor.getSearchResultDone();
>         System.out.println( "Trying to close the connection" );
> 		connection.close();
> 		System.out.println( "Trying to close the cursor done" );
> 	}
> }
> Its prints the first record and waits for more than 10-15 minutes (after the connection.close()
is invoke on main thread) giving out an outofmemory error on protocol decoder. I see two threads
[NioProcessor] and [NioSocketConnector]  in Running state even after main thread executed
its last statement.
> With output: 
> log4j:WARN No appenders could be found for logger (org.apache.directory.ldap.client.api.LdapConnectionConfig).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
> got connection
> Entry
>     dn: uid=mplanck,ou=Users,dc=example,dc=com
>     mail: mplanck@example.com
>     cn: Max Planck
>     telephonenumber: +1 904 982 6882
> Trying to close the cursor
> Trying to close the connection
> Trying to close the cursor done
> org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.OutOfMemoryError: Java
heap space (Hexdump: 30 4E 02 01 02 73 49 04 47 6C 64 61 70 3A 2F 2F 61 64 2E 65 78 61 6D
70 6C 65 2E 63 6F 6D 2F 75 69 64 3D 70 64 69 72 61 63 2C 25 32 30 6F 75 3D 55 73 65 72 73
2C 25 32 30 64 63 3D 65 78 61 6D 70 6C 65 2C 64 63 3D 63 6F 6D 3F 3F 62 61 73 65 30 54 02
01 02 73 4F 04 4D 6C 64 61 70 3A 2F 2F 6F 70 65 6E 6C 64 61 70 2E 65 78 61 6D 70 6C 65 2E
63 6F 6D 2F 75 69 64 3D 65 66 65 72 6D 69 2C 25 32 30 6F 75 3D 55 73 65 72 73 2C 25 32 30
64 63 3D 65 78 61 6D 70 6C 65 2C 64 63 3D 63 6F 6D 3F 3F 62 61 73 65 30 56 02 01 02 73 51
04 4F 6C 64 61 70 3A 2F 2F 61 70 61 63 68 65 64 73 2E 65 78 61 6D 70 6C 65 2E 63 6F 6D 2F
75 69 64 3D 72 66 65 79 6E 6D 61 6E 2C 25 32 30 6F 75 3D 55 73 65 72 73 2C 25 32 30 64 63
3D 65 78 61 6D 70 6C 65 2C 64 63 3D 63 6F 6D 3F 3F 62 61 73 65 30 0C 02 01 02 65 07 0A 01
00 04 00 04 00)
> 	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:251)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
> 	at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:715)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:668)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:657)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1141)
> 	at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.OutOfMemoryError: Java heap space
> 	at java.nio.CharBuffer.wrap(CharBuffer.java:350)
> 	at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:238)
> 	at java.lang.StringCoding.encode(StringCoding.java:272)
> 	at java.lang.String.getBytes(String.java:946)
> 	at org.apache.directory.shared.util.Strings.getBytesUtf8(Strings.java:1426)
> 	at org.apache.directory.shared.ldap.model.name.Dn.apply(Dn.java:1222)
> 	at org.apache.directory.shared.ldap.model.name.Dn.<init>(Dn.java:283)
> 	at org.apache.directory.shared.ldap.model.name.Dn.<init>(Dn.java:207)
> 	at org.apache.directory.shared.ldap.model.url.LdapUrl.parseDN(LdapUrl.java:676)
> 	at org.apache.directory.shared.ldap.model.url.LdapUrl.parse(LdapUrl.java:198)
> 	at org.apache.directory.shared.ldap.model.url.LdapUrl.<init>(LdapUrl.java:308)
> 	at org.apache.directory.shared.ldap.codec.actions.searchResultReference.StoreReference.action(StoreReference.java:97)
> 	at org.apache.directory.shared.ldap.codec.actions.searchResultReference.StoreReference.action(StoreReference.java:47)
> 	at org.apache.directory.shared.asn1.ber.grammar.AbstractGrammar.executeAction(AbstractGrammar.java:138)
> 	at org.apache.directory.shared.asn1.ber.Asn1Decoder.treatTLVDoneState(Asn1Decoder.java:599)
> 	at org.apache.directory.shared.asn1.ber.Asn1Decoder.decode(Asn1Decoder.java:735)
> 	at org.apache.directory.shared.ldap.codec.api.LdapDecoder.decode(LdapDecoder.java:157)
> 	at org.apache.directory.shared.ldap.codec.protocol.mina.LdapProtocolDecoder.decode(LdapProtocolDecoder.java:79)
> 	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:241)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
> 	at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
> 	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:715)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:668)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:657)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
> 	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1141)
> 	at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

--
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