[
https://issues.apache.org/jira/browse/DIRMINA-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17393426#comment-17393426
]
Jonathan Valliere edited comment on DIRMINA-1145 at 8/4/21, 7:59 PM:
---------------------------------------------------------------------
Checkout
[https://gitbox.apache.org/repos/asf?p=mina.git;a=shortlog;h=refs/heads/bugfix/DIRMINA1132]
and build {{mina-core-2.1.5-SNAPSHOT}}. Then load [^DIRMINA-1145-EXAMPLE.zip]
I removed the {{ExecutorFilter}} because 2.1.5 does not include the concurrent
{{ProtocolCodecFactory}} improvements. The issue was related to JDK SSLEngine
emitting FINISHED twice where NOT_HANDSHAKING was expected. I had to enable
safe recursion of the receiver to ensure that all received messages are
processed regardless of where the FINISHED event occurs.
Setting {{MinaConfig.ENABLE_LOOP = true}} will cause stress testing. Setting
{{MinaConfig.NUM_CONCURRENT_PINGS > 1}} will cause message aggregation ensuring
message receive loop works correctly.
was (Author: johnnyv):
Checkout
[https://gitbox.apache.org/repos/asf?p=mina.git;a=shortlog;h=refs/heads/bugfix/DIRMINA1132]
and build {{mina-core-2.1.5-SNAPSHOT}}. Then load [^DIRMINA-1145-EXAMPLE.zip]
I removed the {{ExecutorFilter}} because 2.1.5 does not include the concurrent
{{ProtocolCodecFactory}} improvements. The issue was related to JDK SSLEngine
emitting FINISHED twice where NOT_HANDSHAKING was expected. I had to enable
safe recursion of the receiver to ensure that all received messages are
processed regardless of where the FINISHED event occurs.
> Mina Server is losing messages
> ------------------------------
>
> Key: DIRMINA-1145
> URL: https://issues.apache.org/jira/browse/DIRMINA-1145
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1.4
> Reporter: Guy Itzhaki
> Assignee: Jonathan Valliere
> Priority: Major
> Fix For: 2.2.0
>
> Attachments: DIRMINA-1145-EXAMPLE.zip,
> mina-core-2.1.5-SNAPSHOT-ssl2.jar, mina-core-2.2.0-SNAPSHOT.jar,
> mina_client_server.zip
>
>
> During our tests we found that in some circumstances Mina server loses
> messages.
> From what we understand this happens when client opens connection and then
> sends message(s) and the server is still busy processing the sessionOpened
> event while the message the client sent went through the server’s filterChain.
>
> Attached is a simple client and server that will help you reproduce the
> problem, before you run it please perform the following steps:
> *+Configuration:+*
> # In order to reproduce the problem SSL filter *must* be defined (already
> implemented in the attached example)
> # Update the keystore and truststore files locations in *addSSLFilter()*
> method in *MinaClient* and *MinaServer*
> # Set server break points at:
> # MinaServerHandler#sessionOpened
> # MinaServerHandler#messageReceived
> # org.apache.mina.core.filterchain.IoFilter.NextFilter#messageReceived
> # Set client break points at:
> # MinaClientHandler#sessionOpened
>
> *Since this is a timing problem you need to run a debugger as described
> below:*
> # Start server
> # Start client
> # At the client at *MinaClientHandler#sessionOpened* release the break point
> # Release all break points +except+ server’s
> *MinaServerHandler#sessionOpened*
> # After org.apache.mina.core.filterchain.IoFilter.NextFilter#messageReceived
> completed to process all events, you can release
> *MinaServerHandler#sessionOpened*
>
> +*Expected result:*+
> MinaServerHandler#messageReceived will be invoked with the message sent by
> the client
> *+Actual result:+*
> MinaServerHandler#messageReceived is not invoked.
>
> To use the example, add the following jars to your class path:
> commons-lang3-3.9.jar
> log4j-api-2.13.3.jar
> log4j-core-2.13.3.jar
> log4j-jcl-2.13.3.jar
> mina-core-2.1.4.jar
> slf4j-api-1.7.26.jar
> spring-jcl-5.2.12.RELEASE.jar
>
> The java we use is *AdoptJDK 11.0.8*
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]