mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Phillips (JIRA)" <j...@apache.org>
Subject [jira] Created: (DIRMINA-320) Unexpected OutOfMemoryError exception in SocketConnectorIoProcessor
Date Sun, 03 Dec 2006 03:31:21 GMT
Unexpected OutOfMemoryError exception in SocketConnectorIoProcessor
-------------------------------------------------------------------

                 Key: DIRMINA-320
                 URL: http://issues.apache.org/jira/browse/DIRMINA-320
             Project: MINA
          Issue Type: Bug
          Components: Transport
    Affects Versions: 1.0
         Environment: Mac OS X, Java 1.5.0_06
            Reporter: Matthew Phillips


I'm not totally sure that this is a bug, but it's certainly a problem in that the error is
partially hidden by being sent to the logger and not the exceptionCaught() method and seems
to leave MINA in an unusable state.

The scenario is that I'm running some memory load tests by having a client fire lots of large
messages at a server, and I occasionally see the sort of exception below appear on the client's
console (the client is also MINA-based). It appears the heap is being blown and not being
handled very gracefully. The client that sees this happen does not shut down cleanly, possibly
because it's no longer able to send/receive the messages needed by my protocol to close the
session.

The main problem is that the client has no idea this has happened and cannot take any action,
it just fails ungracefully.

10822 [SocketConnectorIoProcessor-2.0] WARN org.apache.mina.common.support.DefaultExceptionMonitor
- Unexpected exception.
java.lang.OutOfMemoryError: Direct buffer memory
	at java.nio.Bits.reserveMemory(Bits.java:633)
	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
	at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
	at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:56)
	at sun.nio.ch.IOUtil.write(IOUtil.java:69)
	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
	at org.apache.mina.transport.socket.nio.SocketIoProcessor.doFlush(SocketIoProcessor.java:482)
	at org.apache.mina.transport.socket.nio.SocketIoProcessor.doFlush(SocketIoProcessor.java:414)
	at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$600(SocketIoProcessor.java:44)
	at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:567)
	at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)
	at java.lang.Thread.run(Thread.java:613)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message