[jira] [Commented] (SSHD-961) Not all messages are correctly handled in port forwarding mode
[ https://issues.apache.org/jira/browse/SSHD-961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17002417#comment-17002417 ] Lyor Goldstein commented on SSHD-961: - Hi [~fcava] - thanks for the PR - I will review it and most likely merge it soon... > Not all messages are correctly handled in port forwarding mode > -- > > Key: SSHD-961 > URL: https://issues.apache.org/jira/browse/SSHD-961 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.3.1 >Reporter: Fulvio Cavarretta >Assignee: Lyor Goldstein >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > There are some race conditions so that in port forwarding mode, not all > messages are correctly managed during connections phase, leading to > _NullPointerException_ > > The problem is caused in > {noformat} > DefaultForwardingFilter.messageReceived{noformat} > where > {code:java} > OpenFuture future = channel.getOpenFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > {code} > should be > {code:java} > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > > OpenFuture future = messagesQueue.getCompletedFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > {code} > Since the _ClientChannelPendingMessagesQueue_ is a listener of the channel's > OpenFuture, this latter can be in open state but the > ClientChannelPendingMessagesQueue's completed feature could be not, so that > messages won't be correctly handled and a _null_ _errHandler_ is passed to > _ClientChannelPendingMessagesQueue.handleIncomingMessage_ > > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[jira] [Assigned] (SSHD-961) Not all messages are correctly handled in port forwarding mode
[ https://issues.apache.org/jira/browse/SSHD-961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lyor Goldstein reassigned SSHD-961: --- Assignee: Lyor Goldstein > Not all messages are correctly handled in port forwarding mode > -- > > Key: SSHD-961 > URL: https://issues.apache.org/jira/browse/SSHD-961 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.3.1 >Reporter: Fulvio Cavarretta >Assignee: Lyor Goldstein >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > There are some race conditions so that in port forwarding mode, not all > messages are correctly managed during connections phase, leading to > _NullPointerException_ > > The problem is caused in > {noformat} > DefaultForwardingFilter.messageReceived{noformat} > where > {code:java} > OpenFuture future = channel.getOpenFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > {code} > should be > {code:java} > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > > OpenFuture future = messagesQueue.getCompletedFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > {code} > Since the _ClientChannelPendingMessagesQueue_ is a listener of the channel's > OpenFuture, this latter can be in open state but the > ClientChannelPendingMessagesQueue's completed feature could be not, so that > messages won't be correctly handled and a _null_ _errHandler_ is passed to > _ClientChannelPendingMessagesQueue.handleIncomingMessage_ > > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[jira] [Work started] (SSHD-961) Not all messages are correctly handled in port forwarding mode
[ https://issues.apache.org/jira/browse/SSHD-961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on SSHD-961 started by Lyor Goldstein. --- > Not all messages are correctly handled in port forwarding mode > -- > > Key: SSHD-961 > URL: https://issues.apache.org/jira/browse/SSHD-961 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.3.1 >Reporter: Fulvio Cavarretta >Assignee: Lyor Goldstein >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > There are some race conditions so that in port forwarding mode, not all > messages are correctly managed during connections phase, leading to > _NullPointerException_ > > The problem is caused in > {noformat} > DefaultForwardingFilter.messageReceived{noformat} > where > {code:java} > OpenFuture future = channel.getOpenFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > {code} > should be > {code:java} > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > > OpenFuture future = messagesQueue.getCompletedFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > {code} > Since the _ClientChannelPendingMessagesQueue_ is a listener of the channel's > OpenFuture, this latter can be in open state but the > ClientChannelPendingMessagesQueue's completed feature could be not, so that > messages won't be correctly handled and a _null_ _errHandler_ is passed to > _ClientChannelPendingMessagesQueue.handleIncomingMessage_ > > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[jira] [Updated] (SSHD-961) Not all messages are correctly handled in port forwarding mode
[ https://issues.apache.org/jira/browse/SSHD-961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fulvio Cavarretta updated SSHD-961: --- Description: There are some race conditions so that in port forwarding mode, not all messages are correctly managed during connections phase, leading to NullPointerException The problem is caused in {noformat} DefaultForwardingFilter.messageReceived{noformat} where {code:java} OpenFuture future = channel.getOpenFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); {code} should be {code:java} ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); OpenFuture future = messagesQueue.getCompletedFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; {code} Since the _ClientChannelPendingMessagesQueue_ is a listener of the channel's OpenFuture, this latter can be in open state but the ClientChannelPendingMessagesQueue's completed feature could be not, so that messages won't be correctly handled and a _null_ _errHandler_ is passed to _ClientChannelPendingMessagesQueue.handleIncomingMessage_ was: There are some race conditions so that in port forwarding mode, not all messages are correctly managed during connections phase, leading to NullPointerException The problem is caused in {noformat} DefaultForwardingFilter.messageReceived{noformat} where {code:java} OpenFuture future = channel.getOpenFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); {code} should be {code:java} ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); OpenFuture future = messagesQueue.getCompletedFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; {code} Because since the ClientChannelPendingMessagesQueue is a listener of the channel's OpenFuture, this latter can be in open state but the ClientChannelPendingMessagesQueue's completed feature still not, so that messages won't be correctly handled > Not all messages are correctly handled in port forwarding mode > -- > > Key: SSHD-961 > URL: https://issues.apache.org/jira/browse/SSHD-961 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.3.1 >Reporter: Fulvio Cavarretta >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > There are some race conditions so that in port forwarding mode, not all > messages are correctly managed during connections phase, leading to > NullPointerException > > The problem is caused in > {noformat} > DefaultForwardingFilter.messageReceived{noformat} > where > {code:java} > OpenFuture future = channel.getOpenFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > }
[jira] [Updated] (SSHD-961) Not all messages are correctly handled in port forwarding mode
[ https://issues.apache.org/jira/browse/SSHD-961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fulvio Cavarretta updated SSHD-961: --- Description: There are some race conditions so that in port forwarding mode, not all messages are correctly managed during connections phase, leading to _NullPointerException_ The problem is caused in {noformat} DefaultForwardingFilter.messageReceived{noformat} where {code:java} OpenFuture future = channel.getOpenFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); {code} should be {code:java} ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); OpenFuture future = messagesQueue.getCompletedFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; {code} Since the _ClientChannelPendingMessagesQueue_ is a listener of the channel's OpenFuture, this latter can be in open state but the ClientChannelPendingMessagesQueue's completed feature could be not, so that messages won't be correctly handled and a _null_ _errHandler_ is passed to _ClientChannelPendingMessagesQueue.handleIncomingMessage_ was: There are some race conditions so that in port forwarding mode, not all messages are correctly managed during connections phase, leading to NullPointerException The problem is caused in {noformat} DefaultForwardingFilter.messageReceived{noformat} where {code:java} OpenFuture future = channel.getOpenFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); {code} should be {code:java} ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); OpenFuture future = messagesQueue.getCompletedFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; {code} Since the _ClientChannelPendingMessagesQueue_ is a listener of the channel's OpenFuture, this latter can be in open state but the ClientChannelPendingMessagesQueue's completed feature could be not, so that messages won't be correctly handled and a _null_ _errHandler_ is passed to _ClientChannelPendingMessagesQueue.handleIncomingMessage_ > Not all messages are correctly handled in port forwarding mode > -- > > Key: SSHD-961 > URL: https://issues.apache.org/jira/browse/SSHD-961 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.3.1 >Reporter: Fulvio Cavarretta >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > There are some race conditions so that in port forwarding mode, not all > messages are correctly managed during connections phase, leading to > _NullPointerException_ > > The problem is caused in > {noformat} > DefaultForwardingFilter.messageReceived{noformat} > where > {code:java} > OpenFuture future = channel.getOpenFuture(); > Consumer errHandler = future.isOpened() ? null : e -> {
[jira] [Updated] (SSHD-961) Not all messages are correctly handled in port forwarding mode
[ https://issues.apache.org/jira/browse/SSHD-961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fulvio Cavarretta updated SSHD-961: --- Description: There are some race conditions so that in port forwarding mode, not all messages are correctly managed during connections phase, leading to NullPointerException The problem is caused in {noformat} DefaultForwardingFilter.messageReceived{noformat} where {code:java} OpenFuture future = channel.getOpenFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); {code} should be {code:java} ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); OpenFuture future = messagesQueue.getCompletedFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; {code} Because since the ClientChannelPendingMessagesQueue is a listener of the channel's OpenFuture, this latter can be in open state but the ClientChannelPendingMessagesQueue's completed feature still not, so that messages won't be correctly handled was: There are some race conditions so that in port forwarding mode, not all messages are correctly managed during connections phase, leading to starvation. The problem is caused in {noformat} DefaultForwardingFilter.messageReceived{noformat} where {code:java} OpenFuture future = channel.getOpenFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); {code} should be {code:java} ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); OpenFuture future = messagesQueue.getCompletedFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; {code} Because since the ClientChannelPendingMessagesQueue is a listener of the channel's OpenFuture, this latter can be in open state but the ClientChannelPendingMessagesQueue's completed feature still not, so that messages won't be correctly handled > Not all messages are correctly handled in port forwarding mode > -- > > Key: SSHD-961 > URL: https://issues.apache.org/jira/browse/SSHD-961 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.3.1 >Reporter: Fulvio Cavarretta >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > There are some race conditions so that in port forwarding mode, not all > messages are correctly managed during connections phase, leading to > NullPointerException > > The problem is caused in > {noformat} > DefaultForwardingFilter.messageReceived{noformat} > where > {code:java} > OpenFuture future = channel.getOpenFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal >
[jira] [Updated] (SSHD-961) Not all messages are correctly handled in port forwarding mode
[ https://issues.apache.org/jira/browse/SSHD-961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fulvio Cavarretta updated SSHD-961: --- Summary: Not all messages are correctly handled in port forwarding mode (was: Not alla messages correctly handled in port forwarding mode) > Not all messages are correctly handled in port forwarding mode > -- > > Key: SSHD-961 > URL: https://issues.apache.org/jira/browse/SSHD-961 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.3.1 >Reporter: Fulvio Cavarretta >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > There are some race conditions so that in port forwarding mode, not all > messages are correctly managed during connections phase, leading to > starvation. > > The problem is caused in > {noformat} > DefaultForwardingFilter.messageReceived{noformat} > where > {code:java} > OpenFuture future = channel.getOpenFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > {code} > should be > {code:java} > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > > OpenFuture future = messagesQueue.getCompletedFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > {code} > Because since the ClientChannelPendingMessagesQueue is a listener of the > channel's OpenFuture, this latter can be in open state but the > ClientChannelPendingMessagesQueue's completed feature still not, so that > messages won't be correctly handled > > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[jira] [Work logged] (SSHD-961) Not alla messages correctly handled in port forwarding mode
[ https://issues.apache.org/jira/browse/SSHD-961?focusedWorklogId=362497=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-362497 ] ASF GitHub Bot logged work on SSHD-961: --- Author: ASF GitHub Bot Created on: 23/Dec/19 10:16 Start Date: 23/Dec/19 10:16 Worklog Time Spent: 10m Work Description: fcav1973 commented on pull request #110: [SSHD-961] URL: https://github.com/apache/mina-sshd/pull/110 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 362497) Remaining Estimate: 0h Time Spent: 10m > Not alla messages correctly handled in port forwarding mode > --- > > Key: SSHD-961 > URL: https://issues.apache.org/jira/browse/SSHD-961 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.3.1 >Reporter: Fulvio Cavarretta >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > There are some race conditions so that in port forwarding mode, not all > messages are correctly managed during connections phase, leading to > starvation. > > The problem is caused in > {noformat} > DefaultForwardingFilter.messageReceived{noformat} > where > {code:java} > OpenFuture future = channel.getOpenFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > {code} > should be > {code:java} > ClientChannelPendingMessagesQueue messagesQueue = > channel.getPendingMessagesQueue(); > > OpenFuture future = messagesQueue.getCompletedFuture(); > Consumer errHandler = future.isOpened() ? null : e -> { > try { > exceptionCaught(session, e); > } catch (Exception err) { > log.warn("messageReceived({}) failed ({}) to signal > {}[{}] on channel={}: {}", > session, err.getClass().getSimpleName(), > e.getClass().getSimpleName(), > e.getMessage(), channel, err.getMessage()); > } > }; > {code} > Because since the ClientChannelPendingMessagesQueue is a listener of the > channel's OpenFuture, this latter can be in open state but the > ClientChannelPendingMessagesQueue's completed feature still not, so that > messages won't be correctly handled > > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[GitHub] [mina-sshd] fcav1973 opened a new pull request #110: [SSHD-961]
fcav1973 opened a new pull request #110: [SSHD-961] URL: https://github.com/apache/mina-sshd/pull/110 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[jira] [Created] (SSHD-961) Not alla messages correctly handled in port forwarding mode
Fulvio Cavarretta created SSHD-961: -- Summary: Not alla messages correctly handled in port forwarding mode Key: SSHD-961 URL: https://issues.apache.org/jira/browse/SSHD-961 Project: MINA SSHD Issue Type: Bug Affects Versions: 2.3.1 Reporter: Fulvio Cavarretta There are some race conditions so that in port forwarding mode, not all messages are correctly managed during connections phase, leading to starvation. The problem is caused in {noformat} DefaultForwardingFilter.messageReceived{noformat} where {code:java} OpenFuture future = channel.getOpenFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); {code} should be {code:java} ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); OpenFuture future = messagesQueue.getCompletedFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; {code} Because since the ClientChannelPendingMessagesQueue is a listener of the channel's OpenFuture, this latter can be in open state but the ClientChannelPendingMessagesQueue's completed feature still not, so that messages won't be correctly handled -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[GitHub] [mina-sshd] fcav1973 commented on a change in pull request #80: SSHD-849 working code for pull request
fcav1973 commented on a change in pull request #80: SSHD-849 working code for pull request URL: https://github.com/apache/mina-sshd/pull/80#discussion_r360817171 ## File path: sshd-core/src/main/java/org/apache/sshd/common/forward/DefaultForwardingFilter.java ## @@ -1082,7 +1093,7 @@ public void messageReceived(IoSession session, Readable message) throws Exceptio session, channel, totalMessages, message.available()); } -OpenFuture future = channel.getOpenFuture(); +OpenFuture future = channel.getPendingMessagesQueue().getCompletedFuture(); Review comment: ```suggestion ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); OpenFuture future = messagesQueue.getCompletedFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[GitHub] [mina-sshd] fcav1973 commented on a change in pull request #80: SSHD-849 working code for pull request
fcav1973 commented on a change in pull request #80: SSHD-849 working code for pull request URL: https://github.com/apache/mina-sshd/pull/80#discussion_r360817171 ## File path: sshd-core/src/main/java/org/apache/sshd/common/forward/DefaultForwardingFilter.java ## @@ -1082,7 +1093,7 @@ public void messageReceived(IoSession session, Readable message) throws Exceptio session, channel, totalMessages, message.available()); } -OpenFuture future = channel.getOpenFuture(); +OpenFuture future = channel.getPendingMessagesQueue().getCompletedFuture(); Review comment: ```suggestion ClientChannelPendingMessagesQueue messagesQueue = channel.getPendingMessagesQueue(); OpenFuture future = messagesQueue.getCompletedFuture(); Consumer errHandler = future.isOpened() ? null : e -> { try { exceptionCaught(session, e); } catch (Exception err) { log.warn("messageReceived({}) failed ({}) to signal {}[{}] on channel={}: {}", session, err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel, err.getMessage()); } }; ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org