[jira] [Commented] (DIRMINA-1079) MINA fails to connect from behind a proxy if endpoint is not resolved

2020-03-25 Thread Jira


[ 
https://issues.apache.org/jira/browse/DIRMINA-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17066548#comment-17066548
 ] 

Emmanuel Lécharny commented on DIRMINA-1079:


I can cut a release later this week. Pretty busy atm with family circling 
around me plus day job. The new normal nowadays ;-)

> MINA fails to connect from behind a proxy if endpoint is not resolved
> -
>
> Key: DIRMINA-1079
> URL: https://issues.apache.org/jira/browse/DIRMINA-1079
> Project: MINA
>  Issue Type: Bug
>  Components: Handler
>Affects Versions: 2.0.16
>Reporter: Anton Novikov
>Assignee: Jonathan Valliere
>Priority: Major
> Fix For: 2.0.23
>
> Attachments: DIRMINA-1079.patch
>
>
> MINA fails to connect from behind a proxy if endpoint address is not 
> resolved. This happens for both HTTP and SOCKS proxy and it seems that the 
> reason for this are typos in HttpProxyRequest and SocksProxyRequest. The 
> following changes seem to fix the issue:
> HttpProxyRequest line 105: replace {{if (!endpointAddress.isUnresolved()) {}} 
> with {{if (endpointAddress.isUnresolved()) {}}
> SocksProxyRequest line 162: replace {{if (adr != null && !adr.isUnresolved()) 
> {}} with {{if (adr != null && adr.isUnresolved()) {}}
> Note the negation is gone in both cases



--
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] [Commented] (SSHD-966) Deadlock on disconnection at the end of key-exchange

2020-03-25 Thread Lyor Goldstein (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17066540#comment-17066540
 ] 

Lyor Goldstein commented on SSHD-966:
-

I will take a closer look at the suggestion but from my initial review it looks 
a lot like what I was trying to do when I spoke too soon about having found a 
solution. The problem remains the same - if there is enough traffic then the 
KEX  state remains FLUSHING. Furthermore, the traffic is slowed down 
significantly since all packets must be queued and then dequeued and sent via 
{{synchronized}} mechanisms.

Moreover, some code might actually rely on the {{IoWriteFuture}} returned from 
{{writePacket}} - in which case we need to establish some equivalent (IMO 
complex) mechanism.

Last but not least - introducing a new KEX state to what already is a complex 
state machine is likely to introduce bugs and destabilize the code.

You have given me some ideas to explore though - perhaps one of them will pan 
out. Thanks for the response.

> Deadlock on disconnection at the end of key-exchange
> 
>
> Key: SSHD-966
> URL: https://issues.apache.org/jira/browse/SSHD-966
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.0.0
>Reporter: Francois Ferrand
>Assignee: Lyor Goldstein
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We are using git-repo to download projects from Gerrit server, using SSH.
> Gerrit is in version 2.16.16. which uses SSHD 2.0.0 and Mina 2.0.17 with NIO2 
> backend.
> One particularity of this setup is that git-repo creates a single control 
> master channel, and then downloads *lots* of Git repositories (500 
> repositories, some of them relatively large), with some degree of 
> parallelism. This takes a long time, lots of data, and the multiplexed 
> connections are handled by gerrit in multiple threads.
> In some cases, we experience a deadlock when an error happens at the end of 
> the key exchange, while sending pending packets:
> {noformat}
> Warning, the following threads are deadlocked : SSH git-upload-pack /project1 
> (myuser), sshd-SshServer[df5f657]-nio2-thread-3
> "SSH git-upload-pack /project1 (myuser)" prio=1 BLOCKED
>   
> org.apache.sshd.common.session.helpers.AbstractSession.writePacket(AbstractSession.java:1107)
>   
> org.apache.sshd.common.channel.AbstractChannel.writePacket(AbstractChannel.java:798)
>   
> org.apache.sshd.common.channel.ChannelOutputStream.flush(ChannelOutputStream.java:227)
>   
> org.apache.sshd.common.channel.ChannelOutputStream.write(ChannelOutputStream.java:127)
>   
> org.eclipse.jgit.transport.UploadPack$ResponseBufferedOutputStream.write(UploadPack.java:2183)
>   
> org.eclipse.jgit.transport.SideBandOutputStream.writeBuffer(SideBandOutputStream.java:174)
>   
> org.eclipse.jgit.transport.SideBandOutputStream.write(SideBandOutputStream.java:153)
>   
> org.eclipse.jgit.internal.storage.pack.PackOutputStream.write(PackOutputStream.java:132)
>   
> org.eclipse.jgit.internal.storage.file.PackFile.copyAsIs2(PackFile.java:614)
>   
> org.eclipse.jgit.internal.storage.file.PackFile.copyAsIs(PackFile.java:433)
>   
> org.eclipse.jgit.internal.storage.file.WindowCursor.copyObjectAsIs(WindowCursor.java:221)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjectImpl(PackWriter.java:1644)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writeObject(PackWriter.java:1621)
>   
> org.eclipse.jgit.internal.storage.pack.PackOutputStream.writeObject(PackOutputStream.java:171)
>   
> org.eclipse.jgit.internal.storage.file.WindowCursor.writeObjects(WindowCursor.java:229)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjects(PackWriter.java:1609)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjects(PackWriter.java:1597)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writePack(PackWriter.java:1154)
>   org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:2133)
>   org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:1947)
>   org.eclipse.jgit.transport.UploadPack.service(UploadPack.java:971)
>   org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:776)
>   com.google.gerrit.sshd.commands.Upload.runImpl(Upload.java:77)
>   
> com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:98)
>   
> com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:31)
>   
> com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:63)
>   com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:467)
>   
> com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:83)
>  

