wanena / ganymed-ssh-2

Automatically exported from code.google.com/p/ganymed-ssh-2
Other
0 stars 0 forks source link

Avoid synchronized methods and use Locks to allow timeouts #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We use ganymed in production in a highly loaded circumstances, and sometimes it 
deadlocks when single java application executes multiple ssh connections in 
separate threads.

Possible solution can be to rewrite parts of ganymed code to avoid syncronized 
methods and use Lock objects instead, this will give us opportunity to close 
connection with timeout even in case of lock.

We can provide patch. Will be glad to hear another cases/solutions of the same 
problem (deadlocks).

Original issue reported on code.google.com by andreus...@gmail.com on 17 Aug 2012 at 7:36

GoogleCodeExporter commented 9 years ago
The library was written for situations where we had to handle dozens of 
concurrent connections. The locking code has been designed very carefully, I am 
not aware of any static synchronized methods or any long-held global lock 
objects.

Please provide an example/analysis where different threads working with 
different connections interfere with each other. If you have a patch, then we 
will be happy to have a look at it.

Original comment by cleondris on 10 Jun 2013 at 3:52