[ https://issues.apache.org/jira/browse/DIRMINA-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17779582#comment-17779582 ]
Emmanuel Lécharny commented on DIRMINA-1176: -------------------------------------------- Hi [~johnnyv], the BufferOverflow occurs because the number of enqueued message exceed the 64 mimit (MAX_QUEUED_MESSAGES): {code:java} /* package protected */ class SSLHandlerG0 extends SslHandler { ... /** * {@inheritDoc} */ @Override synchronized public void write(NextFilter next, WriteRequest request) throws SSLException, WriteRejectedException { ... if (mEncodeQueue.size() == MAX_QUEUED_MESSAGES) { throw new BufferOverflowException(); } ...{code} Do you remind what was the rational for the addition of this hard limit? This was this commit: https://github.com/apache/mina/commit/94a43f8e035c83b09ce72721418c3f20f8e4f084 > Buffer overflow exception when writing messages over SSL > --------------------------------------------------------- > > Key: DIRMINA-1176 > URL: https://issues.apache.org/jira/browse/DIRMINA-1176 > Project: MINA > Issue Type: Bug > Components: Filter > Affects Versions: 2.2.1, 2.2.3 > Reporter: Eissam Yassin > Priority: Critical > > Hello, > When many messages written over SSL we get BufferOverflowException exception: > > {noformat} > 0831_07:00:31.831, "Io Exception in Em<->Gw connection named 'GW'", [INFO], > T@113, T:ctm.COMM_EM.113, , , COMM_EM, > EmDsectProtocolIoHandlare::exceptionCaught, "java.nio.BufferOverflowException > at > org.apache.mina.filter.ssl.SSLHandlerG0.write(SSLHandlerG0.java:339) > at org.apache.mina.filter.ssl.SslFilter.filterWrite(SslFilter.java:380) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:753) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1500(DefaultIoFilterChain.java:49) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:1146) > at > com.bmc.ctms.infra.comm.RawCommunicationLogger.filterWrite(RawCommunicationLogger.java:102) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:753) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1500(DefaultIoFilterChain.java:49) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:1146) > at > org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:332) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:753) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1500(DefaultIoFilterChain.java:49) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:1146) > at > org.apache.mina.filter.executor.ExecutorFilter.filterWrite(ExecutorFilter.java:595) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:753) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1500(DefaultIoFilterChain.java:49) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:1146) > at > org.apache.mina.core.filterchain.IoFilterAdapter.filterWrite(IoFilterAdapter.java:138) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:753) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.fireFilterWrite(DefaultIoFilterChain.java:746) > at > org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:575) > at > org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:520) > at > com.bmc.ctms.ctminfra.protocols.emdsect.EmGwProtocolManager.write(EmGwProtocolManager.java:513) > at > com.bmc.ctms.ctminfra.protocols.emdsect.EmGwProtocolManager.write(EmGwProtocolManager.java:473) > at > com.bmc.ctms.ctminfra.protocols.emdsect.EmGwProtocolManager.writeWithoutExceptions(EmGwProtocolManager.java:448) > at > com.bmc.ctms.common.services.Service.handleResponse(Service.java:245) > at > com.bmc.ctms.ctmce.Download$SlaveService.handleResponse(Download.java:251) > at > com.bmc.ctms.common.services.Service$3.handleEvent(Service.java:358) > at > com.bmc.ctms.infra.EventDispatcher$EventEntry.handleSubscriberEntryEvent(EventDispatcher.java:687) > at > com.bmc.ctms.infra.EventDispatcher$EventEntry.publishByUniqeID(EventDispatcher.java:673) > at > com.bmc.ctms.infra.EventDispatcher$EventEntry.publish(EventDispatcher.java:694) > at > com.bmc.ctms.infra.EventDispatcher.publish(EventDispatcher.java:194) > at com.bmc.ctms.infra.EventDispatcher.publish(EventDispatcher.java:154) > at > com.bmc.ctms.common.Ipc2EventAdapter.handleIpcGtwMsg(Ipc2EventAdapter.java:206) > at > com.bmc.ctms.common.Ipc2EventAdapter$1.handleEvent(Ipc2EventAdapter.java:41) > at > com.bmc.ctms.infra.EventDispatcher$EventEntry.handleSubscriberEntryEvent(EventDispatcher.java:687) > at > com.bmc.ctms.infra.EventDispatcher$EventEntry.handleSubscribersEntryEvent(EventDispatcher.java:733) > at > com.bmc.ctms.infra.EventDispatcher$EventEntry.publish(EventDispatcher.java:701) > at > com.bmc.ctms.infra.EventDispatcher.publish(EventDispatcher.java:194) > at com.bmc.ctms.infra.EventDispatcher.publish(EventDispatcher.java:154) > at > com.bmc.ctms.ctminfra.protocols.ipc.impl.IpcProtocolIoHandlare.messageReceived(IpcProtocolIoHandlare.java:80) > at > com.bmc.ctms.infra.comm.impl.CommunicationMsgHandler.messageReceived(CommunicationMsgHandler.java:124) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:1015) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) > at > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) > at > org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:106) > at org.apache.mina.core.session.IoEvent.run(IoEvent.java:89) > at > org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:763) > at > org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:755) > at > org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:695) > at java.base/java.lang.Thread.run(Thread.java:833){noformat} > This issues produced when using Java 11 and Java 17 on Linux. > > Thanks in advanced, > Eissam Yassin -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org