[jira] [Commented] (SSHD-966) Deadlock on disconnection at the end of key-exchange

2020-03-25 Thread Francois Ferrand (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17066478#comment-17066478
 ] 

Francois Ferrand commented on SSHD-966:
---

maybe adding a extra KexState state for FLUSHING :
 * When key exchange has completed, instead of marking KEX as DONE,
 ** if queue is empty, just mark KEX as DONE ;
 ** else, take the first packet from queue and set KEX as FLUSHING, then send 
the packet ;
 * when packet is sent, repeat the same process until the queue is empty
 * if application needs to send some other packets while in this FLUSHING 
state, they are simply queued (like during the actual KEX)
 * if another KEX happens while in this state, nothing special to do I think: 
only need to take care that the queue is not cleared...

Something roughly like this should work I think, but I have no idea how big a 
change it means or if there are other impacts...

> Deadlock on disconnection at the end of key-exchange
> 
>
> Key: SSHD-966
> URL: https://issues.apache.org/jira/browse/SSHD-966
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.0.0
>Reporter: Francois Ferrand
>Assignee: Lyor Goldstein
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We are using git-repo to download projects from Gerrit server, using SSH.
> Gerrit is in version 2.16.16. which uses SSHD 2.0.0 and Mina 2.0.17 with NIO2 
> backend.
> One particularity of this setup is that git-repo creates a single control 
> master channel, and then downloads *lots* of Git repositories (500 
> repositories, some of them relatively large), with some degree of 
> parallelism. This takes a long time, lots of data, and the multiplexed 
> connections are handled by gerrit in multiple threads.
> In some cases, we experience a deadlock when an error happens at the end of 
> the key exchange, while sending pending packets:
> {noformat}
> Warning, the following threads are deadlocked : SSH git-upload-pack /project1 
> (myuser), sshd-SshServer[df5f657]-nio2-thread-3
> "SSH git-upload-pack /project1 (myuser)" prio=1 BLOCKED
>   
> org.apache.sshd.common.session.helpers.AbstractSession.writePacket(AbstractSession.java:1107)
>   
> org.apache.sshd.common.channel.AbstractChannel.writePacket(AbstractChannel.java:798)
>   
> org.apache.sshd.common.channel.ChannelOutputStream.flush(ChannelOutputStream.java:227)
>   
> org.apache.sshd.common.channel.ChannelOutputStream.write(ChannelOutputStream.java:127)
>   
> org.eclipse.jgit.transport.UploadPack$ResponseBufferedOutputStream.write(UploadPack.java:2183)
>   
> org.eclipse.jgit.transport.SideBandOutputStream.writeBuffer(SideBandOutputStream.java:174)
>   
> org.eclipse.jgit.transport.SideBandOutputStream.write(SideBandOutputStream.java:153)
>   
> org.eclipse.jgit.internal.storage.pack.PackOutputStream.write(PackOutputStream.java:132)
>   
> org.eclipse.jgit.internal.storage.file.PackFile.copyAsIs2(PackFile.java:614)
>   
> org.eclipse.jgit.internal.storage.file.PackFile.copyAsIs(PackFile.java:433)
>   
> org.eclipse.jgit.internal.storage.file.WindowCursor.copyObjectAsIs(WindowCursor.java:221)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjectImpl(PackWriter.java:1644)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writeObject(PackWriter.java:1621)
>   
> org.eclipse.jgit.internal.storage.pack.PackOutputStream.writeObject(PackOutputStream.java:171)
>   
> org.eclipse.jgit.internal.storage.file.WindowCursor.writeObjects(WindowCursor.java:229)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjects(PackWriter.java:1609)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjects(PackWriter.java:1597)
>   
> org.eclipse.jgit.internal.storage.pack.PackWriter.writePack(PackWriter.java:1154)
>   org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:2133)
>   org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:1947)
>   org.eclipse.jgit.transport.UploadPack.service(UploadPack.java:971)
>   org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:776)
>   com.google.gerrit.sshd.commands.Upload.runImpl(Upload.java:77)
>   
> com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:98)
>   
> com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:31)
>   
> com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:63)
>   com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:467)
>   
> com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:83)
>   java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   

