[jcifs] Deadlock situation in method SmbTree.treeConnect (jCIFS 1.2.13)

Michael B Allen miallen at ioplex.com
Tue Aug 7 19:07:53 GMT 2007

On Tue, 07 Aug 2007 14:26:07 +0200
Stig Inge Lea Bjørnsen <stig at coretrek.no> wrote:

> Could this deadlock have been avoided by changing treeConnect to
> synchronize on transport before it synchronizes on transport.setupDiscoLock?

Hi Stig,

No. This has been discussed on the list before. The solution is to
create a Lock class so that the caller can unlock deep in the call stack
(something that cannot be done using Java's native thread synchronization
features). Unfortunately I don't have the time to do that. But in all
instances I believe the deadlock could only be triggered by contrived
test that creates an excessive number of threads that would never been
used in a normal application.


Michael B Allen
PHP Active Directory Kerberos SSO

More information about the jcifs mailing list