[GitHub] [mina-sshd] The-Yoda closed pull request #120: Increase log level to error for scp error logs

2020-04-12 Thread GitBox
The-Yoda closed pull request #120: Increase log level to error for scp error 
logs
URL: https://github.com/apache/mina-sshd/pull/120
 
 
   


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

2020-04-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-966?focusedWorklogId=420954=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-420954
 ]

ASF GitHub Bot logged work on SSHD-966:
---

Author: ASF GitHub Bot
Created on: 12/Apr/20 16:45
Start Date: 12/Apr/20 16:45
Worklog Time Spent: 10m 
  Work Description: lgoldstein commented on pull request #117: SSHD-966 
Deadlock on writePacket if exception during pending packets flushing
URL: https://github.com/apache/mina-sshd/pull/117
 
 
   
 

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: 420954)
Time Spent: 20m  (was: 10m)

> 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: 20m
>  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)
>   

[GitHub] [mina-sshd] lgoldstein closed pull request #117: SSHD-966 Deadlock on writePacket if exception during pending packets flushing

2020-04-12 Thread GitBox
lgoldstein closed pull request #117: SSHD-966 Deadlock on writePacket if 
exception during pending packets flushing
URL: https://github.com/apache/mina-sshd/pull/117
 
 
   


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] [Work started] (SSHD-977) Apply consistent logging policy to caught exceptions

2020-04-12 Thread Lyor Goldstein (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on SSHD-977 started by Lyor Goldstein.
---
> Apply consistent logging policy to caught exceptions
> 
>
> Key: SSHD-977
> URL: https://issues.apache.org/jira/browse/SSHD-977
> Project: MINA SSHD
>  Issue Type: Improvement
>Reporter: Lyor Goldstein
>Assignee: Lyor Goldstein
>Priority: Major
>
> See [https://github.com/apache/mina-sshd/pull/120] as an example:
> * Log at ERROR/WARNING level the basic exception details (class + message)
> * If DEBUG enabled then also log at ERROR/WARNING level the actual stack trace



--
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] lgoldstein commented on issue #120: Increase log level to error for scp error logs

2020-04-12 Thread GitBox
lgoldstein commented on issue #120: Increase log level to error for scp error 
logs
URL: https://github.com/apache/mina-sshd/pull/120#issuecomment-612639877
 
 
   Merged - see commit 
[4320886b19c8385ac017945d708680fad9c46f04](https://github.com/apache/mina-sshd/commit/4320886b19c8385ac017945d708680fad9c46f04)
 - can close the PR


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] lgoldstein edited a comment on issue #120: Increase log level to error for scp error logs

2020-04-12 Thread GitBox
lgoldstein edited a comment on issue #120: Increase log level to error for scp 
error logs
URL: https://github.com/apache/mina-sshd/pull/120#issuecomment-612637864
 
 
   I can live with this... will merge soon - opened 
[SSHD-977](https://issues.apache.org/jira/browse/SSHD-977) to follow up


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-977) Apply consistent logging policy to caught exceptions

2020-04-12 Thread Lyor Goldstein (Jira)
Lyor Goldstein created SSHD-977:
---

 Summary: Apply consistent logging policy to caught exceptions
 Key: SSHD-977
 URL: https://issues.apache.org/jira/browse/SSHD-977
 Project: MINA SSHD
  Issue Type: Improvement
Reporter: Lyor Goldstein
Assignee: Lyor Goldstein


See [https://github.com/apache/mina-sshd/pull/120] as an example:

* Log at ERROR/WARNING level the basic exception details (class + message)
* If DEBUG enabled then also log at ERROR/WARNING level the actual stack trace



--
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] lgoldstein commented on issue #120: Increase log level to error for scp error logs

2020-04-12 Thread GitBox
lgoldstein commented on issue #120: Increase log level to error for scp error 
logs
URL: https://github.com/apache/mina-sshd/pull/120#issuecomment-612637864
 
 
   I can live with this... will merge soon


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] The-Yoda commented on issue #120: Increase log level to error for scp error logs

2020-04-12 Thread GitBox
The-Yoda commented on issue #120: Increase log level to error for scp error logs
URL: https://github.com/apache/mina-sshd/pull/120#issuecomment-612625707
 
 
   Now updated the code similar to @gnodet suggestion.


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] The-Yoda commented on issue #120: Increase log level to error for scp error logs

2020-04-12 Thread GitBox
The-Yoda commented on issue #120: Increase log level to error for scp error logs
URL: https://github.com/apache/mina-sshd/pull/120#issuecomment-612623369
 
 
   Provided that it is a utility with only static methods, I'm not sure how 
user can intercept `LoggingUtils.logException(getClass(), "message...",  
e);`.
   
   One way I could think of is plugging in the logging related code while 
configuring while creating the server or client(similar to EventListener). But 
this creates lot of churn to the user to go through all the trouble to add 
logging and they won't be aware of it. 
   Also, there will be hotspots with which user configuration will create more 
noise. So, they will need to do at class level. And it wouldn't be a good idea 
to let the user know what is there underneath.
   In short, giving control of logging errors may create more problems than it 
solves.


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] lgoldstein commented on issue #120: Increase log level to error for scp error logs

2020-04-12 Thread GitBox
lgoldstein commented on issue #120: Increase log level to error for scp error 
logs
URL: https://github.com/apache/mina-sshd/pull/120#issuecomment-612575529
 
 
   I have been considering perhaps using a dedicated logger for exceptions 
where in addition to logging as we currently do we also invoke this logger - 
e.g.:
   
   ```java
   try {
   ... some code...
   } catch (SomeException  e) {
  ...log as usual...
   LoggingUtils.logException(getClass(), "message...",  e);
   }
   ```
   
   and then have  some mechanism by which users can intercept the calls to 
`LoggingUtils#logException` and decide for themselves at which level to log and 
what details to include.


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] lgoldstein commented on issue #120: Increase log level to error for scp error logs

2020-04-12 Thread GitBox
lgoldstein commented on issue #120: Increase log level to error for scp error 
logs
URL: https://github.com/apache/mina-sshd/pull/120#issuecomment-612574982
 
 
   I am not sure I understand exactly how this would work - however, my main 
concern is not specifically with this code but rather our overall logging 
policy. On one hand, we do want to have abnormal situations logged with enough 
detail to allow debugging, but on the other hand we do not want to "pour" a lot 
of log messages - especially long stack traces.
   
   >> issue the error statement with just the exception's string representation
   
   This sounds reasonable, except that unfortunately many exceptions are thrown 
without any explanatory message. Too often have I seen `IOException: null` - 
i.e., the code threw `IOException` with no explanation as to what was wrong. 
Furthermore, I am not sure what `the exception's string representation`means - 
if it means `toString` then I  think it includes the stack trace - which I am 
not sure is a good idea.
   


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