Re: Possible deadlocking between jcifs.smb.Dfs and jcifs.smb.SmbTransport

Xavier Roche <[email protected]>
Newsgroups gmane.network.samba.java
Organization Exalead
Message-ID <[email protected]>
On 03/05/2012 04:20 AM, Michael B Allen wrote:
> No. It is not ok to use the same SmbFile instance with more than one
> thread at a time. You can use multiple threads but you just can't use
> the same SmbFile object with multiple threads at the same time.

Okay, noted.

> Are you seeing the deadlock with different SmbFile instances or is it
> only when trying to use the same SmbFile object with multiple threads?

I am seeing the same deadlock, even when using a single SmbFile on each 
thread, when accessing the same DFS tree. (I even synchronized all calls 
to SmbFile to ensure that there was no reentrancy issue)

If I am not mistaken, the way to reproduce the issue is to have multiple 
threads working with *different* files, but inside a *common* DFS (the 
files were created by the same listFiles() probably).

A small torture test (32 threads) will typically deadlock within 
seconds/minutes.

[ A "regular" program would also deadlock, but more "randomly"/slowly. ]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.