[
https://issues.apache.org/jira/browse/DIRMINA-1205?focusedWorklogId=1056567&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1056567
]
ASF GitHub Bot logged work on DIRMINA-1205:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 23/Nov/26 05:49
Start Date: 23/Nov/26 05:49
Worklog Time Spent: 10m
Work Description: the-thing commented on code in PR #84:
URL: https://github.com/apache/mina/pull/84#discussion_r4662244532
##########
mina-core/src/main/java/org/apache/mina/proxy/filter/ProxyFilter.java:
##########
@@ -173,16 +172,19 @@ public void messageReceived(final NextFilter nextFilter,
final IoSession session
}
}
- // Pass on any remaining data to the next filter
- if (buf.hasRemaining()) {
+ forward = buf.hasRemaining();
+
Review Comment:
Moved.
##########
mina-core/src/main/java/org/apache/mina/proxy/filter/ProxyFilter.java:
##########
@@ -210,35 +212,40 @@ public void filterWrite(final NextFilter nextFilter,
final IoSession session, fi
public void writeData(final NextFilter nextFilter, final IoSession
session, final WriteRequest writeRequest,
final boolean isHandshakeData) {
ProxyLogicHandler handler = getProxyHandler(session);
+ boolean forward;
synchronized (handler) {
if (handler.isHandshakeComplete()) {
// Handshake is done - write data as normal
- nextFilter.filterWrite(session, writeRequest);
+ forward = true;
} else if (isHandshakeData) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(" handshake data: {}",
writeRequest.getMessage());
}
-
- // Writing handshake data
- nextFilter.filterWrite(session, writeRequest);
+ forward = true;
} else {
// Writing non-handshake data before the handshake finished
if (!session.isConnected()) {
// Not even connected - ignore
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(" Write request on closed session.
Request ignored.");
}
+ forward = false;
} else {
// Queue the data to be sent as soon as the handshake
completes
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(" Handshaking is not complete yet.
Buffering write request.");
}
handler.enqueueWriteRequest(nextFilter, writeRequest);
+ forward = false;
Review Comment:
Good point. Moved
Issue Time Tracking
-------------------
Worklog Id: (was: 1056567)
Time Spent: 1h 40m (was: 1.5h)
> Deadlock when using SSL in combination with proxy filter
> --------------------------------------------------------
>
> Key: DIRMINA-1205
> URL: https://issues.apache.org/jira/browse/DIRMINA-1205
> Project: MINA
> Issue Type: Bug
> Components: Core, SSL
> Affects Versions: 2.2.10
> Environment: Windows, Linux, MacOS
> Reporter: Marcin Lamparski
> Priority: Critical
> Attachments: blocking-pipeline-deadlock.dot,
> blocking-pipeline-deadlock.svg, non-blocking-pipeline-deadlock.dot,
> non-blocking-pipeline-deadlock.svg
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> While updating MINA 2.2.10 in QuickFIXj we encountered a deadlock in
> end-to-end SOCKS proxy tests.
> It looks like this was introduced by DIRMINA-1199 fix however all
> combinations of tests fail with a deadlock, which also means that there is an
> existing problem with {{org.apache.mina.filter.ssl.SSLHandlerG0}}
> implementation in versions before 2.2.10.
> Currently I was only able to confirm SSL + SOCKS proxy combination failures,
> but some of the failures in mentioned QuickFIXj PRs look suspicious. It will
> be easier to investigate if we solve this problem first.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]