[jira] [Commented] (DIRMINA-1079) MINA fails to connect from behind a proxy if endpoint is not resolved

2020-03-25 Thread Rishabh Agarwal (Jira)


[ 
https://issues.apache.org/jira/browse/DIRMINA-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17066477#comment-17066477
 ] 

Rishabh Agarwal commented on DIRMINA-1079:
--

Version 2.0.23 is not available to use. Are you planning to make version 2.0.23 
available later or will fix this in next 2.0.x / 2.1.0 release? Please let me 
know as I am also affected by this issue.

> MINA fails to connect from behind a proxy if endpoint is not resolved
> -
>
> Key: DIRMINA-1079
> URL: https://issues.apache.org/jira/browse/DIRMINA-1079
> Project: MINA
>  Issue Type: Bug
>  Components: Handler
>Affects Versions: 2.0.16
>Reporter: Anton Novikov
>Assignee: Jonathan Valliere
>Priority: Major
> Fix For: 2.0.23
>
> Attachments: DIRMINA-1079.patch
>
>
> MINA fails to connect from behind a proxy if endpoint address is not 
> resolved. This happens for both HTTP and SOCKS proxy and it seems that the 
> reason for this are typos in HttpProxyRequest and SocksProxyRequest. The 
> following changes seem to fix the issue:
> HttpProxyRequest line 105: replace {{if (!endpointAddress.isUnresolved()) {}} 
> with {{if (endpointAddress.isUnresolved()) {}}
> SocksProxyRequest line 162: replace {{if (adr != null && !adr.isUnresolved()) 
> {}} with {{if (adr != null && adr.isUnresolved()) {}}
> Note the negation is gone in both cases



--
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